Exemple #1
0
    def getDirDescription(self):
        text = _("Name:") + ' ' + self.name
        text1 = []
        if self.dir_size > 0:
            text1.append(realSize(self.dir_size, 3))
        if self.dir_count > 0:
            text1.append(str(self.dir_count) + ' ' + _("Directories"))
        if self.mov_count > 0:
            text1.append(str(self.mov_count) + ' ' + _("Movies"))
            text1.append(str(self.mov_seen) + ' ' + _("seen"))
            text1.append(str(self.mov_count - self.mov_seen) + ' ' + _("new"))

        if len(text1) > 0:
            text += "  (" + ", ".join(text1) + ")"
        text = [text]

        #mount_path = self.getmount()
        # TODO temporary disabled, performance issue on mass storage devices
        if config.AdvancedMovieSelection.show_diskusage.value and os.path.exists(self.dir_path):
            total, used, free = diskUsage(self.dir_path)
            #text.append(_("Media:") + ' ' + str(mount_path))
            text.append(_("Total:") + ' ' + realSize(total, 3))
            text.append(_("Used:") + ' ' + realSize(used, 3))
            text.append(_("Free:") + ' ' + realSize(free, 3))
            real_path = os.path.realpath(self.dir_path) + os.sep
            if self.dir_path != real_path:
                text.append(_("Symlink:") + ' ' + real_path)
        
        return "\n".join(text)
Exemple #2
0
 def getDBDescription(self):
     text1 = []
     
     if self.dir_size > 0:
         text1.append(realSize(self.dir_size, 3))
     if self.dir_count > 0:
         text1.append(str(self.dir_count) + ' ' + _("Directories"))
     if self.mov_count > 0:
         text1.append(str(self.mov_count) + ' ' + _("Movies"))
         text1.append(str(self.mov_seen) + ' ' + _("seen"))
         text1.append(str(self.mov_count - self.mov_seen) + ' ' + _("new"))
     
     result = ", ".join(text1)
     if movieScanner.last_update:
         result += "\r\n" + _("Last update:") + ' ' + movieScanner.getLastUpdate()
     
     return result
    def getDirDescription(self):
        text = _("Name:") + ' ' + self.name
        text1 = []
        if self.dir_size > -1:
            text1.append(realSize(self.dir_size, 3))
        if self.dir_count > 0:
            text1.append(str(self.dir_count) + ' ' + _("Directories"))
        if self.mov_count > 0:
            text1.append(str(self.mov_count) + ' ' + _("Movies"))

        if len(text1) > 0:
            text += "  (" + ", ".join(text1) + ")"
        text = [text]

        #mount_path = self.getmount()
        # TODO temporary disabled, performance issue on mass storage devices
        if config.AdvancedMovieSelection.show_diskusage.value and os.path.exists(self.dir_path):
            total, used, free = diskUsage(self.dir_path)
            #text.append(_("Media:") + ' ' + str(mount_path))
            text.append(_("Total:") + ' ' + realSize(total, 3))
            text.append(_("Used:") + ' ' + realSize(used, 3))
            text.append(_("Free:") + ' ' + realSize(free, 3))
            real_path = os.path.realpath(self.dir_path) + os.sep
            if self.dir_path != real_path:
                text.append(_("Symlink:") + ' ' + real_path)
        
        return "\n".join(text)
 def getDBDescription(self):
     from MovieScanner import movieScanner
     self.dir_size = movieScanner.movielibrary.getSize()
     self.dir_count, self.mov_count = movieScanner.movielibrary.getFullCount()
     text1 = []
     
     if self.dir_size > -1:
         text1.append(realSize(self.dir_size, 3))
     if self.dir_count > 0:
         text1.append(str(self.dir_count) + ' ' + _("Directories"))
     if self.mov_count > 0:
         text1.append(str(self.mov_count) + ' ' + _("Movies"))
     
     result = ", ".join(text1)
     if movieScanner.last_update:
         result += "\r\n" + _("Last update:") + ' ' + movieScanner.getLastUpdate()
     
     return result
 def getDBDescription(self):
     from MovieScanner import movieScanner
     self.dir_size = movieScanner.movielibrary.getSize()
     self.dir_count, self.mov_count = movieScanner.movielibrary.getFullCount()
     text1 = []
     
     if self.dir_size > -1:
         text1.append(realSize(self.dir_size, 3))
     if self.dir_count > 0:
         text1.append(str(self.dir_count) + ' ' + _("Directories"))
     if self.mov_count > 0:
         text1.append(str(self.mov_count) + ' ' + _("Movies"))
     
     result = ", ".join(text1)
     if movieScanner.last_update:
         result += "\r\n" + _("Last update:") + ' ' + movieScanner.getLastUpdate()
     
     return result
#  This plugin is NOT free software. It is open source, you are allowed to
#  modify it (if you keep the license), but it may not be commercially
#  distributed other than under the conditions noted above.
#

from LocaleInit import _
from Tools.Directories import resolveFilename, SCOPE_HDD
from Components.config import config, ConfigSubsection, ConfigText, ConfigYesNo, ConfigInteger, ConfigSelection, ConfigClock, ConfigLocations, ConfigBoolean, ConfigPIN, ConfigDirectory
from Globals import printStackTrace
from enigma import eEnv

# configurations from enigma2 /Components/UsageConfig.py !!!don't edit default values from source!!!
config.usage.load_length_of_movies_in_moviellist = ConfigYesNo(default=True)
config.usage.on_movie_start = ConfigSelection(
    default="ask",
    choices=[("ask", _("Ask user")),
             ("resume", _("Resume from last position")),
             ("beginning", _("Start from the beginning"))])
config.usage.on_movie_stop = ConfigSelection(
    default="ask",
    choices=[("ask", _("Ask user")), ("movielist", _("Return to movie list")),
             ("quit", _("Return to previous service"))])
config.usage.on_movie_eof = ConfigSelection(
    default="ask",
    choices=[("ask", _("Ask user")), ("movielist", _("Return to movie list")),
             ("quit", _("Return to previous service")),
             ("pause", _("Pause movie at end")), ("standby", _("Standby")),
             ("shutdown", _("Shutdown"))])

config.AdvancedMovieSelection = ConfigSubsection()
config.AdvancedMovieSelection.last_selected_service = ConfigText(default="")
Exemple #7
0
#  Alternatively, this plugin may be distributed and executed on hardware which
#  is licensed by Dream Multimedia GmbH.
#
#  This plugin is NOT free software. It is open source, you are allowed to
#  modify it (if you keep the license), but it may not be commercially 
#  distributed other than under the conditions noted above.
#

from LocaleInit import _
from Tools.Directories import resolveFilename, SCOPE_HDD
from Components.config import config, ConfigSubsection, ConfigText, ConfigYesNo, ConfigInteger, ConfigSelection, ConfigClock, ConfigLocations, ConfigBoolean
from Globals import printStackTrace

# configurations from enigma2 /Components/UsageConfig.py !!!don't edit default values from source!!!
config.usage.load_length_of_movies_in_moviellist = ConfigYesNo(default=True)
config.usage.on_movie_start = ConfigSelection(default="ask", choices=[("ask", _("Ask user")), ("resume", _("Resume from last position")), ("beginning", _("Start from the beginning"))])
config.usage.on_movie_stop = ConfigSelection(default="ask", choices=[("ask", _("Ask user")), ("movielist", _("Return to movie list")), ("quit", _("Return to previous service"))])
config.usage.on_movie_eof = ConfigSelection(default="ask", choices=[("ask", _("Ask user")), ("movielist", _("Return to movie list")), ("quit", _("Return to previous service")), ("pause", _("Pause movie at end")), ("standby", _("Standby")), ("shutdown", _("Shutdown"))])

config.AdvancedMovieSelection = ConfigSubsection()
config.AdvancedMovieSelection.last_selected_service = ConfigText(default = "")
config.AdvancedMovieSelection.wastelist_buildtype = ConfigSelection(default="listMovies" , choices=[("listMovies", _("Only current location")), ("listAllMovies", _("Current location and all subdirectories")), ("listAllMoviesMedia", _("All directorys below '/media'")) ])
config.AdvancedMovieSelection.use_wastebasket = ConfigYesNo(default=False)
config.AdvancedMovieSelection.overwrite_left_right = ConfigYesNo(default=True)
config.AdvancedMovieSelection.sensibility = ConfigInteger(default=10, limits=(1, 100))
config.AdvancedMovieSelection.useseekbar = ConfigYesNo(default=False)
config.AdvancedMovieSelection.showinfo = ConfigYesNo(default=True)
config.AdvancedMovieSelection.showcoveroptions2 = ConfigYesNo(default=False)
config.AdvancedMovieSelection.exitprompt = ConfigYesNo(default=False)
config.AdvancedMovieSelection.exitkey = ConfigYesNo(default=False)
config.AdvancedMovieSelection.showtrailer = ConfigYesNo(default=False)
Exemple #8
0
#  This plugin is NOT free software. It is open source, you are allowed to
#  modify it (if you keep the license), but it may not be commercially
#  distributed other than under the conditions noted above.
#

from __future__ import print_function
from LocaleInit import _
from Tools.Directories import resolveFilename, SCOPE_HDD
from Components.config import config, ConfigSubsection, ConfigText, ConfigYesNo, ConfigInteger, ConfigSelection, ConfigClock, ConfigLocations, ConfigBoolean
from Globals import printStackTrace

# configurations from enigma2 /Components/UsageConfig.py !!!don't edit default values from source!!!
config.usage.load_length_of_movies_in_moviellist = ConfigYesNo(default=True)
config.usage.on_movie_start = ConfigSelection(
    default="ask",
    choices=[("ask", _("Ask user")),
             ("resume", _("Resume from last position")),
             ("beginning", _("Start from the beginning"))])
config.usage.on_movie_stop = ConfigSelection(
    default="ask",
    choices=[("ask", _("Ask user")), ("movielist", _("Return to movie list")),
             ("quit", _("Return to previous service"))])
config.usage.on_movie_eof = ConfigSelection(
    default="ask",
    choices=[("ask", _("Ask user")), ("movielist", _("Return to movie list")),
             ("quit", _("Return to previous service")),
             ("pause", _("Pause movie at end")), ("standby", _("Standby")),
             ("shutdown", _("Shutdown"))])

config.AdvancedMovieSelection = ConfigSubsection()
config.AdvancedMovieSelection.last_selected_service = ConfigText(default="")
#  Alternatively, this plugin may be distributed and executed on hardware which
#  is licensed by Dream Multimedia GmbH.
#
#  This plugin is NOT free software. It is open source, you are allowed to
#  modify it (if you keep the license), but it may not be commercially
#  distributed other than under the conditions noted above.
#

from LocaleInit import _
from Tools.Directories import resolveFilename, SCOPE_HDD
from Components.config import config, ConfigSubsection, ConfigText, ConfigYesNo, ConfigInteger, ConfigSelection, ConfigClock, ConfigLocations, ConfigBoolean
from Globals import printStackTrace

# configurations from enigma2 /Components/UsageConfig.py !!!don't edit default values from source!!!
config.usage.load_length_of_movies_in_moviellist = ConfigYesNo(default=True)
config.usage.on_movie_start = ConfigSelection(default="ask", choices=[("ask", _("Ask user")), ("resume", _("Resume from last position")), ("beginning", _("Start from the beginning"))])
config.usage.on_movie_stop = ConfigSelection(default="ask", choices=[("ask", _("Ask user")), ("movielist", _("Return to movie list")), ("quit", _("Return to previous service"))])
config.usage.on_movie_eof = ConfigSelection(default="ask", choices=[("ask", _("Ask user")), ("movielist", _("Return to movie list")), ("quit", _("Return to previous service")), ("pause", _("Pause movie at end")), ("standby", _("Standby")), ("shutdown", _("Shutdown"))])

config.AdvancedMovieSelection = ConfigSubsection()
config.AdvancedMovieSelection.last_selected_service = ConfigText(default="")
config.AdvancedMovieSelection.wastelist_buildtype = ConfigSelection(default="listMovies", choices=[("listMovies", _("Only current location")), ("listAllMovies", _("Current location and all subdirectories")), ("listAllMoviesMedia", _("All directorys below '/media'"))])
config.AdvancedMovieSelection.use_wastebasket = ConfigYesNo(default=False)
config.AdvancedMovieSelection.overwrite_left_right = ConfigYesNo(default=True)
config.AdvancedMovieSelection.sensibility = ConfigInteger(default=10, limits=(1, 100))
config.AdvancedMovieSelection.useseekbar = ConfigYesNo(default=False)
config.AdvancedMovieSelection.showinfo = ConfigYesNo(default=True)
config.AdvancedMovieSelection.showcoveroptions2 = ConfigYesNo(default=False)
config.AdvancedMovieSelection.exitprompt = ConfigYesNo(default=False)
config.AdvancedMovieSelection.exitkey = ConfigYesNo(default=False)
config.AdvancedMovieSelection.showtrailer = ConfigYesNo(default=False)