From d19c542bc79b88e75c77151b7f5ec5499520dcfd Mon Sep 17 00:00:00 2001 From: MoojMidge <56883549+MoojMidge@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:11:47 +1100 Subject: [PATCH 1/3] Fix typo causing no fractional frame rate hinting to fail #679 --- addon.xml | 2 +- changelog.txt | 4 ++++ resources/lib/youtube_plugin/youtube/helper/video_info.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index 9c0b9386f..15870ece1 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 5de9470b6..efd40ae19 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +## v7.0.5+beta.5 +### Fixed +- Fix typo causing no fractional frame rate hinting to fail #679 + ## v7.0.5+beta.4 ### Fixed - Fix typo that caused android player requests to fail diff --git a/resources/lib/youtube_plugin/youtube/helper/video_info.py b/resources/lib/youtube_plugin/youtube/helper/video_info.py index 83be1ed17..d4b32196d 100644 --- a/resources/lib/youtube_plugin/youtube/helper/video_info.py +++ b/resources/lib/youtube_plugin/youtube/helper/video_info.py @@ -596,7 +596,7 @@ class VideoInfo(YouTubeRequestClient): 48: '48000/1000', # 48.00 fps 50: '50000/1000', # 50.00 fps 60: '60000/1000', # 60.00 fps - }, + } FRACTIONAL_FPS_SCALE = { 0: '{0}000/1000', # --.00 fps 24: '24000/1001', # 23.976 fps From 5782e7b2577abef15102376a0a4e008dbb9b1e19 Mon Sep 17 00:00:00 2001 From: MoojMidge <56883549+MoojMidge@users.noreply.github.com> Date: Wed, 3 Apr 2024 03:33:07 +1100 Subject: [PATCH 2/3] Tidy up some exception catching --- .../youtube_plugin/kodion/context/xbmc/xbmc_context.py | 4 ++-- resources/lib/youtube_plugin/kodion/utils/methods.py | 10 ++++++++-- .../lib/youtube_plugin/kodion/utils/system_version.py | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/resources/lib/youtube_plugin/kodion/context/xbmc/xbmc_context.py b/resources/lib/youtube_plugin/kodion/context/xbmc/xbmc_context.py index 45bd5d7ff..830560aed 100644 --- a/resources/lib/youtube_plugin/kodion/context/xbmc/xbmc_context.py +++ b/resources/lib/youtube_plugin/kodion/context/xbmc/xbmc_context.py @@ -534,7 +534,7 @@ def addon_enabled(self, addon_id): 'properties': ['enabled']}) try: return response['result']['addon']['enabled'] is True - except KeyError: + except (KeyError, TypeError): error = response.get('error', {}) self.log_error('XbmcContext.addon_enabled error - |{0}: {1}|' .format(error.get('code', 'unknown'), @@ -547,7 +547,7 @@ def set_addon_enabled(self, addon_id, enabled=True): 'enabled': enabled}) try: return response['result'] == 'OK' - except KeyError: + except (KeyError, TypeError): error = response.get('error', {}) self.log_error('XbmcContext.set_addon_enabled error - |{0}: {1}|' .format(error.get('code', 'unknown'), diff --git a/resources/lib/youtube_plugin/kodion/utils/methods.py b/resources/lib/youtube_plugin/kodion/utils/methods.py index 6f5c35b68..7aa51eeb8 100644 --- a/resources/lib/youtube_plugin/kodion/utils/methods.py +++ b/resources/lib/youtube_plugin/kodion/utils/methods.py @@ -323,10 +323,16 @@ def merge_dicts(item1, item2, templates=None, _=Ellipsis): return new or _ -def get_kodi_setting_value(setting): +def get_kodi_setting_value(setting, process=None): response = jsonrpc(method='Settings.GetSettingValue', params={'setting': setting}) - return response.get('result', {}).get('value') + try: + value = response['result']['value'] + if process: + return process(value) + except (KeyError, TypeError, ValueError): + return None + return value def get_kodi_setting_bool(setting): diff --git a/resources/lib/youtube_plugin/kodion/utils/system_version.py b/resources/lib/youtube_plugin/kodion/utils/system_version.py index 67a24f120..de4f500f1 100644 --- a/resources/lib/youtube_plugin/kodion/utils/system_version.py +++ b/resources/lib/youtube_plugin/kodion/utils/system_version.py @@ -38,7 +38,7 @@ def __init__(self, version=None, releasename=None, appname=None): self._version = (version_installed.get('major', 1), version_installed.get('minor', 0)) self._appname = response['result']['name'] - except: + except (KeyError, TypeError): self._version = (1, 0) # Frodo self._appname = 'Unknown Application' From c68bdc6e41b04648379d4db52e36ece200bca3ec Mon Sep 17 00:00:00 2001 From: MoojMidge <56883549+MoojMidge@users.noreply.github.com> Date: Thu, 4 Apr 2024 13:06:55 +1100 Subject: [PATCH 3/3] Version bump - v7.0.5 --- addon.xml | 2 +- changelog.txt | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 15870ece1..ec1cc82b0 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index efd40ae19..b892ee963 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,39 @@ +## v7.0.5 +### Fixed +- Fix typo causing no fractional frame rate hinting to fail #679 +- Fix typo that caused android player requests to fail +- Fix error message when rating video #666 +- Fix various issues with Kodi 18 and Python 2 #668 +- Fix issues with video playback #654, #659, #663 +- Fix typos #661 +- Fix typo that prevented videos from being listed in Kodi versions prior to v20 #662 +- Try to prevent Kodi freezing when settings are updated and container is reloaded +- Fix lockups when using xbmc.executebuiltin #647, #653 +- Fix searching for preferred language subtitles not using non-region specific subtitles +- Fix not being able to set custom watch later history playlist per user #646 +- Update workarounds for multiple busy dialog crashes #640, #649 +- Fix playing incorrect video when player request is blocked #654 + +### Changed +- Update language used for maintenance action prompts that clear data +- Display search history as list rather than videos +- Update Setup Wizard + - Add settings for Raspberry Pi 3 class devices (1080p30, VP9 enabled) + - Update settings for Raspberry Pi 4 class devices (1080p60, VP9 enabled) + - Move option to disable list details to last step in wizard +- Shared playlist play using default order without prompting +- Removed dependency on script.module.infotagger #479 +- Removed Nexus specific releases + - Matrix releases will now work in Kodi v19+ + - Leia releases will work, but are unsupported, for Kodi v18 only +- Updated client versions used for player requests + - Use iOS client as fallback for default client selection + +### New +- Add new client that may provide 1080p non-adaptive formats + - Can be accessed as Alternate #2 +- Allow channel name to be displayed/sorted in listing depending on sort order #644 + ## v7.0.5+beta.5 ### Fixed - Fix typo causing no fractional frame rate hinting to fail #679