diff --git a/GlossMgr.py b/GlossMgr.py index 95a2a5c..5780ae0 100644 --- a/GlossMgr.py +++ b/GlossMgr.py @@ -13,6 +13,7 @@ class GlossMgr: self.menus = [] self.menuHistory = [] #A list that contains menus in the order that they've been viewed self.currentMenu = None + self.debug = False #Debug flag self.uiMsg = message(stage) self.themeMgr = ThemeMgr(self) diff --git a/ReflectionTexture.pyc b/ReflectionTexture.pyc index a8e257a..912ca32 100644 Binary files a/ReflectionTexture.pyc and b/ReflectionTexture.pyc differ diff --git a/Spinner.pyc b/Spinner.pyc index efe0e92..3b9744a 100644 Binary files a/Spinner.pyc and b/Spinner.pyc differ diff --git a/gloss.py b/gloss.py index 418af61..2af2942 100644 --- a/gloss.py +++ b/gloss.py @@ -26,17 +26,17 @@ from GlossMgr import GlossMgr from myth.MythMySQL import mythDB class MainApp: - def __init__ (self): + def __init__ (self, args): gtk.gdk.threads_init() clutter.threads_init() + self.args = args + self.stage = clutter.stage_get_default() self.stage.set_color(clutter.color_parse('Black')) - #self.stage.set_size(800, 600) self.stage.set_property("fullscreen", True) self.stage.connect('button-press-event', self.on_button_press_event) self.stage.show_all() - #clutter.main() #hide the cursor self.stage.hide_cursor() @@ -52,6 +52,12 @@ class MainApp: def loadGloss(self): self.glossMgr = GlossMgr(self.stage) + + #loop through the args + for arg in self.args: + if arg == "--debug": + print "Using debug mode" + self.glossMgr.debug = True #Update splash status msg self.splashScreen.set_msg("Creating menus") @@ -98,7 +104,7 @@ class MainApp: clutter.main() def main (args): - app = MainApp() + app = MainApp(args) #app.loadGloss() app.run() diff --git a/modules/myth_tv_player/tv_db_controller.py b/modules/myth_tv_player/tv_db_controller.py index 77bf48c..fa5107f 100644 --- a/modules/myth_tv_player/tv_db_controller.py +++ b/modules/myth_tv_player/tv_db_controller.py @@ -68,7 +68,7 @@ class channel: self.atsc_minor_chan = mythObject[25] self.last_record = mythObject[26] except IndexError, e: - print "Found difference in DB structure. Attempting to continue." + print "TV_Player: Found difference in DB structure for channels. Attempting to continue." class show: @@ -107,4 +107,4 @@ class show: self.first = mythObject[27] self.last = mythObject[28] except IndexError, e: - print "Found difference in DB structure. Attempting to continue." \ No newline at end of file + print "TV_Player: Found difference in DB structure for show. Attempting to continue." \ No newline at end of file diff --git a/modules/video_player/video_player.py b/modules/video_player/video_player.py index 7bf7e5d..1c9c308 100644 --- a/modules/video_player/video_player.py +++ b/modules/video_player/video_player.py @@ -35,6 +35,12 @@ class Module(): foldersPosX = 50 foldersPosX = 50 cover_size = int(coverViewerWidth / coverViewerColumns) + + #Basic UI elements + currentViewer = None + backdrop = None + video_details = None + covers_background = None def __init__(self, glossMgr, dbMgr): self.stage = glossMgr.get_stage() @@ -53,6 +59,8 @@ class Module(): #This block can be moved to begin() but causes a performance hit when loading the module *shrug* #All it does is load the initial folders into the viewers self.baseDir = dbMgr.get_setting("VideoStartupDir") + if self.glossMgr.debug: print "VideoPlayer: Base directory=" + str(self.baseDir) + self.cwd = self.baseDir self.folder_level = 0 self.base_folder_menu = folderMenu(glossMgr, self.coverViewerRows, self.folders_cover_size) @@ -104,10 +112,10 @@ class Module(): try: new_file_list = os.listdir(dirPath) except os.error, (errno, errstr): - self.glossMgr.display_msg("File Error", "Could not load Slideshow directory") + self.glossMgr.display_msg("VideoPlayer File Error", "Could not load Video directory") return - #Images and Directories + #Videos and Directories for dir_entry in new_file_list: tempPath = dirPath + "/" + dir_entry if os.path.isdir(tempPath) and not ( dir_entry[0] == "."): @@ -117,13 +125,13 @@ class Module(): def loadDir(self, dirPath, cover_viewer): if not os.path.isdir(dirPath): - print "ERROR: Invalid path" + print "ERROR VideoPlayer: Invalid video path" return None final_file_list = [] new_file_list = os.listdir(dirPath) - #Images and Directories + #Videos and Directories for dir_entry in new_file_list: if os.path.isdir(dirPath + "/" + dir_entry) and not ( dir_entry[0] == "."): cover_viewer.add_folder(dir_entry) @@ -148,7 +156,9 @@ class Module(): sqlLength = int(len(sql) - 2) sql = sql[:sqlLength] sql = sql + ")" - #print sql + + if self.glossMgr.debug: print "Video SQL: " + sql + results = self.dbMgr.run_sql(sql) #Check for null return diff --git a/myth/MythMySQL.pyc b/myth/MythMySQL.pyc index 0a399c9..5a61a8d 100644 Binary files a/myth/MythMySQL.pyc and b/myth/MythMySQL.pyc differ diff --git a/myth/__init__.pyc b/myth/__init__.pyc index 26db0a2..05c531d 100644 Binary files a/myth/__init__.pyc and b/myth/__init__.pyc differ