Skip to content

Commit

Permalink
Remove alternate client selection
Browse files Browse the repository at this point in the history
  • Loading branch information
MoojMidge committed Aug 3, 2024
1 parent ac553b6 commit d924236
Show file tree
Hide file tree
Showing 9 changed files with 261 additions and 223 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,6 @@ def item_filter(self, update=None):
types.update(update)
return types

def client_selection(self, value=None):
if value is not None:
return self.set_int(SETTINGS.CLIENT_SELECTION, value)
return self.get_int(SETTINGS.CLIENT_SELECTION, 0)

def show_detailed_description(self, value=None):
if value is not None:
return self.set_bool(SETTINGS.DETAILED_DESCRIPTION, value)
Expand Down
9 changes: 2 additions & 7 deletions resources/lib/youtube_plugin/kodion/utils/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,10 @@ def to_unicode(text):

def select_stream(context,
stream_data_list,
ask_for_quality=None,
audio_only=None,
ask_for_quality,
audio_only,
use_adaptive_formats=True):
settings = context.get_settings()
if ask_for_quality is None:
ask_for_quality = settings.ask_for_video_quality()
if audio_only is None:
audio_only = settings.audio_only()

isa_capabilities = context.inputstream_adaptive_capabilities()
use_adaptive = (use_adaptive_formats
and settings.use_isa()
Expand Down
11 changes: 9 additions & 2 deletions resources/lib/youtube_plugin/youtube/client/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,17 @@ def update_watch_history(self, context, video_id, url, status=None):
self.request(url, params=params, headers=headers,
error_msg='Failed to update watch history')

def get_streams(self, context, video_id, audio_only=False):
def get_streams(self,
context,
video_id,
ask_for_quality=False,
audio_only=False,
use_mpd=True):
return StreamInfo(context,
access_token=self._access_token_tv,
audio_only=audio_only).load_stream_infos(video_id)
ask_for_quality=ask_for_quality,
audio_only=audio_only,
use_mpd=use_mpd).load_stream_info(video_id)

def remove_playlist(self, playlist_id, **kwargs):
params = {'id': playlist_id,
Expand Down
Loading

0 comments on commit d924236

Please sign in to comment.