git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
[enigma2.git]
/
lib
/
python
/
Components
/
Scanner.py
diff --git
a/lib/python/Components/Scanner.py
b/lib/python/Components/Scanner.py
index 5a26a7d4bcd277b681484e18ac77f186052e7104..766d19663d30db286f112c73f8615d6d30700dd2 100644
(file)
--- a/
lib/python/Components/Scanner.py
+++ b/
lib/python/Components/Scanner.py
@@
-16,7
+16,6
@@
def getExtension(file):
def getType(file):
(type, _) = guess_type(file)
def getType(file):
(type, _) = guess_type(file)
- print "guessed type:", type
if type is None:
# Detect some mimetypes unknown to dm7025
# TODO: do mimetypes.add_type once should be better
if type is None:
# Detect some mimetypes unknown to dm7025
# TODO: do mimetypes.add_type once should be better
@@
-29,6
+28,8
@@
def getType(file):
return "audio/x-flac"
elif ext == "dmpkg":
return "application/x-dream-package"
return "audio/x-flac"
elif ext == "dmpkg":
return "application/x-dream-package"
+ elif ext == "nfi":
+ return "application/x-dream-image"
elif ext == "ts":
return "video/MP2T"
elif ext == "iso":
elif ext == "ts":
return "video/MP2T"
elif ext == "iso":
@@
-131,9
+132,9
@@
def scanDevice(mountpoint):
# convert to list
paths_to_scan = list(paths_to_scan)
# convert to list
paths_to_scan = list(paths_to_scan)
-
+
from Components.Harddisk import harddiskmanager
from Components.Harddisk import harddiskmanager
- blockdev = mountpoint.
split('/')[2
]
+ blockdev = mountpoint.
rstrip("/").rsplit('/',1)[-1
]
error, blacklisted, removable, is_cdrom, partitions = harddiskmanager.getBlockDevInfo(blockdev)
# now scan the paths
error, blacklisted, removable, is_cdrom, partitions = harddiskmanager.getBlockDevInfo(blockdev)
# now scan the paths