if /hdd/movies is found and /hdd/movie doesn't exist, /hdd/movies is moved to /hdd/movie
+from Tools.Directories import *
+
def tryOpen(filename):
try:
procFile = open(filename)
def tryOpen(filename):
try:
procFile = open(filename)
return (res >> 8)
def createMovieFolder(self):
return (res >> 8)
def createMovieFolder(self):
- res = os.system("mkdir /hdd/movies")
+ res = os.system("mkdir " + resolveFilename(SCOPE_HDD))
return (res >> 8)
errorList = [ _("Everything is fine"), _("Creating partition failed"), _("Mkfs failed"), _("Mount failed"), _("Create movie folder failed"), _("Unmount failed")]
return (res >> 8)
errorList = [ _("Everything is fine"), _("Creating partition failed"), _("Mkfs failed"), _("Mount failed"), _("Create movie folder failed"), _("Unmount failed")]
from Components.Harddisk import harddiskmanager
from Tools import Notifications
from Components.Harddisk import harddiskmanager
from Tools import Notifications
+from Tools.Directories import *
#from enigma import eTimer, eDVBVolumecontrol, quitMainloop
from enigma import *
#from enigma import eTimer, eDVBVolumecontrol, quitMainloop
from enigma import *
def instantRecord(self):
try:
def instantRecord(self):
try:
- stat = os.stat("/hdd/movies")
+ stat = os.stat(resolveFilename(SCOPE_HDD))
- self.session.open(MessageBox, "No HDD found!", MessageBox.TYPE_ERROR)
+ self.session.open(MessageBox, _("No HDD found or HDD not initialized!"), MessageBox.TYPE_ERROR)
return
if self.isInstantRecordRunning():
return
if self.isInstantRecordRunning():
from Screens.MessageBox import MessageBox
from Screens.FixedMenu import FixedMenu
from Screens.MessageBox import MessageBox
from Screens.FixedMenu import FixedMenu
+from Tools.Directories import *
+
from enigma import eServiceReference, eServiceCenter
class ChannelContextMenu(FixedMenu):
from enigma import eServiceReference, eServiceCenter
class ChannelContextMenu(FixedMenu):
self.movemode = False
self.bouquet_mark_edit = False
self.movemode = False
self.bouquet_mark_edit = False
- self["list"] = MovieList(eServiceReference("2:0:1:0:0:0:0:0:0:0:/hdd/movies/"))
+ self["list"] = MovieList(eServiceReference("2:0:1:0:0:0:0:0:0:0:" + resolveFilename(SCOPE_HDD)))
if (selectedmovie is not None):
self.onShown.append(self.moveTo)
self.selectedmovie = selectedmovie
#self["okbutton"] = Button("ok", [self.channelSelected])
if (selectedmovie is not None):
self.onShown.append(self.moveTo)
self.selectedmovie = selectedmovie
#self["okbutton"] = Button("ok", [self.channelSelected])
- self["freeDiskSpace"] = DiskInfo("/hdd/movies", DiskInfo.FREE)
+ self["freeDiskSpace"] = DiskInfo(resolveFilename(SCOPE_HDD), DiskInfo.FREE)
self["actions"] = ActionMap(["OkCancelActions", "ContextMenuActions"],
{
self["actions"] = ActionMap(["OkCancelActions", "ContextMenuActions"],
{
SCOPE_USERETC = 5
SCOPE_CONFIG = 6
SCOPE_LANGUAGE = 7
SCOPE_USERETC = 5
SCOPE_CONFIG = 6
SCOPE_LANGUAGE = 7
PATH_CREATE = 0
PATH_DONTCREATE = 1
PATH_CREATE = 0
PATH_DONTCREATE = 1
SCOPE_SKIN: ("/usr/share/enigma2/", PATH_DONTCREATE),
SCOPE_SKIN_IMAGE: ("/usr/share/enigma2/", PATH_DONTCREATE),
SCOPE_SKIN: ("/usr/share/enigma2/", PATH_DONTCREATE),
SCOPE_SKIN_IMAGE: ("/usr/share/enigma2/", PATH_DONTCREATE),
+ SCOPE_HDD: ("/hdd/movie/", PATH_DONTCREATE),
SCOPE_USERETC: ("", PATH_DONTCREATE) # user home directory
}
SCOPE_USERETC: ("", PATH_DONTCREATE) # user home directory
}
-def resolveFilename(scope, base):
+def resolveFilename(scope, base = ""):
# in future, we would check for file existence here,
# so we can provide default/fallbacks.
path = defaultPaths[scope]
if path[1] == PATH_CREATE:
# in future, we would check for file existence here,
# so we can provide default/fallbacks.
path = defaultPaths[scope]
if path[1] == PATH_CREATE:
- if (not os.path.exists(path[0])):
+ if (not pathExists(scope)):
os.mkdir(path[0])
# FIXME: we also have to handle DATADIR etc. here.
return path[0] + base
# this is only the BASE - an extension must be added later.
os.mkdir(path[0])
# FIXME: we also have to handle DATADIR etc. here.
return path[0] + base
# this is only the BASE - an extension must be added later.
+
+def pathExists(scope):
+ return os.path.exists(defaultPaths[scope][0])
+
def getRecordingFilename(basename):
# filter out non-allowed characters
def getRecordingFilename(basename):
# filter out non-allowed characters
- path = "/hdd/movies/" + filename
+ path = resolveFilename(SCOPE_HDD, filename)
if i > 0:
path += "_%03d" % i
try:
if i > 0:
path += "_%03d" % i
try:
i += 1
except IOError:
return path
i += 1
except IOError:
return path
+
+# this fixes paths or files when changed in a new enigma2 version
+def fixOldDirectoryEntries():
+ if (os.path.exists("/hdd/movies")):
+ if (not os.path.exists(resolveFilename(SCOPE_HDD))):
+ os.system("mv /hdd/movies " + resolveFilename(SCOPE_HDD))
from Screens.StartWizard import *
from Screens.TutorialWizard import *
from Tools.BoundFunction import boundFunction
from Screens.StartWizard import *
from Screens.TutorialWizard import *
from Tools.BoundFunction import boundFunction
+from Tools.Directories import fixOldDirectoryEntries
+fixOldDirectoryEntries()
msgstr ""
"Project-Id-Version: tuxbox-enigma 0.0.1\n"
"Report-Msgid-Bugs-To: \n"
msgstr ""
"Project-Id-Version: tuxbox-enigma 0.0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-12-28 21:02+0100\n"
+"POT-Creation-Date: 2005-12-30 06:00+0100\n"
"PO-Revision-Date: 2005-12-14 03:29+0100\n"
"Last-Translator: Stefan Pluecken <stefan.pluecken@multimedia-labs.de>\n"
"Language-Team: none\n"
"PO-Revision-Date: 2005-12-14 03:29+0100\n"
"Last-Translator: Stefan Pluecken <stefan.pluecken@multimedia-labs.de>\n"
"Language-Team: none\n"
msgid "Channel Selection"
msgstr "Kanalliste"
msgid "Channel Selection"
msgstr "Kanalliste"
-#: ../lib/python/Screens/InfoBarGenerics.py:180
+#: ../lib/python/Screens/InfoBarGenerics.py:181
msgid "Channel:"
msgstr "Kanal:"
msgid "Channel:"
msgstr "Kanal:"
msgid "Delete"
msgstr "Löschen"
msgid "Delete"
msgstr "Löschen"
-#: ../lib/python/Screens/MovieSelection.py:50
+#: ../lib/python/Screens/MovieSelection.py:52
msgid "Delete failed!"
msgstr "Löschen fehlgeschlagen."
msgid "Delete failed!"
msgstr "Löschen fehlgeschlagen."
msgid "Disable"
msgstr "Aus"
msgid "Disable"
msgstr "Aus"
-#: ../lib/python/Screens/MovieSelection.py:33
+#: ../lib/python/Screens/MovieSelection.py:35
msgid "Do you really want to delete this recording?"
msgstr "Wollen Sie diese Aufnahme wirklich löschen?"
msgid "Do you really want to delete this recording?"
msgstr "Wollen Sie diese Aufnahme wirklich löschen?"
-#: ../lib/python/Screens/InfoBarGenerics.py:728
+#: ../lib/python/Screens/InfoBarGenerics.py:729
msgid ""
"Do you want to stop the current\n"
"(instant) recording?"
msgid ""
"Do you want to stop the current\n"
"(instant) recording?"
msgid "Monday"
msgstr "Montag"
msgid "Monday"
msgstr "Montag"
-#: ../lib/python/Screens/MovieSelection.py:20
+#: ../lib/python/Screens/MovieSelection.py:22
msgid "Movie Menu"
msgstr "Filmauswahl"
msgid "Movie Menu"
msgstr "Filmauswahl"
msgid "Netmask"
msgstr "Netzmaske"
msgid "Netmask"
msgstr "Netzmaske"
+#: ../lib/python/Screens/InfoBarGenerics.py:725
+msgid "No HDD found or HDD not initialized!"
+msgstr "Keine Festplatte gefunden oder\nFestplatte nicht initialisiert."
+
+
#: ../lib/python/Screens/ScanSetup.py:173
#: ../lib/python/Screens/ScanSetup.py:179
#: ../lib/python/Screens/ScanSetup.py:186
#: ../lib/python/Screens/ScanSetup.py:173
#: ../lib/python/Screens/ScanSetup.py:179
#: ../lib/python/Screens/ScanSetup.py:186
msgid "Providers"
msgstr "Anbieter"
msgid "Providers"
msgstr "Anbieter"
-#: ../lib/python/Screens/InfoBarGenerics.py:777
+#: ../lib/python/Screens/InfoBarGenerics.py:778
msgid "Record"
msgstr "Aufnahme"
msgid "Record"
msgstr "Aufnahme"
-#: ../lib/python/Screens/InfoBarGenerics.py:730
+#: ../lib/python/Screens/InfoBarGenerics.py:731
msgid "Start recording?"
msgstr "Aufnahme beginnen?"
msgid "Start recording?"
msgstr "Aufnahme beginnen?"
msgid "Stop playing this movie?"
msgstr "Das Abspielen dieses Films beenden?"
msgid "Stop playing this movie?"
msgstr "Das Abspielen dieses Films beenden?"
-#: ../lib/python/Screens/InfoBarGenerics.py:782 ../data/
+#: ../lib/python/Screens/InfoBarGenerics.py:783 ../data/
msgid "Subservices"
msgstr "Unterkanäle"
msgid "Subservices"
msgstr "Unterkanäle"
-#: ../lib/python/Screens/MovieSelection.py:35
+#: ../lib/python/Screens/MovieSelection.py:37
msgid "You cannot delete this!"
msgstr "Sie können dies nicht löschen."
msgid "You cannot delete this!"
msgstr "Sie können dies nicht löschen."
msgid "add service to favourites"
msgstr "Kanal zu Favoriten hinzufügen"
msgid "add service to favourites"
msgstr "Kanal zu Favoriten hinzufügen"
-#: ../lib/python/Screens/MovieSelection.py:18
+#: ../lib/python/Screens/MovieSelection.py:20
#: ../lib/python/Screens/ChannelSelection.py:65
msgid "back"
msgstr "zurück"
#: ../lib/python/Screens/ChannelSelection.py:65
msgid "back"
msgstr "zurück"
msgid "daily"
msgstr "täglich"
msgid "daily"
msgstr "täglich"
-#: ../lib/python/Screens/MovieSelection.py:18
+#: ../lib/python/Screens/MovieSelection.py:20
msgid "delete..."
msgstr "löschen..."
msgid "delete..."
msgstr "löschen..."
msgid "manual"
msgstr "manuell"
msgid "manual"
msgstr "manuell"
-#: ../lib/python/Screens/InfoBarGenerics.py:317
+#: ../lib/python/Screens/InfoBarGenerics.py:318
msgid "next channel"
msgstr "nächster Kanal"
msgid "next channel"
msgstr "nächster Kanal"
msgid "once"
msgstr "einmalig"
msgid "once"
msgstr "einmalig"
-#: ../lib/python/Screens/InfoBarGenerics.py:318
+#: ../lib/python/Screens/InfoBarGenerics.py:319
msgid "previous channel"
msgstr "vorheriger Kanal"
msgid "previous channel"
msgstr "vorheriger Kanal"
msgid "scan state"
msgstr "Status"
msgid "scan state"
msgstr "Status"
-#: ../lib/python/Screens/InfoBarGenerics.py:360
+#: ../lib/python/Screens/InfoBarGenerics.py:361
msgid "show EPG..."
msgstr "zeige EPG..."
msgid "show EPG..."
msgstr "zeige EPG..."