Skip to content

Commit

Permalink
8.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dream-alpha committed Jan 19, 2024
1 parent c3cac51 commit 26e1d8f
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 36 deletions.
2 changes: 1 addition & 1 deletion CONTROL/control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Description: TMDBCockpit
Maintainer: dream-alpha
Package: enigma2-plugin-extensions-tmdbcockpit
Version: 8.1.5
Version: 8.2.2
Architecture: all
Depends: python-requests
Conflicts: enigma2-plugin-extensions-tmdb
Expand Down
3 changes: 1 addition & 2 deletions src/Json.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# coding=utf-8
#
# Copyright (C) 2018-2024 by dream-alpha
#
Expand All @@ -20,7 +20,6 @@


import six
# from .__init__ import _
from .Debug import logger
from .Utils import checkText

Expand Down
18 changes: 12 additions & 6 deletions src/ScreenMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, session, service, mode):
self.result = []

self['searchinfo'] = Label()
self['key_red'] = Label(_("Exit"))
self['key_red'] = Label(_("Cancel"))
self['key_green'] = Label(_("Details"))
self['key_yellow'] = Label(_("Edit search"))
self['key_blue'] = Label(_("more ..."))
Expand All @@ -84,7 +84,7 @@ def __init__(self, session, service, mode):
"cancel": (self.exit, _("Exit")),
"nextBouquet": (self.nextBouquet, _("Details down")),
"prevBouquet": (self.prevBouquet, _("Details up")),
"red": (self.exit, _("Exit")),
"red": (self.exit, _("Cancel")),
"green": (self.ok, _("Show details")),
"yellow": (self.searchString, _("Edit search")),
"blue": (self.menu, _("more ...")),
Expand Down Expand Up @@ -212,18 +212,24 @@ def ok(self):
cover_url = current[3]
backdrop_url = current[4]
if media in ["movie", "tv"]:
self.session.openWithCallback(self.callbackScreenMovie, ScreenMovie, title, media, cover_url, ident, self.service_path, backdrop_url)
self.session.openWithCallback(self.screenMovieCallback, ScreenMovie, title, media, cover_url, ident, self.service_path, backdrop_url)
elif media == "person":
self.session.open(ScreenPerson, title, ident, "")
self.session.openWithCallback(self.screenPersonCallback, ScreenPerson, title, ident, "")
else:
logger.debug("unsupported media: %s", media)

def callbackScreenMovie(self, files_saved):
def screenMovieCallback(self, do_exit, files_saved):
logger.info("files_saved: %s", files_saved)
self.files_saved = files_saved
if self.count == 1:
if do_exit:
self.exit()
elif self.count == 1:
self.showPictures()

def screenPersonCallback(self, do_exit):
if do_exit:
self.exit()

def menu(self):
logger.info("...")
options = [
Expand Down
21 changes: 14 additions & 7 deletions src/ScreenMovie.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Tools.LoadPixmap import LoadPixmap
from Tools.BoundFunction import boundFunction
from .__init__ import _
from .ScreenConfig import ScreenConfig
from .ScreenPeople import ScreenPeople
Expand Down Expand Up @@ -101,7 +102,7 @@ def __init__(self, session, movie, media, cover_url, ident, service_path, backdr
"studio": (_("Studio:"), "-"),
}

self["key_red"] = Label(_("Exit"))
self["key_red"] = Label(_("Cancel"))
self["key_green"] = Label(_("Crew"))
self["key_yellow"] = Label(_("Seasons")) if self.media == "tv" else Label("")
self["key_blue"] = Label(_("more ...")) if self.service_path else Label("")
Expand All @@ -118,12 +119,12 @@ def __init__(self, session, movie, media, cover_url, ident, service_path, backdr
"TMDBActions",
{
"ok": (self.green, _("Crew")),
"cancel": (self.exit, _("Exit")),
"cancel": (boundFunction(self.exit, True), _("Exit")),
"up": (self.fulldescription.pageUp, _("Selection up")),
"down": (self.fulldescription.pageDown, _("Selection down")),
"left": (self.fulldescription.pageUp, _("Page up")),
"right": (self.fulldescription.pageDown, _("Page down")),
"red": (self.exit, _("Exit")),
"red": (boundFunction(self.exit, False), _("Cancel")),
"green": (self.green, _("Crew")),
"yellow": (self.yellow, _("Seasons")),
"blue": (self.showMenu, _("more ...")),
Expand Down Expand Up @@ -230,16 +231,22 @@ def yellow(self):
elif len(videolist) == 1:
self.videolistCallback(videolist[0])

def screenSeasonCallback(self, files_saved):
def screenSeasonCallback(self, do_exit, files_saved):
self.files_saved = files_saved
if do_exit:
self.exit(True)

def videolistCallback(self, ret):
ret = ret and ret[1]
if ret:
self.session.open(MoviePlayer, eServiceReference(ret), streamMode=True, askBeforeLeaving=False)

def green(self):
self.session.open(ScreenPeople, self.movie, self.ident , self.media, self.cover_url, self.backdrop_url)
self.session.openWithCallback(self.screenPeopleCallback, ScreenPeople, self.movie, self.ident , self.media, self.cover_url, self.backdrop_url)

def exit(self):
self.close(self.files_saved)
def screenPeopleCallback(self, do_exit):
if do_exit:
self.exit(True)

def exit(self, do_exit):
self.close(do_exit, self.files_saved)
17 changes: 11 additions & 6 deletions src/ScreenPeople.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from Components.Pixmap import Pixmap
from Screens.HelpMenu import HelpableScreen
from Screens.Screen import Screen
from Tools.BoundFunction import boundFunction
from .__init__ import _
from .List import List
from .ScreenConfig import ScreenConfig
Expand All @@ -49,7 +50,7 @@ def __init__(self, session, movie, ident, media, cover_url, backdrop_url):
self.result = []

self['searchinfo'] = Label()
self['key_red'] = Label(_("Exit"))
self['key_red'] = Label(_("Cancel"))
self['key_green'] = Label(_("Details"))
self["key_yellow"] = Label()
self['key_blue'] = Label()
Expand All @@ -63,12 +64,12 @@ def __init__(self, session, movie, ident, media, cover_url, backdrop_url):
"TMDBActions",
{
"ok": (self.ok, _("Show details")),
"cancel": (self.exit, _("Exit")),
"cancel": (boundFunction(self.exit, True), _("Exit")),
"up": (self.list.moveUp, _("Selection up")),
"down": (self.list.moveDown, _("Selection down")),
"right": (self.list.pageDown, _("Page down")),
"left": (self.list.pageUp, _("Page down")),
"red": (self.exit, _("Exit")),
"red": (boundFunction(self.exit, False), _("Cancel")),
"green": (self.ok, _("Show details")),
"menu": (self.setup, _("Setup"))
},
Expand Down Expand Up @@ -113,12 +114,16 @@ def ok(self):
name = current[1]
cover_ident = current[3]
if cover_ident:
self.session.open(ScreenPerson, name, cover_ident, self.ident)
self.session.openWithCallback(self.screenPersonCallback, ScreenPerson, name, cover_ident, self.ident)

def screenPersonCallback(self, do_exit):
if do_exit:
self.exit(True)

def setup(self):
self.session.open(ScreenConfig)

def exit(self):
def exit(self, do_exit):
DelayTimer.stopAll()
self["list"].onSelectionChanged.remove(self.onSelectionChanged)
self.close()
self.close(do_exit)
18 changes: 10 additions & 8 deletions src/ScreenPerson.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from Components.ScrollLabel import ScrollLabel
from Screens.HelpMenu import HelpableScreen
from Screens.Screen import Screen
from Tools.BoundFunction import boundFunction
from .__init__ import _
from .Picture import Picture
from .Debug import logger
Expand All @@ -50,7 +51,7 @@ def __init__(self, session, person, cover_ident, backdrop_ident):
self['cover'] = Pixmap()
self['backdrop'] = Pixmap()

self['key_red'] = Label(_("Exit"))
self['key_red'] = Label(_("Cancel"))
self['key_green'] = Label()
self['key_yellow'] = Label()
self['key_blue'] = Label()
Expand All @@ -60,12 +61,12 @@ def __init__(self, session, person, cover_ident, backdrop_ident):
self,
"TMDBActions",
{
"cancel": (self.exit, _("Exit")),
"cancel": (boundFunction(self.exit, True), _("Exit")),
"up": (self.fulldescription.pageUp, _("Selection up")),
"down": (self.fulldescription.pageDown, _("Selection down")),
"left": (self.fulldescription.pageUp, _("Page up")),
"right": (self.fulldescription.pageDown, _("Page down")),
"red": (self.exit, _("Exit")),
"red": (boundFunction(self.exit, False), _("Cancel")),
"menu": (self.setup, _("Setup")),
},
-1,
Expand Down Expand Up @@ -98,13 +99,14 @@ def gotData(self, result):
+ result["gender"] + "\n" \
+ result["also_known_as"] + "\n" \
+ _("Popularity") + ": " + result["popularity"] + "\n\n" \
+ result["biography"] + "\n\n" \
+ _("Known for:") + "\n" \
+ result["movies"]
+ result["biography"] + "\n\n"
if result["movies"]:
fulldescription += _("Known for:") + "\n" \
+ result["movies"]
self["fulldescription"].setText(fulldescription)

def setup(self):
self.session.open(ScreenConfig)

def exit(self):
self.close()
def exit(self, do_exit):
self.close(do_exit)
11 changes: 6 additions & 5 deletions src/ScreenSeason.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from Components.ScrollLabel import ScrollLabel
from Screens.HelpMenu import HelpableScreen
from Screens.Screen import Screen
from Tools.BoundFunction import boundFunction
from .__init__ import _
from .List import List
from .ScreenConfig import ScreenConfig
Expand All @@ -51,7 +52,7 @@ def __init__(self, session, movie, ident, media, service_path):
self.result = []
self['searchinfo'] = Label()
self["overview"] = self.overview_label = ScrollLabel()
self['key_red'] = Label(_("Exit"))
self['key_red'] = Label(_("Cancel"))
self['key_green'] = Label()
self['key_yellow'] = Label()
self["key_blue"] = Label(_("more ...")) if self.service_path else Label("")
Expand All @@ -64,14 +65,14 @@ def __init__(self, session, movie, ident, media, service_path):
self,
"TMDBActions",
{
"cancel": (self.exit, _("Exit")),
"cancel": (boundFunction(self.exit, True), _("Exit")),
"up": (self.list.moveUp, _("Selection up")),
"down": (self.list.moveDown, _("Selection down")),
"nextBouquet": (self.overview_label.pageUp, _("Details down")),
"prevBouquet": (self.overview_label.pageDown, _("Details up")),
"right": (self.list.pageDown, _("Page down")),
"left": (self.list.pageUp, _("Page down")),
"red": (self.exit, _("Exit")),
"red": (boundFunction(self.exit, False), _("Cancel")),
"blue": (self.showMenu, _("more ...")),
"menu": (self.setup, _("Setup"))
},
Expand Down Expand Up @@ -120,7 +121,7 @@ def showInfo(self):
def setup(self):
self.session.open(ScreenConfig)

def exit(self):
def exit(self, do_exit):
DelayTimer.stopAll()
self["list"].onSelectionChanged.remove(self.onSelectionChanged)
self.close(self.files_saved)
self.close(do_exit, self.files_saved)
2 changes: 1 addition & 1 deletion src/Version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@

PLUGIN = "TMDBCockpit"
ID = "TMDB"
VERSION = "8.1.5"
VERSION = "8.2.2"
COPYRIGHT = "2018-2024 by dream-alpha"
LICENSE = "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version."

0 comments on commit 26e1d8f

Please sign in to comment.