Skip to content

Commit

Permalink
Merge pull request #101 from anxdpanic/compliance
Browse files Browse the repository at this point in the history
remove optional urlresolver(debrid) support
  • Loading branch information
jdf76 authored Nov 7, 2016
2 parents 546e7a3 + 7580dff commit 10f7cb7
Show file tree
Hide file tree
Showing 26 changed files with 11 additions and 208 deletions.
4 changes: 1 addition & 3 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.youtube" name="YouTube" version="5.3.0" provider-name="jdf76, bromix">
<addon id="plugin.video.youtube" name="YouTube" version="5.3.1" provider-name="jdf76, bromix">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.urlresolver" optional="true"/>
</requires>
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
Expand All @@ -15,7 +14,6 @@
- Added 'Subtitle language(s) to download' selection to Settings -> General
- API key set switching from Settings -> API (this will log you out)
- Dual login only required if My Subscriptions folder is enabled at sign-in
- Added optional URLResolver (Debrid) support to Settings -> Advanced -> Enable URLResolver (Debrid) support
</news>
<assets>
<icon>icon.png</icon>
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Bulgarian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Любими"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Chinese (Traditional)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "我的收藏"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Czech/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Oblíbené"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Dutch/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

#Kodion Common
#empty strings from id 30037 to 30099

Expand Down
10 changes: 1 addition & 9 deletions resources/language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,8 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver (Debrid) support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

#Kodion Common
#empty strings from id 30041 to 30099
#empty strings from id 30039 to 30099

msgctxt "#30100"
msgid "Favorites"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/French/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

#Kodion Common
#empty strings from id 30037 to 30099

Expand Down
8 changes: 0 additions & 8 deletions resources/language/German/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Favoriten"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Greek/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr "Τροποποιημένο ID λίστας αναπαραγωγής"

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr "Ενεργοποίηση υποστήριξης URLResolver Derbid"

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr "Ρύθμιση URLResolver"

#Kodion Common
#empty strings from id 30037 to 30099

Expand Down
8 changes: 0 additions & 8 deletions resources/language/Hebrew/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "מועדפים"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Hungarian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Kedvencek"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Italian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Preferiti"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Korean/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "즐겨찾기"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Norwegian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

#Kodion Common
#empty strings from id 30038 to 30099

Expand Down
8 changes: 0 additions & 8 deletions resources/language/Polish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Ulubione"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Portuguese/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Favoritos"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Romanian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Favorite"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Russian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

#Kodion Common
#empty strings from id 30037 to 30099

Expand Down
8 changes: 0 additions & 8 deletions resources/language/Slovak/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Obľúbené"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Spanish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Favoritos"
Expand Down
8 changes: 0 additions & 8 deletions resources/language/Ukrainian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ msgctxt "#30038"
msgid "Custom History Playlist ID"
msgstr ""

msgctxt "#30039"
msgid "Enable URLResolver Debrid support"
msgstr ""

msgctxt "#30040"
msgid "Configure URLResolver"
msgstr ""

msgctxt "#30100"
msgid "Favorites"
msgstr "Обране"
Expand Down
1 change: 0 additions & 1 deletion resources/lib/kodion/constants/const_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
VIDEO_QUALITY = 'kodion.video.quality' # (int)
VIDEO_QUALITY_ASK = 'kodion.video.quality.ask' # (bool)
USE_DASH = 'kodion.video.quality.mpd' # (bool)
DEBRID_SUPPORT = 'kodion.support.urlresolver_debrid' # (bool)
SUBTITLE_LANGUAGES = 'kodion.subtitle.languages' # (int)
SETUP_WIZARD = 'kodion.setup_wizard' # (bool)

Expand Down
3 changes: 0 additions & 3 deletions resources/lib/kodion/impl/abstract_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,3 @@ def subtitle_languages(self):

def requires_dual_login(self):
return self.get_bool('youtube.folder.my_subscriptions.show', True)

def use_debrid(self):
return self.get_bool(constants.setting.DEBRID_SUPPORT, False)
44 changes: 9 additions & 35 deletions resources/lib/youtube/helper/yt_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,15 @@ def play_video(provider, context, re_match):
context.get_ui().show_notification(message, time_milliseconds=5000)
return False

video_stream = None
if context.get_settings().use_debrid():
import urlresolver
resolver_url = 'http://youtube.com/watch?v=%s' % video_id
hmf = urlresolver.HostedMediaFile(url=resolver_url)
resolved = hmf.resolve()
if not resolved or not isinstance(resolved, basestring):
try:
message = resolved.msg
except:
message = 'Reason unknown, refer to URLResolver debug logging.'
context.log_warning('URLResolver unable to resolve: %s\n%s' % (resolver_url, message))
elif resolved.startswith('plugin://'):
context.log_warning('URLResolver unusable result: %s\nCheck the log above for debrid resolver errors, '
'confirm debrid resolver is enabled, and has a lower number set in the priority '
'setting than the YouTube(or offending) resolver.' % resolved)
else:
video_stream = {'container': 'URLResolver',
'title': video_streams[0]['title'],
'url': resolved,
'meta': video_streams[0]['meta'],
'video': {'encoding': '', 'height': 0},
'audio': {'bitrate': 0, 'encoding': ''}}
context.log_debug('URLResolver resolved now using video_stream:\n%s' % video_stream)

if not video_stream:
video_stream = kodion.utils.select_stream(context, video_streams)

if video_stream is None:
return False

if video_stream['video'].get('rtmpe', False):
message = context.localize(provider.LOCAL_MAP['youtube.error.rtmpe_not_supported'])
context.get_ui().show_notification(message, time_milliseconds=5000)
return False
video_stream = kodion.utils.select_stream(context, video_streams)

if video_stream is None:
return False

if video_stream['video'].get('rtmpe', False):
message = context.localize(provider.LOCAL_MAP['youtube.error.rtmpe_not_supported'])
context.get_ui().show_notification(message, time_milliseconds=5000)
return False

video_item = VideoItem(video_id, video_stream['url'])

Expand Down
3 changes: 0 additions & 3 deletions resources/lib/youtube/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,6 @@ def configure_mpd_inputstream(self, context, re_match):
context._addon.openSettings()
elif switch == 'mpd':
xbmcaddon.Addon(id='inputstream.mpd').openSettings()
elif switch == 'urlresolver':
import urlresolver
urlresolver.display_settings()
else:
return False

Expand Down
Loading

0 comments on commit 10f7cb7

Please sign in to comment.