Fixed response type
This commit is contained in:
parent
c943acb9c2
commit
03dc524f80
2 changed files with 3 additions and 3 deletions
|
@ -478,8 +478,8 @@ class MediaPlugin(Plugin):
|
|||
|
||||
threading.Thread(target=_youtube_dl_thread).start()
|
||||
|
||||
@action
|
||||
def get_youtube_id(self, url: str) -> Optional[str]:
|
||||
@staticmethod
|
||||
def get_youtube_id(url: str) -> Optional[str]:
|
||||
patterns = [
|
||||
re.compile(pattern)
|
||||
for pattern in [
|
||||
|
|
|
@ -158,7 +158,7 @@ class MediaKodiPlugin(MediaPlugin):
|
|||
youtube_id = self.get_youtube_id(resource)
|
||||
if youtube_id:
|
||||
try:
|
||||
resource = self.get_youtube_url('https://www.youtube.com/watch?v=' + youtube_id)
|
||||
resource = self.get_youtube_url('https://www.youtube.com/watch?v=' + youtube_id).output
|
||||
except Exception as e:
|
||||
self.logger.warning('youtube-dl error, falling back to Kodi YouTube plugin: {}'.format(str(e)))
|
||||
resource = 'plugin://plugin.video.youtube/?action=play_video&videoid=' + youtube_id
|
||||
|
|
Loading…
Reference in a new issue