Skip to content

Commit

Permalink
[EPGSelection]
Browse files Browse the repository at this point in the history
* add TMDB Search
  • Loading branch information
jbleyel committed Jul 11, 2023
1 parent 11bbe0f commit 75cb612
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/python/Components/UsageConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,7 @@ def autolanguagesub(configElement):
("autotimer", _("AutoTimer")),
("timer", _("Add/Remove Timer")),
("imdb", _("IMDb Search")),
("tmdb", _("TMDB Search")),
("bouquetlist", _("Bouquet List")),
("showmovies", _("Show Movies List")),
("record", _("Record - same as record button")),
Expand Down Expand Up @@ -1860,6 +1861,7 @@ def autolanguagesub(configElement):
("24plus", _("+24 Hours")),
("24minus", _("-24 Hours")),
("imdb", _("IMDb Search")),
("tmdb", _("TMDB Search")),
("bouquetlist", _("Bouquet List")),
("showmovies", _("Show Movies List")),
("record", _("Record - same as record button")),
Expand Down
30 changes: 30 additions & 0 deletions lib/python/Screens/EpgSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,8 @@ def redButtonPressed(self):
self.RecordTimerQuestion(True)
if config.epgselection.graph_red.value == "imdb" or config.epgselection.graph_red.value == None:
self.openIMDb()
if config.epgselection.graph_red.value == "tmdb":
self.openTMDB()
if config.epgselection.graph_red.value == "autotimer":
self.addAutoTimer()
if config.epgselection.graph_red.value == "bouquetlist":
Expand Down Expand Up @@ -1000,6 +1002,8 @@ def redButtonPressed(self):
self.RecordTimerQuestion(True)
if config.epgselection.vertical_red.value == "imdb" or config.epgselection.vertical_red.value == None:
self.openIMDb()
if config.epgselection.vertical_red.value == "tmdb":
self.openTMDB()
if config.epgselection.vertical_red.value == "autotimer":
self.addAutoTimer()
if config.epgselection.vertical_red.value == "bouquetlist":
Expand Down Expand Up @@ -1040,6 +1044,8 @@ def greenButtonPressed(self):
self.RecordTimerQuestion(True)
if config.epgselection.graph_green.value == "imdb":
self.openIMDb()
if config.epgselection.graph_green.value == "tmdb":
self.openTMDB()
if config.epgselection.graph_green.value == "autotimer":
self.addAutoTimer()
if config.epgselection.graph_green.value == "bouquetlist":
Expand Down Expand Up @@ -1069,6 +1075,8 @@ def greenButtonPressed(self):
self.RecordTimerQuestion(True)
if config.epgselection.vertical_green.value == "imdb" or config.epgselection.vertical_green.value == None:
self.openIMDb()
if config.epgselection.vertical_green.value == "tmdb":
self.openTMDB()
if config.epgselection.vertical_green.value == "autotimer":
self.addAutoTimer()
if config.epgselection.vertical_green.value == "bouquetlist":
Expand Down Expand Up @@ -1109,6 +1117,8 @@ def yellowButtonPressed(self):
self.RecordTimerQuestion(True)
if config.epgselection.graph_yellow.value == "imdb":
self.openIMDb()
if config.epgselection.graph_yellow.value == "tmdb":
self.openTMDB()
if config.epgselection.graph_yellow.value == "autotimer":
self.addAutoTimer()
if config.epgselection.graph_yellow.value == "bouquetlist":
Expand Down Expand Up @@ -1138,6 +1148,8 @@ def yellowButtonPressed(self):
self.RecordTimerQuestion(True)
if config.epgselection.vertical_yellow.value == "imdb" or config.epgselection.vertical_yellow.value == None:
self.openIMDb()
if config.epgselection.vertical_yellow.value == "tmdb":
self.openTMDB()
if config.epgselection.vertical_yellow.value == "autotimer":
self.addAutoTimer()
if config.epgselection.vertical_yellow.value == "bouquetlist":
Expand Down Expand Up @@ -1171,6 +1183,8 @@ def blueButtonPressed(self):
self.RecordTimerQuestion(True)
if config.epgselection.graph_blue.value == "imdb":
self.openIMDb()
if config.epgselection.graph_blue.value == "tmdb":
self.openTMDB()
if config.epgselection.graph_blue.value == "autotimer" or config.epgselection.graph_blue.value == None:
self.addAutoTimer()
if config.epgselection.graph_blue.value == "bouquetlist":
Expand Down Expand Up @@ -1200,6 +1214,8 @@ def blueButtonPressed(self):
self.RecordTimerQuestion(True)
if config.epgselection.vertical_blue.value == "imdb" or config.epgselection.vertical_blue.value == None:
self.openIMDb()
if config.epgselection.vertical_blue.value == "tmdb":
self.openTMDB()
if config.epgselection.vertical_blue.value == "autotimer":
self.addAutoTimer()
if config.epgselection.vertical_blue.value == "bouquetlist":
Expand Down Expand Up @@ -1288,6 +1304,20 @@ def openIMDb(self):
except ImportError:
self.session.open(MessageBox, _("The IMDb plugin is not installed!\nPlease install it."), type=MessageBox.TYPE_INFO, timeout=10)

def openTMDB(self):
try:
from Plugins.Extensions.tmdb.tmdb import tmdbScreen
try:
cur = self["list" + str(self.activeList)].getCurrent()
event = cur[0]
name = event.getEventName()
except:
name = ""

self.session.open(tmdbScreen, name, 2)
except ImportError:
self.session.open(MessageBox, _("The TMDB plugin is not installed!\nPlease install it."), type=MessageBox.TYPE_INFO, timeout=10)

def openEPGSearch(self):
try:
from Plugins.Extensions.EPGSearch.EPGSearch import EPGSearch
Expand Down

0 comments on commit 75cb612

Please sign in to comment.