msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-05-26 11:40+0200\n"
+"POT-Creation-Date: 2009-05-28 09:30+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../src/MyTubeSearch.py:308
+#: ../src/MyTubeSearch.py:309
msgid " Results"
msgstr ""
-#: ../src/plugin.py:1049 ../src/plugin.py:1218
+#: ../src/plugin.py:1104 ../src/plugin.py:1270
msgid "Added: "
msgstr ""
msgid "All Time"
msgstr ""
-#: ../src/plugin.py:413
+#: ../src/plugin.py:423
msgid "An error occured."
msgstr ""
-#: ../src/MyTubeSearch.py:228
-msgid "Ascanding"
-msgstr ""
-
-#: ../src/plugin.py:116
+#: ../src/MyTubeSearch.py:228 ../src/plugin.py:116
msgid "Ascending"
msgstr ""
-#: ../src/MyTubeSearch.py:248 ../src/MyTubeSearch.py:251 ../src/plugin.py:135
-#: ../src/plugin.py:138
+#: ../src/MyTubeSearch.py:249 ../src/MyTubeSearch.py:252 ../src/plugin.py:136
+#: ../src/plugin.py:139
msgid "Ask user"
msgstr ""
msgid "Australia"
msgstr ""
-#: ../src/plugin.py:1215
+#: ../src/plugin.py:1267
msgid "Author: "
msgstr ""
msgid "Canada"
msgstr ""
-#: ../src/MyTubeSearch.py:449
+#: ../src/MyTubeSearch.py:455
msgid "Choose target folder"
msgstr ""
-#: ../src/MyTubeSearch.py:392 ../src/MyTubeSearch.py:547 ../src/plugin.py:267
-#: ../src/plugin.py:1156 ../src/plugin.py:1346
+#: ../src/MyTubeSearch.py:433
+msgid "Clear history on Exit:"
+msgstr ""
+
+#: ../src/MyTubeSearch.py:393 ../src/MyTubeSearch.py:558 ../src/plugin.py:269
+#: ../src/plugin.py:1209 ../src/plugin.py:1398
msgid "Close"
msgstr ""
msgid "Descending"
msgstr ""
-#: ../src/MyTubeSearch.py:412
+#: ../src/MyTubeSearch.py:414
msgid "Display search results by:"
msgstr ""
-#: ../src/plugin.py:679
+#: ../src/plugin.py:719
msgid "Do you want to see more entries?"
msgstr ""
-#: ../src/plugin.py:457
+#: ../src/plugin.py:485
msgid "Download Video"
msgstr ""
-#: ../src/MyTubeSearch.py:425
+#: ../src/MyTubeSearch.py:430
msgid "Download location"
msgstr ""
-#: ../src/plugin.py:1186
+#: ../src/plugin.py:1238
msgid "Downloading screenshots. Please wait..."
msgstr ""
-#: ../src/plugin.py:1049 ../src/plugin.py:1212
+#: ../src/plugin.py:1104 ../src/plugin.py:1264
msgid "Duration: "
msgstr ""
msgid "Education"
msgstr ""
-#: ../src/plugin.py:497
+#: ../src/plugin.py:526
msgid "Enter your search term(s)"
msgstr ""
msgid "Entertainment"
msgstr ""
-#: ../src/plugin.py:350 ../src/plugin.py:404
+#: ../src/plugin.py:371 ../src/plugin.py:413
msgid "Fetching feed entries"
msgstr ""
-#: ../src/plugin.py:409
+#: ../src/plugin.py:418
msgid "Fetching search entries"
msgstr ""
msgid "Great Britain"
msgstr ""
-#: ../src/plugin.py:1364
-msgid "Help"
+#: ../src/MyTubeSearch.py:237 ../src/plugin.py:125 ../src/plugin.py:752
+msgid "HD videos"
msgstr ""
-#: ../src/MyTubeSearch.py:236 ../src/plugin.py:124 ../src/plugin.py:710
-msgid "High definition"
+#: ../src/plugin.py:1416
+msgid "Help"
msgstr ""
-#: ../src/plugin.py:269
+#: ../src/plugin.py:271
msgid "History"
msgstr ""
msgid "Japan"
msgstr ""
+#: ../src/MyTubeSearch.py:418
+msgid "Load feed on startup:"
+msgstr ""
+
#: ../src/MyTubeSearch.py:216 ../src/plugin.py:104
msgid "Mexico"
msgstr ""
-#: ../src/plugin.py:874
+#: ../src/plugin.py:929
msgid "More video entries."
msgstr ""
-#: ../src/MyTubeSearch.py:242 ../src/plugin.py:130 ../src/plugin.py:717
+#: ../src/MyTubeSearch.py:241 ../src/plugin.py:129 ../src/plugin.py:759
msgid "Most discussed"
msgstr ""
-#: ../src/MyTubeSearch.py:243 ../src/plugin.py:131 ../src/plugin.py:718
+#: ../src/MyTubeSearch.py:243 ../src/plugin.py:131 ../src/plugin.py:760
msgid "Most linked"
msgstr ""
-#: ../src/MyTubeSearch.py:240 ../src/plugin.py:128 ../src/plugin.py:715
+#: ../src/plugin.py:757
msgid "Most popular"
msgstr ""
-#: ../src/MyTubeSearch.py:241 ../src/plugin.py:129 ../src/plugin.py:716
+#: ../src/MyTubeSearch.py:245 ../src/plugin.py:133 ../src/plugin.py:758
msgid "Most recent"
msgstr ""
-#: ../src/MyTubeSearch.py:244 ../src/plugin.py:132 ../src/plugin.py:719
+#: ../src/MyTubeSearch.py:244 ../src/plugin.py:132 ../src/plugin.py:762
msgid "Most responded"
msgstr ""
-#: ../src/MyTubeSearch.py:239 ../src/plugin.py:127 ../src/plugin.py:714
+#: ../src/MyTubeSearch.py:238 ../src/plugin.py:126 ../src/plugin.py:756
msgid "Most viewed"
msgstr ""
msgid "Music"
msgstr ""
-#: ../src/plugin.py:1686
+#: ../src/plugin.py:1738
msgid "My TubePlayer"
msgstr ""
-#: ../src/plugin.py:442 ../src/plugin.py:449
+#: ../src/plugin.py:472 ../src/plugin.py:478
msgid "MyTube Settings"
msgstr ""
-#: ../src/plugin.py:363
+#: ../src/plugin.py:384
msgid "MyTubePlayer"
msgstr ""
-#: ../src/plugin.py:369 ../src/plugin.py:371 ../src/plugin.py:381
+#: ../src/plugin.py:450 ../src/plugin.py:452 ../src/plugin.py:459
msgid "MyTubePlayer Help"
msgstr ""
-#: ../src/MyTubeSearch.py:560 ../src/MyTubeSearch.py:577
+#: ../src/MyTubeSearch.py:571 ../src/MyTubeSearch.py:588
msgid "MyTubePlayer active video downloads"
msgstr ""
-#: ../src/MyTubeSearch.py:405 ../src/MyTubeSearch.py:408
+#: ../src/MyTubeSearch.py:407 ../src/MyTubeSearch.py:410
msgid "MyTubePlayer settings"
msgstr ""
-#: ../src/plugin.py:1227
+#: ../src/plugin.py:1279
msgid "MyTubeVideoInfoScreen"
msgstr ""
-#: ../src/plugin.py:1373
+#: ../src/plugin.py:1425
msgid "MyTubeVideohelpScreen"
msgstr ""
msgid "News & Politics"
msgstr ""
-#: ../src/MyTubeSearch.py:176 ../src/plugin.py:64 ../src/plugin.py:532
-#: ../src/plugin.py:538
+#: ../src/MyTubeSearch.py:176 ../src/plugin.py:64 ../src/plugin.py:571
+#: ../src/plugin.py:577
msgid "No"
msgstr ""
-#: ../src/plugin.py:1650
+#: ../src/plugin.py:1702
msgid "No playable video found! Stop playing this movie?"
msgstr ""
-#: ../src/plugin.py:1643
+#: ../src/plugin.py:429
+msgid "No videos to display"
+msgstr ""
+
+#: ../src/plugin.py:1695
msgid "No, but play video again"
msgstr ""
-#: ../src/plugin.py:533
+#: ../src/plugin.py:572
msgid "No, but switch to video entries."
msgstr ""
-#: ../src/plugin.py:539
+#: ../src/plugin.py:578
msgid "No, but switch to video search."
msgstr ""
msgid "Nonprofits & Activism"
msgstr ""
+#: ../src/plugin.py:433
+msgid "Not fetching feed entries"
+msgstr ""
+
#: ../src/MyTubeSearch.py:190 ../src/plugin.py:78
msgid "People & Blogs"
msgstr ""
msgid "Pets & Animals"
msgstr ""
-#: ../src/plugin.py:1687
+#: ../src/plugin.py:1739
msgid "Play YouTube movies"
msgstr ""
-#: ../src/MyTubeSearch.py:248 ../src/plugin.py:135
+#: ../src/MyTubeSearch.py:249 ../src/plugin.py:136
msgid "Play next video"
msgstr ""
-#: ../src/MyTubeSearch.py:248 ../src/plugin.py:135
+#: ../src/MyTubeSearch.py:249 ../src/plugin.py:136
msgid "Play video again"
msgstr ""
+#: ../src/plugin.py:433
+msgid "Please enter your search term."
+msgstr ""
+
+#: ../src/plugin.py:429
+msgid "Please select a standard feed or try searching for videos."
+msgstr ""
+
#: ../src/MyTubeSearch.py:218 ../src/plugin.py:106
msgid "Poland"
msgstr ""
msgid "Rating"
msgstr ""
-#: ../src/plugin.py:1049
+#: ../src/plugin.py:1104
msgid "Ratings: "
msgstr ""
-#: ../src/plugin.py:541
+#: ../src/plugin.py:580
msgid "Really quit MyTube Player?"
msgstr ""
-#: ../src/plugin.py:881
+#: ../src/MyTubeSearch.py:240 ../src/plugin.py:128 ../src/plugin.py:761
+msgid "Recently featured"
+msgstr ""
+
+#: ../src/plugin.py:936
msgid "Related video entries."
msgstr ""
msgid "Relevance"
msgstr ""
-#: ../src/plugin.py:888
+#: ../src/plugin.py:943
msgid "Response video entries."
msgstr ""
-#: ../src/MyTubeSearch.py:248 ../src/MyTubeSearch.py:251 ../src/plugin.py:135
-#: ../src/plugin.py:138
+#: ../src/MyTubeSearch.py:249 ../src/MyTubeSearch.py:252 ../src/plugin.py:136
+#: ../src/plugin.py:139
msgid "Return to movie list"
msgstr ""
msgid "Russia"
msgstr ""
-#: ../src/MyTubeSearch.py:393
+#: ../src/MyTubeSearch.py:394
msgid "Save"
msgstr ""
msgid "Science & Technology"
msgstr ""
-#: ../src/plugin.py:1157
-msgid "Search"
-msgstr ""
-
-#: ../src/plugin.py:424
+#: ../src/plugin.py:388
msgid "Search Term(s)"
msgstr ""
-#: ../src/MyTubeSearch.py:414
+#: ../src/MyTubeSearch.py:416
msgid "Search category:"
msgstr ""
-#: ../src/MyTubeSearch.py:415
+#: ../src/MyTubeSearch.py:417
msgid "Search region:"
msgstr ""
-#: ../src/MyTubeSearch.py:413
+#: ../src/MyTubeSearch.py:415
msgid "Search restricted content:"
msgstr ""
-#: ../src/plugin.py:721
+#: ../src/plugin.py:764
msgid "Select new feed to view."
msgstr ""
-#: ../src/plugin.py:446 ../src/plugin.py:462
+#: ../src/plugin.py:475 ../src/plugin.py:490
msgid "Select your choice."
msgstr ""
msgid "Short Movies"
msgstr ""
-#: ../src/plugin.py:650
+#: ../src/plugin.py:684
msgid "Sorry, video is not available!"
msgstr ""
msgid "Sports"
msgstr ""
-#: ../src/MyTubeSearch.py:416
+#: ../src/MyTubeSearch.py:421
msgid "Start with following feed:"
msgstr ""
-#: ../src/plugin.py:268
+#: ../src/plugin.py:270
msgid "Std. Feeds"
msgstr ""
-#: ../src/plugin.py:1648
+#: ../src/plugin.py:1700
msgid "Stop playing this movie?"
msgstr ""
msgid "Sweden"
msgstr ""
-#: ../src/plugin.py:1224
+#: ../src/plugin.py:1276
msgid "Tags: "
msgstr ""
msgid "Taiwan"
msgstr ""
-#: ../src/plugin.py:413
-msgid "There was an error getting the feed entries. Try again..."
+#: ../src/plugin.py:423
+msgid "There was an error getting the feed entries. Please try again."
msgstr ""
#: ../src/MyTubeSearch.py:169 ../src/plugin.py:57
msgid "This Week"
msgstr ""
-#: ../src/plugin.py:1368
+#: ../src/plugin.py:1420
msgid "This is the help screen. Feed me with something to display."
msgstr ""
msgid "Today"
msgstr ""
-#: ../src/MyTubeSearch.py:238 ../src/plugin.py:126 ../src/plugin.py:713
+#: ../src/MyTubeSearch.py:242 ../src/plugin.py:130 ../src/plugin.py:755
msgid "Top favorites"
msgstr ""
-#: ../src/MyTubeSearch.py:237 ../src/plugin.py:125 ../src/plugin.py:712
+#: ../src/MyTubeSearch.py:239 ../src/plugin.py:127 ../src/plugin.py:754
msgid "Top rated"
msgstr ""
msgid "Travel & Events"
msgstr ""
-#: ../src/plugin.py:350 ../src/plugin.py:404
+#: ../src/plugin.py:371 ../src/plugin.py:413
msgid "Trying to download the Youtube feed entries. Please wait..."
msgstr ""
-#: ../src/plugin.py:409
+#: ../src/plugin.py:418
msgid "Trying to download the Youtube search results. Please wait..."
msgstr ""
msgid "United States"
msgstr ""
-#: ../src/MyTubeSearch.py:418
+#: ../src/MyTubeSearch.py:423
msgid "Videobrowser exit behavior:"
msgstr ""
-#: ../src/MyTubeSearch.py:417
+#: ../src/MyTubeSearch.py:422
msgid "Videoplayer stop/exit behavior:"
msgstr ""
msgid "View Count"
msgstr ""
-#: ../src/plugin.py:458
+#: ../src/plugin.py:486
msgid "View Downloads"
msgstr ""
-#: ../src/plugin.py:451
+#: ../src/plugin.py:480
msgid "View related videos"
msgstr ""
-#: ../src/plugin.py:452
+#: ../src/plugin.py:481
msgid "View response videos"
msgstr ""
-#: ../src/plugin.py:443 ../src/plugin.py:453
-msgid "View standard feed"
-msgstr ""
-
-#: ../src/plugin.py:1049 ../src/plugin.py:1221
+#: ../src/plugin.py:1104 ../src/plugin.py:1273
msgid "Views: "
msgstr ""
-#: ../src/plugin.py:258
+#: ../src/plugin.py:260
msgid ""
"Welcome to the MyTube Youtube Player.\n"
"\n"
"The Help button shows this help again."
msgstr ""
-#: ../src/plugin.py:257
+#: ../src/plugin.py:259
msgid ""
"Welcome to the MyTube Youtube Player.\n"
"\n"
"Press exit to get back to the input field."
msgstr ""
-#: ../src/MyTubeSearch.py:175 ../src/plugin.py:63 ../src/plugin.py:531
-#: ../src/plugin.py:537 ../src/plugin.py:1642
+#: ../src/MyTubeSearch.py:175 ../src/plugin.py:63 ../src/plugin.py:570
+#: ../src/plugin.py:576 ../src/plugin.py:1694
msgid "Yes"
msgstr ""
-#: ../src/plugin.py:1644
+#: ../src/plugin.py:1696
msgid "Yes, but play next video"
msgstr ""
-#: ../src/plugin.py:1645
+#: ../src/plugin.py:1697
msgid "Yes, but play previous video"
msgstr ""
config.plugins.mytube.general = ConfigSubsection()
config.plugins.mytube.general.showHelpOnOpen = ConfigYesNo(default = True)
+config.plugins.mytube.general.loadFeedOnOpen = ConfigYesNo(default = True)
config.plugins.mytube.general.startFeed = ConfigSelection(
[
- ("hd", _("High definition")),
- ("top_rated", _("Top rated")),
- ("top_favorites", _("Top favorites")),
+ ("hd", _("HD videos")),
("most_viewed", _("Most viewed")),
- ("most_popular", _("Most popular")),
- ("most_recent", _("Most recent")),
+ ("top_rated", _("Top rated")),
+ ("recently_featured", _("Recently featured")),
("most_discussed", _("Most discussed")),
- ("top_favorites", _("Most linked")),
- ("most_linked", _("Most responded"))
- ], "most_popular")
+ ("top_favorites", _("Top favorites")),
+ ("most_linked", _("Most linked")),
+ ("most_responded", _("Most responded")),
+ ("most_recent", _("Most recent"))
+ ], "most_viewed")
config.plugins.mytube.general.on_movie_stop = ConfigSelection(default = "ask", choices = [
("ask", _("Ask user")), ("quit", _("Return to movie list")), ("playnext", _("Play next video")), ("playagain", _("Play video again")) ])
tmp.append(default)
config.plugins.mytube.general.videodir = ConfigSelection(default = default, choices = tmp)
config.plugins.mytube.general.history = ConfigText(default="")
+config.plugins.mytube.general.clearHistoryOnClose = ConfigYesNo(default = False)
#config.plugins.mytube.general.useHTTPProxy = ConfigYesNo(default = False)
#config.plugins.mytube.general.ProxyIP = ConfigIP(default=[0,0,0,0])
#config.plugins.mytube.general.ProxyPort = ConfigNumber(default=8080)
MultiContentEntryText(pos = (400, 43), size = (200, 18), font=1, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 8), # index 8 is the ratingcount
]),
"state": (77,[
- MultiContentEntryText(pos = (10, 1), size = (500, 28), font=2, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 0), # index 0 is the name
- MultiContentEntryText(pos = (10, 22), size = (500, 46), font=3, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 1), # index 2 is the description
+ MultiContentEntryText(pos = (10, 1), size = (560, 28), font=2, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 0), # index 0 is the name
+ MultiContentEntryText(pos = (10, 22), size = (560, 46), font=3, flags = RT_HALIGN_LEFT | RT_VALIGN_TOP| RT_WRAP, text = 1), # index 2 is the description
])
},
"fonts": [gFont("Regular", 22),gFont("Regular", 18),gFont("Regular", 26),gFont("Regular", 20)],
"ok": self.keyOK,
"back": self.switchToConfigList,
"red": self.switchToConfigList,
- #"prevBouquet": self.switchToFeedList,
+ "nextBouquet": self.switchToConfigList,
+ "prevBouquet": self.switchToFeedList,
"up": self.keyUp,
"down": self.keyDown,
"left": self.keyLeft,
"menu" : self.handleMenu,
}, -2)
- self["statusactions"] = ActionMap(["WizardActions"],
+ self["statusactions"] = ActionMap(["ShortcutActions", "WizardActions", "HelpActions", "MediaPlayerActions"],
{
"back": self.leavePlayer,
"red": self.leavePlayer,
"nextBouquet": self.switchToConfigList,
+ "green": self.keyStdFeed,
+ "yellow": self.handleHistory,
+ }, -2)
+
+ self["historyactions"] = ActionMap(["ShortcutActions", "WizardActions", "MediaPlayerActions", "MovieSelectionActions", "HelpActions"],
+ {
+ "ok": self.keyOK,
+ "back": self.closeHistory,
+ "red": self.closeHistory,
+ "yellow": self.handleHistory,
+ "up": self.keyUp,
+ "down": self.keyDown,
+ "left": self.keyLeft,
+ "right": self.keyRight,
}, -2)
self["videoactions"].setEnabled(False)
self["statusactions"].setEnabled(False)
+ self["historyactions"].setEnabled(False)
self.timer = eTimer()
self.timer.callback.append(self.picloadTimeout)
self.SearchConfigEntry = None
self.searchContextEntries = []
+ config.plugins.mytube.search.searchTerm.value = ""
ConfigListScreen.__init__(self, self.searchContextEntries, session)
self.createSetup()
self.onLayoutFinish.append(self.layoutFinished)
def layoutFinished(self):
self.currList = "status"
- self["key_green"].hide()
- self.statuslist = []
- self.statuslist.append(( _("Fetching feed entries"), _("Trying to download the Youtube feed entries. Please wait..." ) ))
- self["feedlist"].style = "state"
- self['feedlist'].setList(self.statuslist)
+ #self["key_green"].hide()
current = self["config"].getCurrent()
if current[1].help_window.instance is not None:
current[1].help_window.instance.hide()
- self.Timer.start(500)
+ self.statuslist.append(( _("Fetching feed entries"), _("Trying to download the Youtube feed entries. Please wait..." ) ))
+ self["feedlist"].style = "state"
+ self['feedlist'].setList(self.statuslist)
+ self.Timer.start(200)
def TimerFire(self):
self.Timer.stop()
- self.setState('getFeed')
+ if config.plugins.mytube.general.loadFeedOnOpen.value:
+ self.setState('getFeed')
+ else:
+ self.setState('byPass')
def setWindowTitle(self):
self.setTitle(_("MyTubePlayer"))
- def handleHelpWindow(self):
- print "[handleHelpWindow]"
- if self.currList == "configlist":
- self.hideSuggestions()
- self.session.openWithCallback(self.searchHelpClosed, MyTubeVideoHelpScreen, self.skin_path, wantedinfo = self.searchtext, wantedtitle = _("MyTubePlayer Help") )
- elif self.currList == "feedlist":
- self.session.open(MyTubeVideoHelpScreen, self.skin_path, wantedinfo = self.feedtext, wantedtitle = _("MyTubePlayer Help") )
-
- def searchHelpClosed(self):
- self.switchToConfigList()
+ def createSetup(self):
+ self.searchContextEntries = []
+ self.SearchConfigEntry = getConfigListEntry(_("Search Term(s)"), config.plugins.mytube.search.searchTerm)
+ self.searchContextEntries.append(self.SearchConfigEntry)
+ self["config"].list = self.searchContextEntries
+ self["config"].l.setList(self.searchContextEntries)
- def handleFirstHelpWindow(self):
- print "[handleFirstHelpWindow]"
- if config.plugins.mytube.general.showHelpOnOpen.value is True:
- if self.currList == "configlist":
- self.hideSuggestions()
- self.session.openWithCallback(self.firstRunHelpClosed, MyTubeVideoHelpScreen, self.skin_path,wantedinfo = self.feedtext, wantedtitle = _("MyTubePlayer Help") )
- else:
- self.FirstRun = False
-
- def firstRunHelpClosed(self):
- if self.FirstRun == True:
- self.FirstRun = False
- self.switchToConfigList()
-
def setState(self,status = None):
if status:
+ if self.FirstRun == True:
+ self.appendEntries = False
+ myTubeService.startService()
+ self.currList = "status"
+ self.statuslist = []
self["videoactions"].setEnabled(False)
self["searchactions"].setEnabled(False)
- self["key_green"].hide()
- self.hideSuggestions()
+ #self["key_green"].hide()
self["config_actions"].setEnabled(False)
+ self["historyactions"].setEnabled(False)
self["statusactions"].setEnabled(True)
+ self["ButtonBlue"].hide()
+ self["VKeyIcon"].hide()
if self.HistoryWindow is not None:
self.HistoryWindow.deactivate()
self.HistoryWindow.instance.hide()
- self.currList = "status"
- self.statuslist = []
if status == 'getFeed':
+ self.hideSuggestions()
self.statuslist.append(( _("Fetching feed entries"), _("Trying to download the Youtube feed entries. Please wait..." ) ))
- print "self.statuslist",self.statuslist
self["feedlist"].style = "state"
self['feedlist'].setList(self.statuslist)
- if status == 'getSearchFeed':
+ elif status == 'getSearchFeed':
+ self.hideSuggestions()
self.statuslist.append(( _("Fetching search entries"), _("Trying to download the Youtube search results. Please wait..." ) ))
self["feedlist"].style = "state"
self['feedlist'].setList(self.statuslist)
- if status == 'Error':
- self.statuslist.append(( _("An error occured."), _("There was an error getting the feed entries. Try again..." ) ))
+ elif status == 'Error':
+ self.hideSuggestions()
+ self.statuslist.append(( _("An error occured."), _("There was an error getting the feed entries. Please try again." ) ))
self["feedlist"].style = "state"
self['feedlist'].setList(self.statuslist)
+ elif status == 'noVideos':
+ self["key_green"].show()
+ self.hideSuggestions()
+ self.statuslist.append(( _("No videos to display"), _("Please select a standard feed or try searching for videos." ) ))
+ self["feedlist"].style = "state"
+ self['feedlist'].setList(self.statuslist)
+ elif status == 'byPass':
+ self.statuslist.append(( _("Not fetching feed entries"), _("Please enter your search term." ) ))
+ self["feedlist"].style = "state"
+ self['feedlist'].setList(self.statuslist)
+ self.switchToConfigList()
if self.FirstRun == True:
- self.appendEntries = False
- myTubeService.startService()
- self.FeedURL = self.BASE_STD_FEEDURL + str(config.plugins.mytube.general.startFeed.value)
- self.getFeed(self.FeedURL, str(config.plugins.mytube.general.startFeed.value))
+ if config.plugins.mytube.general.loadFeedOnOpen.value:
+ if config.plugins.mytube.general.startFeed.value == 'hd':
+ self.FeedURL = "http://gdata.youtube.com/feeds/api/videos/-/HD"
+ else:
+ self.FeedURL = self.BASE_STD_FEEDURL + str(config.plugins.mytube.general.startFeed.value)
+ self.getFeed(self.FeedURL, str(config.plugins.mytube.general.startFeed.value))
- def createSetup(self):
- self.searchContextEntries = []
- self.SearchConfigEntry = getConfigListEntry(_("Search Term(s)"), config.plugins.mytube.search.searchTerm)
- self.searchContextEntries.append(self.SearchConfigEntry)
- self["config"].list = self.searchContextEntries
- self["config"].l.setList(self.searchContextEntries)
- self["config"].onSelectionChanged.append(self.selectionChanged)
- def selectionChanged(self):
- current = self["config"].getCurrent()
- if current:
- if current == self.SearchConfigEntry:
- helpwindowpos = self["HelpWindow"].getPosition()
- if current[1].help_window.instance is not None:
- current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1]))
+ def handleHelpWindow(self):
+ print "[handleHelpWindow]"
+ if self.currList == "configlist":
+ self.hideSuggestions()
+ self.session.openWithCallback(self.ScreenClosed, MyTubeVideoHelpScreen, self.skin_path, wantedinfo = self.searchtext, wantedtitle = _("MyTubePlayer Help") )
+ elif self.currList == "feedlist":
+ self.session.openWithCallback(self.ScreenClosed, MyTubeVideoHelpScreen, self.skin_path, wantedinfo = self.feedtext, wantedtitle = _("MyTubePlayer Help") )
+
+ def handleFirstHelpWindow(self):
+ print "[handleFirstHelpWindow]"
+ if config.plugins.mytube.general.showHelpOnOpen.value is True:
+ if self.currList == "configlist":
+ self.hideSuggestions()
+ self.session.openWithCallback(self.firstRunHelpClosed, MyTubeVideoHelpScreen, self.skin_path,wantedinfo = self.feedtext, wantedtitle = _("MyTubePlayer Help") )
+ else:
+ self.FirstRun = False
+
+ def firstRunHelpClosed(self):
+ if self.FirstRun == True:
+ self.FirstRun = False
+ self.switchToConfigList()
def handleMenu(self):
print "currlist im HandleMenu:",self.currList
if self.currList == "configlist":
menulist = (
(_("MyTube Settings"), "settings"),
- (_("View standard feed"), "stdfeed"),
)
self.hideSuggestions()
self.session.openWithCallback(self.openMenu, ChoiceBox, title=_("Select your choice."), list = menulist)
menulist = [(_("MyTube Settings"), "settings")]
menulist.extend((
(_("View related videos"), "related"),
- (_("View response videos"), "response"),
- (_("View standard feed"), "stdfeed")
+ (_("View response videos"), "response")
))
if config.usage.setup_level.index >= 2: # expert+
menulist.extend((
(_("Download Video"), "download"),
(_("View Downloads"), "downview")
))
-
+
self.hideSuggestions()
self.session.openWithCallback(self.openMenu, ChoiceBox, title=_("Select your choice."), list = menulist)
print "openMenu - ANSWER",answer
if answer == "settings":
print "settings selected"
- self.session.open(MyTubeSettingsScreen, self.skin_path )
- elif answer == "stdfeed":
- self.keyStdFeed()
+ self.session.openWithCallback(self.ScreenClosed,MyTubeSettingsScreen, self.skin_path )
elif answer == "related":
current = self["feedlist"].getCurrent()[0]
self.setState('getFeed')
for job in job_manager.getPendingJobs():
self.tasklist.append((job,job.name,job.getStatustext(),int(100*job.progress/float(job.end)) ,str(100*job.progress/float(job.end)) + "%" ))
self.session.open(MyTubeTasksScreen, self.skin_path , self.tasklist)
-
+ elif answer == None:
+ print "No menuentry selected, we should just switch back to old state."
+ self.ScreenClosed()
+
def openKeyboard(self):
self.hideSuggestions()
self.session.openWithCallback(self.SearchEntryCallback, VirtualKeyBoard, title = (_("Enter your search term(s)")), text = config.plugins.mytube.search.searchTerm.value)
+ def ScreenClosed(self):
+ print "ScreenCLosed, restoring old window state"
+ if self.currList == "historylist":
+ if self.HistoryWindow.status() is False:
+ print "status is FALSE"
+ self.HistoryWindow.activate()
+ self.HistoryWindow.instance.show()
+ elif self.currList == "configlist":
+ self.switchToConfigList()
+ ConfigListScreen.keyOK(self)
+ elif self.currList == "feedlist":
+ self.switchToFeedList()
+
def SearchEntryCallback(self, callback = None):
if callback is not None and len(callback):
config.plugins.mytube.search.searchTerm.value = callback
print "openStandardFeedClosed - ANSWER",answer
if answer is not None:
if answer == 'hd':
- self.setState('getFeed')
- self.appendEntries = False
self.FeedURL = "http://gdata.youtube.com/feeds/api/videos/-/HD"
- self.getFeed(self.FeedURL, str(answer))
else:
- self.setState('getFeed')
- self.appendEntries = False
self.FeedURL = self.BASE_STD_FEEDURL + str(answer)
- self.getFeed(self.FeedURL, str(answer))
+ self.setState('getFeed')
+ self.appendEntries = False
+ self.getFeed(self.FeedURL, str(answer))
def handleLeave(self, how):
self.is_closing = True
config.plugins.mytube.general.showHelpOnOpen.value = False
config.plugins.mytube.general.showHelpOnOpen.save()
print "self.History im doQuit:",self.History
- if self.History and len(self.History):
- config.plugins.mytube.general.history.value = ",".join(self.History)
+ if not config.plugins.mytube.general.clearHistoryOnClose.value:
+ if self.History and len(self.History):
+ config.plugins.mytube.general.history.value = ",".join(self.History)
+ else:
+ config.plugins.mytube.general.history.value = ""
config.plugins.mytube.general.history.save()
config.plugins.mytube.general.save()
config.plugins.mytube.save()
self["config"].getCurrent()[1].deactivateSuggestionList()
self.setState('getSearchFeed')
self.runSearch(searchContext)
- elif self.currList == "historylist":
- config.plugins.mytube.search.searchTerm.value = self.HistoryWindow.getSelection()
- self["config"].invalidateCurrent()
- if config.plugins.mytube.search.searchTerm.value != "":
- searchContext = config.plugins.mytube.search.searchTerm.value
- print "Search searchcontext",searchContext
- self.setState('getSearchFeed')
- self.runSearch(searchContext)
elif self.currList == "feedlist":
current = self[self.currList].getCurrent()
if current:
self.session.open(MyTubePlayer, myreference, self.lastservice, infoCallback = self.showVideoInfo, nextCallback = self.getNextEntry, prevCallback = self.getPrevEntry )
else:
self.session.open(MessageBox, _("Sorry, video is not available!"), MessageBox.TYPE_INFO)
+ elif self.currList == "historylist":
+ if self.HistoryWindow is not None:
+ config.plugins.mytube.search.searchTerm.value = self.HistoryWindow.getSelection()
+ self["config"].invalidateCurrent()
+ if config.plugins.mytube.search.searchTerm.value != "":
+ searchContext = config.plugins.mytube.search.searchTerm.value
+ print "Search searchcontext",searchContext
+ self.setState('getSearchFeed')
+ self.runSearch(searchContext)
def keyUp(self):
print "self.currList im KeyUp",self.currList
if not self.propagateUpDownNormally:
self["config"].getCurrent()[1].suggestionListUp()
self["config"].invalidateCurrent()
+ elif self.currList == "feedlist":
+ self[self.currList].selectPrevious()
elif self.currList == "historylist":
if self.HistoryWindow is not None and self.HistoryWindow.shown:
self.HistoryWindow.up()
- elif self.currList == "feedlist":
- self[self.currList].selectPrevious()
def keyDown(self):
print "self.currList im KeyDown",self.currList
if not self.propagateUpDownNormally:
self["config"].getCurrent()[1].suggestionListDown()
self["config"].invalidateCurrent()
- elif self.currList == "historylist":
- if self.HistoryWindow is not None and self.HistoryWindow.shown:
- self.HistoryWindow.down()
elif self.currList == "feedlist":
print self[self.currList].count()
print self[self.currList].index
self.session.openWithCallback(self.getNextEntries, MessageBox, _("Do you want to see more entries?"))
else:
self[self.currList].selectNext()
-
+ elif self.currList == "historylist":
+ if self.HistoryWindow is not None and self.HistoryWindow.shown:
+ self.HistoryWindow.down()
def keyRight(self):
print "self.currList im KeyRight",self.currList
if self.propagateUpDownNormally:
self.HistoryWindow.pageDown()
def keyStdFeed(self):
self.hideSuggestions()
- menulist = [(_("High definition"), "hd")]
+ menulist = [(_("HD videos"), "hd")]
menulist.extend((
(_("Top rated"), "top_rated"),
(_("Top favorites"), "top_favorites"),
(_("Most recent"), "most_recent"),
(_("Most discussed"), "most_discussed"),
(_("Most linked"), "most_linked"),
+ (_("Recently featured"), "recently_featured"),
(_("Most responded"), "most_responded")
))
self.session.openWithCallback(self.openStandardFeedClosed, ChoiceBox, title=_("Select new feed to view."), list = menulist)
self["videoactions"].setEnabled(False)
self["searchactions"].setEnabled(False)
self["suggestionactions"].setEnabled(True)
+ self["historyactions"].setEnabled(False)
self["key_green"].hide()
self.propagateUpDownNormally = False
self["config"].invalidateCurrent()
def switchToConfigList(self):
print "switchToConfigList"
self.currList = "configlist"
- self["statusactions"].setEnabled(False)
self["config_actions"].setEnabled(True)
+ self["historyactions"].setEnabled(False)
+ self["statusactions"].setEnabled(False)
self["videoactions"].setEnabled(False)
self["suggestionactions"].setEnabled(False)
self["searchactions"].setEnabled(True)
self["key_green"].hide()
self["ButtonBlue"].show()
- self["VKeyIcon"].show()
- current = self["config"].getCurrent()
+ self["VKeyIcon"].show()
+ self["config"].invalidateCurrent()
helpwindowpos = self["HelpWindow"].getPosition()
+ current = self["config"].getCurrent()
if current[1].help_window.instance is not None:
current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1]))
current[1].help_window.instance.show()
def switchToFeedList(self, append = False):
print "switchToFeedList"
- self.currList = "feedlist"
+ print "switching to feedlist from:",self.currList
+ print "len(self.videolist):",len(self.videolist)
+ if self.HistoryWindow is not None and self.HistoryWindow.shown:
+ self.HistoryWindow.deactivate()
+ self.HistoryWindow.instance.hide()
+ self.hideSuggestions()
+ if len(self.videolist):
+ self.currList = "feedlist"
+ self["ButtonBlue"].hide()
+ self["VKeyIcon"].hide()
+ self["videoactions"].setEnabled(True)
+ self["suggestionactions"].setEnabled(False)
+ self["searchactions"].setEnabled(False)
+ self["statusactions"].setEnabled(False)
+ self["historyactions"].setEnabled(False)
+ self["key_green"].show()
+ self["config_actions"].setEnabled(False)
+ if not append:
+ self[self.currList].setIndex(0)
+ else:
+ self.setState('noVideos')
+
+
+ def switchToHistory(self):
+ print "switchToHistory"
+ self.oldlist = self.currList
+ self.currList = "historylist"
+ print "switchToHistory currentlist",self.currList
+ print "switchToHistory oldlist",self.oldlist
+ self.hideSuggestions()
self["ButtonBlue"].hide()
self["VKeyIcon"].hide()
- self["videoactions"].setEnabled(True)
+ self["key_green"].hide()
+ self["videoactions"].setEnabled(False)
self["suggestionactions"].setEnabled(False)
self["searchactions"].setEnabled(False)
self["statusactions"].setEnabled(False)
- self["key_green"].show()
self["config_actions"].setEnabled(False)
- if not append:
- self[self.currList].setIndex(0)
- if self.HistoryWindow is not None and self.HistoryWindow.shown:
- self.HistoryWindow.deactivate()
- self.HistoryWindow.instance.hide()
- self.hideSuggestions()
-
+ self["historyactions"].setEnabled(True)
+ self.HistoryWindow.activate()
+ self.HistoryWindow.instance.show()
+
def handleHistory(self):
if self.HistoryWindow is None:
self.HistoryWindow = self.session.instantiateDialog(MyTubeHistoryScreen)
- if self.currList == "configlist":
- print "handle history currentlist",self.currList
- print "handle history oldlist",self.oldlist
- if self.HistoryWindow.status() is False:
- print "status is FALSE"
- self.oldlist = self.currList
- self.currList = "historylist"
- self.hideSuggestions()
- self.HistoryWindow.activate()
- self.HistoryWindow.instance.show()
- elif self.currList == "feedlist":
- print "handle history currentlist",self.currList
- print "handle history oldlist",self.oldlist
+ if self.currList in ("configlist","feedlist"):
if self.HistoryWindow.status() is False:
- print "status is FALSE"
- self.oldlist = self.currList
- self.currList = "historylist"
- self.HistoryWindow.activate()
- self.HistoryWindow.instance.show()
+ print "status is FALSE,switchToHistory"
+ self.switchToHistory()
elif self.currList == "historylist":
- print "handle history currentlist",self.currList
- print "handle history oldlist",self.oldlist
+ self.closeHistory()
+
+ def closeHistory(self):
+ print "closeHistory currentlist",self.currList
+ print "closeHistory oldlist",self.oldlist
+ if self.currList == "historylist":
if self.HistoryWindow.status() is True:
- print "status is TRUE"
- self.currList = self.oldlist
+ print "status is TRUE, closing historyscreen"
self.HistoryWindow.deactivate()
self.HistoryWindow.instance.hide()
- if self.oldlist == 'configlist':
- current = self["config"].getCurrent()
- helpwindowpos = self["HelpWindow"].getPosition()
- if current[1].help_window.instance is not None:
- current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1]))
- current[1].help_window.instance.show()
- if current[1].suggestionsWindow.instance is not None:
- current[1].suggestionsWindow.instance.show()
- self.propagateUpDownNormally = True
+ if self.oldlist == "configlist":
+ self.switchToConfigList()
+ elif self.oldlist == "feedlist":
+ self.switchToFeedList()
def add2History(self):
if self.History is None:
<widget name="detailtext" position="60,300" size="610,200" zPosition="10" font="Regular;21" transparent="1" halign="left" valign="top"/>
<ePixmap position="100,500" size="100,40" zPosition="0" pixmap="~/plugin.png" alphatest="on" transparent="1" />
<ePixmap position="220,500" zPosition="4" size="140,40" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="on" />
- <ePixmap position="360,500" zPosition="4" size="140,40" pixmap="skin_default/buttons/green.png" transparent="1" alphatest="on" />
<widget name="key_red" position="220,500" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
- <widget name="key_green" position="360,500" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
<widget name="thumbnail" position="0,0" size="130,98" alphatest="on"/> # fake entry for dynamic thumbnail resizing, currently there is no other way doing this.
</screen>"""
self.picloads = {}
self["title"] = Label()
self["key_red"] = Button(_("Close"))
- self["key_green"] = Button(_("Search"))
self["thumbnail"] = Pixmap()
self["thumbnail"].hide()
self["detailtext"] = ScrollLabel()