diff --git a/default.py b/default.py index 94117d69..2a9ff290 100644 --- a/default.py +++ b/default.py @@ -102,7 +102,7 @@ class Main: # Other functions if mode == "settings": xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)') - elif mode in ("manualsync", "repair"): + elif mode in ("manualsync", "fastsync", "repair"): if utils.window('emby_online') != "true": # Server is not online, do not run the sync xbmcgui.Dialog().ok(heading="Emby for Kodi", @@ -116,6 +116,8 @@ class Main: lib = librarysync.LibrarySync() if mode == "manualsync": librarysync.ManualSync().sync(dialog=True) + elif mode == "fastsync": + lib.startSync() else: lib.fullSync(repair=True) else: diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 78a94417..1a145adc 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -298,6 +298,8 @@ Duration of the music library pop up (in seconds) Server messages Generate a new device Id + Sync when screensaver is deactivated + Force Transcode Hi10P Welcome diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index f2b5ae86..ea1a4f17 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -205,5 +205,12 @@ class KodiMonitor(xbmc.Monitor): xbmc.sleep(10000) utils.window('emby_onWake', value="true") + + elif method == "GUI.OnScreensaverDeactivated": + if utils.settings('dbSyncScreensaver') == "true": + xbmc.sleep(5000); + utils.window('emby_onWake', value="true") + + elif method == "Playlist.OnClear": pass \ No newline at end of file diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 622781d2..a1de2948 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -18,7 +18,6 @@ class PlayUtils(): def __init__(self, item): self.item = item - self.clientInfo = clientinfo.ClientInfo() self.addonName = self.clientInfo.getAddonName() @@ -102,6 +101,11 @@ class PlayUtils(): videotrack = self.item['MediaSources'][0]['Name'] transcodeH265 = settings('transcodeH265') + videoprofiles = [x['Profile'] for x in self.item['MediaSources'][0]['MediaStreams'] if 'Profile' in x] + transcodeHi10P = utils.settings('transcodeHi10P') + + if transcodeHi10P == "true" and "H264" in videotrack and "High 10" in videoprofiles: + return False if transcodeH265 in ("1", "2", "3") and ("HEVC" in videotrack or "H265" in videotrack): # Avoid H265/HEVC depending on the resolution @@ -207,6 +211,11 @@ class PlayUtils(): videotrack = self.item['MediaSources'][0]['Name'] transcodeH265 = utils.settings('transcodeH265') + videoprofiles = [x['Profile'] for x in self.item['MediaSources'][0]['MediaStreams'] if 'Profile' in x] + transcodeHi10P = utils.settings('transcodeHi10P') + + if transcodeHi10P == "true" and "H264" in videotrack and "High 10" in videoprofiles: + return False if transcodeH265 in ("1", "2", "3") and ("HEVC" in videotrack or "H265" in videotrack): # Avoid H265/HEVC depending on the resolution @@ -423,4 +432,4 @@ class PlayUtils(): else: playurlprefs += "&AudioBitrate=192000" - return playurlprefs \ No newline at end of file + return playurlprefs diff --git a/resources/settings.xml b/resources/settings.xml index d5d815dc..77d57a33 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -32,6 +32,7 @@ + @@ -54,6 +55,7 @@ +