Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v7.0.9+beta.6 #853

Merged
merged 9 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.youtube" name="YouTube" version="7.0.9+beta.5" provider-name="anxdpanic, bromix, MoojMidge">
<addon id="plugin.video.youtube" name="YouTube" version="7.0.9+beta.6" provider-name="anxdpanic, bromix, MoojMidge">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.requests" version="2.27.1"/>
Expand Down
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## v7.0.9+beta.6
### Fixed
- Fix http server not working in Kodi 18
- Fix issues with http server wakeup and sleep on initial start/restart

### Changed
- Player requests no longer use configured plugin language
- Alternate client selections removed

## v7.0.9+beta.5
### Fixed
- Fix disabling certification verification #841
Expand Down
6 changes: 3 additions & 3 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1254,15 +1254,15 @@ msgid "Shorts (1 minute or less)"
msgstr ""

msgctxt "#30737"
msgid "Use alternate client details"
msgid ""
msgstr ""

msgctxt "#30738"
msgid "Alternate #1"
msgid ""
msgstr ""

msgctxt "#30739"
msgid "Alternate #2"
msgid ""
msgstr ""

msgctxt "#30740"
Expand Down
9 changes: 5 additions & 4 deletions resources/lib/youtube_plugin/kodion/abstract_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,11 @@ def reroute(self, context, path=None, params=None, uri=None):
if not result:
return False
context.get_ui().set_property(REROUTE_PATH, path)
context.execute('ActivateWindow(Videos, {0}{1})'.format(
context.execute(''.join((
'ActivateWindow(Videos, ',
context.create_uri(path, params),
', return' if window_return else '',
))
', return)' if window_return else ')',
)))
return True

@staticmethod
Expand Down Expand Up @@ -364,7 +365,7 @@ def on_search(provider, context, re_match):
@staticmethod
def on_command(re_match, **_kwargs):
command = re_match.group('command')
return UriItem('command://{0}'.format(command))
return UriItem(''.join(('command://', command)))

def handle_exception(self, context, exception_to_handle):
return True
Expand Down
21 changes: 10 additions & 11 deletions resources/lib/youtube_plugin/kodion/constants/const_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
MPD_VIDEOS = 'kodion.mpd.videos' # (bool)
MPD_STREAM_SELECT = 'kodion.mpd.stream.select' # (int)
MPD_QUALITY_SELECTION = 'kodion.mpd.quality.selection' # (int)
MPD_STREAM_FEATURES = 'kodion.mpd.stream.features' # (list[string])
MPD_STREAM_FEATURES = 'kodion.mpd.stream.features' # (list[str])
VIDEO_QUALITY_ASK = 'kodion.video.quality.ask' # (bool)
VIDEO_QUALITY = 'kodion.video.quality' # (int)
AUDIO_ONLY = 'kodion.audio_only' # (bool)
Expand All @@ -27,21 +27,20 @@
SUBTITLE_DOWNLOAD = 'kodion.subtitle.download' # (bool)

ITEMS_PER_PAGE = 'kodion.content.max_per_page' # (int)
HIDE_VIDEOS = 'youtube.view.hide_videos' # (list[string])
HIDE_VIDEOS = 'youtube.view.hide_videos' # (list[str])

SAFE_SEARCH = 'kodion.safe.search' # (int)
AGE_GATE = 'kodion.age.gate' # (bool)

API_CONFIG_PAGE = 'youtube.api.config.page' # (bool)
API_KEY = 'youtube.api.key' # (string)
API_ID = 'youtube.api.id' # (string)
API_SECRET = 'youtube.api.secret' # (string)
API_KEY = 'youtube.api.key' # (str)
API_ID = 'youtube.api.id' # (str)
API_SECRET = 'youtube.api.secret' # (str)
ALLOW_DEV_KEYS = 'youtube.allow.dev.keys' # (bool)

WATCH_LATER_PLAYLIST = 'youtube.folder.watch_later.playlist' # (str)
HISTORY_PLAYLIST = 'youtube.folder.history.playlist' # (str)

CLIENT_SELECTION = 'youtube.client.selection' # (int)
SUPPORT_ALTERNATIVE_PLAYER = 'kodion.support.alternative_player' # (bool)
DEFAULT_PLAYER_WEB_URLS = 'kodion.default_player.web_urls' # (bool)
ALTERNATIVE_PLAYER_WEB_URLS = 'kodion.alternative_player.web_urls' # (bool)
Expand All @@ -56,10 +55,10 @@
SEARCH_SIZE = 'kodion.search.size' # (int)
CACHE_SIZE = 'kodion.cache.size' # (int)

CHANNEL_NAME_ALIASES = 'youtube.view.channel_name.aliases' # (list[string])
CHANNEL_NAME_ALIASES = 'youtube.view.channel_name.aliases' # (list[str])
DETAILED_DESCRIPTION = 'youtube.view.description.details' # (bool)
DETAILED_LABELS = 'youtube.view.label.details' # (bool)
LABEL_COLOR = 'youtube.view.label.color' # (string)
LABEL_COLOR = 'youtube.view.label.color' # (str)

THUMB_SIZE = 'kodion.thumbnail.size' # (int)
THUMB_SIZE_BEST = 2
Expand All @@ -78,7 +77,7 @@
CONNECT_TIMEOUT = 'requests.timeout.connect' # (int)
READ_TIMEOUT = 'requests.timeout.read' # (int)

HTTPD_PORT = 'kodion.http.port' # (number)
HTTPD_LISTEN = 'kodion.http.listen' # (string)
HTTPD_WHITELIST = 'kodion.http.ip.whitelist' # (string)
HTTPD_PORT = 'kodion.http.port' # (int)
HTTPD_LISTEN = 'kodion.http.listen' # (str)
HTTPD_WHITELIST = 'kodion.http.ip.whitelist' # (str)
HTTPD_IDLE_SLEEP = 'youtube.http.idle_sleep' # (bool)
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def get_ui(self):
def get_system_version():
return current_system_version

def create_uri(self, path=None, params=None):
def create_uri(self, path=None, params=None, run=False):
if isinstance(path, (list, tuple)):
uri = self.create_path(*path, is_uri=True)
elif path:
Expand All @@ -270,7 +270,11 @@ def create_uri(self, path=None, params=None):
if params:
uri = '?'.join((uri, urlencode(params)))

return uri
return ''.join((
'RunPlugin(',
uri,
')'
)) if run else uri

@staticmethod
def create_path(*args, **kwargs):
Expand Down
15 changes: 12 additions & 3 deletions resources/lib/youtube_plugin/kodion/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,24 @@ def wrapper(*args, **kwargs):
class_name = args[0].__name__
else:
class_name = args[0].__class__.__name__
name = '{0}.{1}'.format(class_name, func.__name__)
name = '.'.join((
class_name,
func.__name__,
))

elif (func.__class__
and not isinstance(func.__class__, type)
and func.__class__.__name__ != 'function'):
name = '{0}.{1}'.format(func.__class__.__name__, func.__name__)
name = '.'.join((
func.__class__.__name__,
func.__name__,
))

elif func.__module__:
name = '{0}.{1}'.format(func.__module__, func.__name__)
name = '.'.join((
func.__module__,
func.__name__,
))

else:
name = func.__name__
Expand Down
5 changes: 4 additions & 1 deletion resources/lib/youtube_plugin/kodion/items/base_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def set_fanart(self, fanart):
def get_fanart(self, default=True):
if self._fanart or not default:
return self._fanart
return '{0}/fanart.jpg'.format(MEDIA_PATH)
return '/'.join((
MEDIA_PATH,
'fanart.jpg',
))

def add_context_menu(self, context_menu, position='end', replace=False):
context_menu = (item for item in context_menu if item)
Expand Down
Loading
Loading