Giter Site home page Giter Site logo

plugin.video.youtube's People

Contributors

anxdpanic avatar brianhlin avatar deafboy avatar disrupted avatar flemlion avatar guidosarducci avatar guilouz avatar h0d3nt3uf3l avatar iz8mbw avatar jdf76 avatar kolifanes avatar misty- avatar philippbeckmann avatar torstehu avatar uukrull avatar vlmaksime avatar wstephen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plugin.video.youtube's Issues

Index out of range error

I got this error in the log. It occurs when I accepted the application on youtube.com/activate.

NOTICE: [plugin.video.youtube] Running: YouTube (5.2.1) on Jarvis (16.1) with Python 2.7.12
09:20:21 T:1285542816   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IndexError'>
                                            Error Contents: string index out of range
                                            Traceback (most recent call last):
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/default.py", line 7, in <module>
                                                runner.run(__provider__)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run
                                                __RUNNER__.run(provider, context)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run
                                                results = provider.navigate(context)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate
                                                result = method(context, re_match)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 157, in _internal_root
                                                return self.on_root(context, re_match)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 500, in on_root
                                                yt_login.process(mode, self, context, re_match, False)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/yt_login.py", line 123, in process
                                                access_token = '%s|%s' % (access_tokens[0], access_token_kodi)
                                            IndexError: string index out of range
                                            -->End of Python script error report<--
09:20:21 T:1948774400   ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/
09:20:21 T:1948774400   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/) failed

Add videos sent via remote app to a local history

Hi,
First of all, thanks for this add-on. It's been very useful to me for a long time.

I was thinking it would be useful to have the youtube videos sent from a phone app (I'm using Kore on Android) be added to a Youtube history in Kodi.

Currently, we can go back to previously watched videos in a slightly convoluted way, by going back to the search history and finding the video again.

However, any videos sent from a phone are just played, and then forgotten.

It would be great to be able to maintain a history of these watched videos.
Thanks for considering this!

Cannot connect with YouTube anymore on OpenElec

Hi,

I use your plugin on a Raspi 2 with OpenElec and on my Computer with Kodi 15.1 (Ubuntu 16.04). On my Computer, the plugin works well. On my Raspi, I have several issues:

I cannot login with my YouTube-Credentials. If I do that, your plugin returns an error.

The plugin want to login on plugin-launch. Before this error, I saw that I cannot use several "Account-Features" like using my "Liked Videos" or my "Favorites" etc. After I reboot my Raspi, your plugin doesn't want to work ;)

Logs:

12:20:07 12.677811 T:1789084736 NOTICE: -->Python Interpreter Initialized<--
12:20:09 14.248533 T:1789084736 NOTICE: Previous line repeats 4 times.
12:20:09 14.248980 T:1789084736 NOTICE: ## OpenELEC Addon ## 0.6.12
12:20:10 15.123634 T:1797473344 NOTICE: StorageServer Module loaded RUN
12:20:10 15.450260 T:1797473344 NOTICE: StorageClient-2.5.4 Starting server
12:20:13 17.996212 T:1967992832 NOTICE: UDev: Added /var/media/EIFX_KODI
12:20:24 29.024082 T:1609561152 NOTICE: Thread LanguageInvoker start, auto delete: false
12:20:24 29.176170 T:1609561152 NOTICE: -->Python Interpreter Initialized<--
12:20:24 29.839001 T:1609561152 NOTICE: [plugin.video.youtube] Running: YouTube (5.2.1) on Isengard (15.2) with Python 2.7.3
12:21:23 88.435593 T:1670321216 NOTICE: ES: Client from 192.168.0.101 timed out
12:21:26 91.649979 T:1609561152 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IndexError'>
Error Contents: string index out of range
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.youtube/default.py", line 7, in
runner.run(provider)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run
RUNNER.run(provider, context)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run
results = provider.navigate(context)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate
result = method(context, re_match)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 157, in _internal_root
return self.on_root(context, re_match)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 500, in on_root
yt_login.process(mode, self, context, re_match, False)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/yt_login.py", line 123, in process
access_token = '%s|%s' % (access_tokens[0], access_token_kodi)
IndexError: string index out of range
-->End of Python script error report<--
12:21:26 91.663521 T:1947202624 NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:2205)
12:21:26 91.801720 T:1967992832 ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/
12:21:26 91.804207 T:1967992832 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/) failed
12:21:26 91.831352 T:1609561152 NOTICE: Thread BackgroundLoader start, auto delete: false
12:21:38 102.882927 T:1609561152 NOTICE: Thread LanguageInvoker start, auto delete: false
12:21:38 102.906731 T:1967992832 ERROR: Control 50 in window 10025 has been asked to focus, but it can't

Removing playlist items causes "Playlist item not found" error

Deleting an item from a playlist or having the plugin auto-remove titles from "Watch Later" will cause a "Playlist item not found" error.

I don't think it produces any errors or warnings in the Kodi log. The only entry that sticks out is "Attempt to use invalid handle -1" but that may have no connection to that issue.

Neither re-installing the plugin nor re-authenticating fixed the issue for me. Maybe the API changed?

Support for "My Mix" and other youtube playlists

For a while now youtube has had "Youtube Mixes" that add music based on your tastes to them. I cannot find a way to start playing these playlist through kodi however. Support for the default on called "My Mix" would be great to have in the Kodi Addon.

Audio starts after video

Kodi 16.1
Version: 5.2.1

When starting a video by youtube the first few moments are without sound.

720p doesn't buffer anymore after installing certain other youtube addons

Hi,
Youtube plugin used to be working fine for me on 720p. I can also watch 720p videos in Browser just fine.

Kodi 16.1 Jarvis (Git:20160424-c327c53)
Youtube (v5.2.1)

Then I installed these 2 addons:

youtube-dl Control (v16.627.0)
YouTube Download Context Menu (v1.1.0)

And after installing the 2nd addon, 720p no longer plays well. There is some buffering issue.

_360p and lower quality:_

  • videos still play just fine

_720p:_

  • Video starts paused
  • Says "Buffering 1%..." and buffering just continues forever, until the cache size is 100% used up
  • Pressing play will start playing the video immediately

BUT

  • Then once buffer end is reached, sound cuts out and video scrambles
  • Its supposed to auto-pause at this point, and buffer a little more. Doesnt do that.
  • Have to manually pause / un-pause and intervene when buffer is reached.

THEN:

  • disabled the extra youtube addons, did not solve anything
  • un-installed the extra youtube addons, still issue remains

So what could be the issue here? Is there some way I can clear away these addons or associated data and start again? Which addon is responsible? Perhaps it is some addon dependancy shared library, or of different version, which got installed, but was not removed again?

Can't do anything, crash.

20:10:50 T:140092208310016 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'urllib2.URLError'> Error Contents: <urlopen error [Errno 0] Error> Traceback (most recent call last): File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/default.py", line 7, in <module> runner.run(__provider__) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run __RUNNER__.run(provider, context) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run results = provider.navigate(context) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate result = method(context, re_match) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 255, in _internal_search return self.on_search(query, context, re_match) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 477, in on_search page_token=page_token) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/utils/function_cache.py", line 107, in get cached_data = partial_func() File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 488, in search return self._perform_v3_request(method='GET', path='search', params=params, quota_optimized=False) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 615, in _perform_v3_request result = requests.get(_url, params=_params, headers=_headers, verify=False, allow_redirects=allow_redirects) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 179, in get return _request('GET', url, **kwargs) File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 155, in _request response = opener.open(request) File "/usr/lib/python2.7/urllib2.py", line 429, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 447, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open context=self._context) File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open raise URLError(err) URLError: <urlopen error [Errno 0] Error> -->End of Python script error report<-- 20:10:50 T:140094213235968 ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/kodion/search/query/?q=acdx 20:10:50 T:140094213235968 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/kodion/search/query/?q=acdx) failed 20:10:50 T:140092208310016 NOTICE: [plugin.video.youtube] Running: YouTube (5.2.2) on Jarvis (16.1) with Python 2.7.12

Favorites update

when i added youtube channel to the favorites , why not update?new videos added to channels not show in favorites...before it worked

Endless activation request

Hi,

first of all, thanks for your work.
Since yesterday when I start the add-on it asks for activation and to input a code that I see on screen at the url youtube.com/activate.
No matter how many times I follow the procedure and try to complete the activation, I get a notification about some error from youtube and it becomes impossible to perform any search.

Certificate Validation Disabled

The software disables certificate validation in several places, allowing an attacker who can modify traffic between the Kodi installation and YouTube to MiTM the connection, and observe and tamper with any information sent or received.

    import sys
    # starting with python 2.7.9 urllib verifies every https request
    if False == verify and sys.version_info >= (2, 7, 9):
        import ssl

        ssl_context = ssl.create_default_context()
        ssl_context.check_hostname = False
        ssl_context.verify_mode = ssl.CERT_NONE
        handlers.append(urllib2.HTTPSHandler(context=ssl_context))
        pass

Certificate validation is explicitly turned off for features such as login:

        # url
        url = 'https://www.youtube.com/o/oauth2/token'

        result = requests.post(url, data=post_data, headers=headers, verify=False)
        if result.status_code != requests.codes.ok:
            raise LoginException('Login Failed')

I suspect each instance of verify=False can simply be removed, assuming the system's trust store is properly configured.

[Feature Request] Add Connect to Kodi via App

First thank for development

Is there any plan to add the "Connect" function. All the smart tv´s are able to handle this, so it will be great to add this function also to your addon.

Show option "Unsubscribe from..." instead of "Subscribe to..." if already subscribed

Under "Subscriptions" where all the channels I subscribed to are listed everything works as expected: Opening the context menu of one such channel I get the option to "Unsubscribe". However under "My Subscriptions" where new videos of my subscribed channels are listed, the option "Subscribe to..." is available even though I have already subscribe to this channel (same is true under "Recommendations", not tested in other menues). I would expect to have an option "Unsubscribe from..." if I am already subscribed.

Add support for library integration

The idea would be that there is a context menu option like "Add to library" which then creates a strm and nfo file in e.g. addon_data/plugin.video.youtube/streams/. I am aware of the youtube library addon, but this addon focuses on integrating playlists/channels like tv shows. My use case is that when I encounter a great video (in my case often documentaries) I want to collect it somehow. Currently I do this by creating these files manually, automating this would be really convenient.

It seems like this should be fairly straight forward to implement and I would like to help. However I have no experience with kodi plugins, your plugin code is quite extensive and I failed to find an "entry point" to start understanding the parts relevant for such a feature. If you can point me to relevant code or to some resource on a "general kodi plugin design" (if it exists, probably not), I may look into it (within time constraints...).

AttributeError breaks most of it

Today, seemingly randomly, the plugin stopped working for the most part.
Signing in and out of YouTube accounts works, but none of the other menu items do.
The error box says to look at the log, which says the following:

11:46:16 T:140686938593024   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'XbmcPluginSettings' object has no attribute 'is_override_view_enabled'
                                            Traceback (most recent call last):
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/default.py", line 7, in <module>
                                                runner.run(__provider__)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run
                                                __RUNNER__.run(provider, context)
                                              File "/var/lib/kodi/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 59, in run
                                                if context.get_settings().is_override_view_enabled():
                                            AttributeError: 'XbmcPluginSettings' object has no attribute 'is_override_view_enabled'
                                            -->End of Python script error report<--

I tried the clear/delete options from the plugin config as well as reinstalling but nothing helped.

Kodi version 16.1 (16.1-5 arch package version)

How can I get it to work again?

urllib2 .py on Ubuntu 16.10

After update to Ubuntu 16.10, the plug-in doesn't work anymore:

00:04:39 T:140440892319488 NOTICE: [plugin.video.youtube] Running: YouTube (5.2.2) on Jarvis (16.1) with Python 2.7.12+
00:04:39 T:140440892319488 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'urllib2.URLError'>
Error Contents: <urlopen error [Errno 0] Error>
Traceback (most recent call last):
File "/home/afiergol/.kodi/addons/plugin.video.youtube/default.py", line 7, in
runner.run(provider)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run
RUNNER.run(provider, context)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run
results = provider.navigate(context)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate
result = method(context, re_match)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 157, in _internal_root
return self.on_root(context, re_match)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 503, in on_root
self.get_client(context)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 153, in get_client
refresh_tokens[0])
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/login_client.py", line 151, in refresh_token_tv
grant_type=grant_type)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/login_client.py", line 181, in refresh_token
result = requests.post(url, data=post_data, headers=headers, verify=False)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 184, in post
return _request('POST', url, data=data, json=json, *_kwargs)
File "/home/afiergol/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 155, in _request
response = opener.open(request)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open
context=self._context)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 0] Error>
-->End of Python script error report<--
00:04:39 T:140441627000896 ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/
00:04:39 T:140441627000896 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/) failed

1080p+ and 60fps support

I noticed that live videos on youtube currently play at 1080p,
but there is no way to play standard video at 1080p or larger.
Also 60fps would be swell..

Login fails

I recently updated to your distribution of this plugin (ver 5.2.2), and after activating it worked for about a day and then started failing in the usual ways that are indicative of a login failure. For example, if I go into "My Subscriptions" I get an empty listing.

It always bugged me the way this plugin would encounter login failures and output nothing to the user or the Kodi log, so I started by adding debug logging messages to provider.py and login_client.py. (I'll submit a pull request for this.)

With that done, I could now see the reason why refreshing the access tokens was failing was: anauthorized_client.

According to:
http://stackoverflow.com/questions/13871982/unable-to-refresh-access-token-response-is-unauthorized-client?answertab=votes#tab-top

this happens when you use different client IDs for the auth and refresh calls. So something is confused in the code.

If I repeat the device authorization process, it works again briefly, then fails the same way.

Thoughts?

On a related note, is there a communication channel (email, IRC, forum) to discuss the internals of this plugin? The forum thread for this plugin wouldn't be appropriate for internals, plus I hate giant forum threads in general as s communication channel. They're like a black hole where information goes to die. Too much work to determine what bugs/issues have already been discussed, so everyone asks the same questions repeatedly, making the thread longer, and further burrying the useful info.

Live stream doesn't work

When attempting to play any YouTube live stream video, the video fails to load and one of the following messages appear:

Youtube error
Check the log for more information.

Playback failed
One or more items failed to play. Check the log for more information about this message.

Log file information in debug mode when attempting to play live stream video:

16:18:49 T:2099150416   DEBUG: [plugin.video.youtube] Starting Kodion framework by bromix...
16:18:50 T:2099150416   DEBUG: JSONRPC: Incoming request: { "jsonrpc": "2.0", "method": "Application.GetProperties", "params": {"properties": ["version", "name"]}, "id": 1 }
16:18:50 T:2099150416  NOTICE: [plugin.video.youtube] Running: YouTube (5.1.20.1) on Jarvis (16.1) with Python 2.6.5
16:18:50 T:2099150416   DEBUG: [plugin.video.youtube] Path: "/play/
16:18:50 T:2099150416   DEBUG: [plugin.video.youtube] Params: "{'video_id': u'DekL5q5e9lM'}"
16:18:50 T:2099150416   DEBUG: [plugin.video.youtube] Selecting YouTube config "Jarvis"
16:18:50 T:2099150416   DEBUG: [plugin.video.youtube] User is logged in
16:18:50 T:1989241720   DEBUG: DialogProgress::Open called
16:18:50 T:1989241720   DEBUG: ------ Window Init (DialogProgress.xml) ------
16:18:51 T:2099150416   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.Exception'>
                                            Error Contents: unknown yt_format for itag "91"
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/default.py", line 7, in <module>
                                                runner.run(__provider__)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run
                                                __RUNNER__.run(provider, context)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run
                                                results = provider.navigate(context)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate
                                                result = method(context, re_match)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/kodion/register_provider_path.py", line 12, in wrapper
                                                return func(*args, **kwargs)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 363, in on_play
                                                return yt_play.play_video(self, context, re_match)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/yt_play.py", line 17, in play_video
                                                video_streams = client.get_video_streams(context, video_id)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 80, in get_video_streams
                                                video_streams = video_info.load_stream_infos(video_id)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/video_info.py", line 324, in load_stream_infos
                                                return self._method_get_video_info(video_id)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/video_info.py", line 549, in _method_get_video_info
                                                return self._load_manifest(url, video_id)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/video_info.py", line 495, in _load_manifest
                                                raise Exception('unknown yt_format for itag "%s"' % itag)
                                            Exception: unknown yt_format for itag "91"
                                            -->End of Python script error report<--
16:18:51 T:1989241720   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
16:18:51 T:2099150416    INFO: Python script stopped
16:18:51 T:2099150416   DEBUG: Thread LanguageInvoker 2099150416 terminating
16:18:51 T:1989241720   DEBUG:  bool XFILE::CPluginDirectory::WaitOnScriptResult(const string&, int, const string&, bool) - plugin exited prematurely - terminating
16:18:51 T:1989241720   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtube/play/?video_id=DekL5q5e9lM]
16:18:51 T:1989241720   DEBUG: Playlist Player: one or more items failed to play... aborting playback

I find it important to let you know guys.
BTW, great plugin! Thank you very much for it!

feature request: show description and copy video/channel/playlist url

Hi,

first of all. thanks a lot, after selecting a working api key the plugins workes very grate!
but youtube dosent hosts only videos but there are descriptions that you may want to read and that also from your sofa with kodi. So could you please add an option to view the complete video description (and methadata (views, thumbs, datetime of publification) (and klick including links to other youtube videos to play them)

secoundly maybe you want to share the video (channel or playlist) with someone else, so it would be grate if you could view. copy (if your system has a clipboard accessible (mine has because there isnt only kodi on that xserver) and share (maybe show a big qr code) the video easealy without searching for it again from browser.

it would be very grate if you could implement this features
thanks a lot

No hardware acceleration on 4k videos

Hello! I use enybox x2 with amlogic s912 processor. Kodi's version is 17b6. YouTube addon – the latest master. When I play video in 4k or 1080p resolution using addon it laggs. When I decode it as downloaded from YouTube single video file (no audio) it plays perfectly in Kodi, Mx Player and even Opera browser. I'm not sure is this a hardware acceleration issue or cache, but increasing cache size didn't help. My Internet connection speed is high.

Does not work with kodi 16.1 and python 2.7.12+

I have this trouble on a Debian Squeeze/testing with kodi (16.1) and python (2.7.11-2) coming from testing. This is the error log:

09:53:03 T:140200651253504 NOTICE: [plugin.video.youtube] Running: YouTube (5.2.2) on Jarvis (16.1) with Python 2.7.12+
09:53:11 T:140200651253504 NOTICE: Previous line repeats 1 times.
09:53:11 T:140200651253504 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'urllib2.URLError'>
Error Contents: <urlopen error [Errno 0] Error>
Traceback (most recent call last):
File "/home/pinolino/.kodi/addons/plugin.video.youtube/default.py", line 7, in
runner.run(provider)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run
RUNNER.run(provider, context)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run
results = provider.navigate(context)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate
result = method(context, re_match)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 255, in _internal_search
return self.on_search(query, context, re_match)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 477, in on_search
page_token=page_token)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/kodion/utils/function_cache.py", line 107, in get
cached_data = partial_func()
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 488, in search
return self._perform_v3_request(method='GET', path='search', params=params, quota_optimized=False)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/youtube.py", line 615, in _perform_v3_request
result = requests.get(_url, params=_params, headers=_headers, verify=False, allow_redirects=allow_redirects)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 179, in get
return _request('GET', url, *_kwargs)
File "/home/pinolino/.kodi/addons/plugin.video.youtube/resources/lib/kodion/simple_requests/api.py", line 155, in _request
response = opener.open(request)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open
context=self._context)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 0] Error>
-->End of Python script error report<--
09:53:11 T:140201815980928 ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/kodion/search/query/?q=cosmo%20le%20voci
09:53:11 T:140201815980928 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/kodion/search/query/?q=cosmo%20le%20voci) failed

What is wrong?

New update ?

I didn't try the last changes (my set is OSMC on RPI 3) but are they eligible for a new release ? It would be really nice to have subtitles support.

Error on screen when playing a Youtube playlist

I'm using addon 5.2.1 on OSMC. When I try to send a Youtube playlist link (via Yatse sharing) from my mobile phone to the media center the following happen:

  1. Playlist videos start playing
  2. An error message, saying "Playing error" appear on the screen and it is not possible to remove without stop the video.
  3. On log I can see this line:
    ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtube/play/?playlist_id=RDLdRxXID_b28&order=default&play=1&video_id=LdRxXID_b28]

Since playlist starts normally how is it possible to remove this strange error message ?

Unpausing a video after a long pause cause play to freeze and then stop

You cannot pause a video for more that a couple of minutes, because otherwise when you unpause it, the video freezes and eventually you drop back to Kodi menu.

Steps to reproduce:

Play a long video.
Pause it for 10 minutes.
Unpause it.

Expected behaviour:

Video continues playing without any problems after pausing indefinitely. (Unless the video is no longer available or some catastrophic event has occured.)

Actual behaviour:

After unpausing, the video plays for a short time, then it freezes and a short while later you drop out into the menu you where in before you started playing the video.

This has been a problem since all the time I have been using Kodi on different versions of ubuntu. Right now my config is:

Lubuntu 16.04.1 LTS, with mainline kernel 4.8.6 (I am not using the vanilla kernel because lirc is broken for my device) at the moment.
Kodi 17.0-BETA5-Git:20161028
Youtube addon version 5.2.1

Error when Enable setup wizard -> Choose region and language

Here is my log when I run setup wizard and choose region and language

09:00:09 T:4028   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: 'items'
                                            Traceback (most recent call last):
                                              File "C:\Users\hoangkien\AppData\Roaming\Kodi\addons\plugin.video.youtube\default.py", line 7, in <module>
                                                runner.run(__provider__)
                                              File "C:\Users\hoangkien\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\runner.py", line 32, in run
                                                __RUNNER__.run(provider, context)
                                              File "C:\Users\hoangkien\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\impl\xbmc\xbmc_runner.py", line 23, in run
                                                results = provider.navigate(context)
                                              File "C:\Users\hoangkien\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\abstract_provider.py", line 113, in navigate
                                                self._process_wizard(context)
                                              File "C:\Users\hoangkien\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\kodion\abstract_provider.py", line 100, in _process_wizard
                                                wizard_step[0](*wizard_step[1])
                                              File "C:\Users\hoangkien\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\youtube\helper\yt_setup_wizard.py", line 49, in process
                                                _process_language(provider, context)
                                              File "C:\Users\hoangkien\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\youtube\helper\yt_setup_wizard.py", line 14, in _process_language
                                                items = json_data['items']
                                            KeyError: 'items'
                                            -->End of Python script error report<--

Problem to search video on Youtube version 5.2.2

Hello
I come to you for a mistake on the version of youtube 5.2.2 on kodi 17
It's about searching for video, you must type two times to find a video
If you can remedy this problem has
Kind regards
Thank you

Subtitles

Hello, my name is João, i´m from portugal and i made 3 addons that only works with your pluggin. In one of my addons i´ve adden documentarys that needs subtitles. It works fine if the subtitle in portuguese is hardcoded in the video, but, if its not it doens´t apear in the video on kodi. Can you add subtitle item on the addon?
Hope you understand my issue. Sorry my bad english
Thanks a lot for the great plugin

Unknown kind '' error

Hi,

I have a problem with your plugin on my Raspberry Pi 2 with OpenElec 6.0.3. It's a very mysterious error and I hope I describe it well.

The plugin was installed cleanly (no folder 'plugin.video.youtube' in addon_data). I log me in with the youtube.com/activate-thing. The plugin works very well.
Someday (I cannot reproduce when), I get an error-message, when I want to watch my subscriptions:

Exception in ContentProvider: Unknown kind ''

Here the log-entry:

08:07:14 31.521519 T:1574437952 NOTICE: -->Python Interpreter Initialized<--
08:07:15 32.042309 T:1574437952 NOTICE: [plugin.video.youtube] Running: YouTube (5.2.1) on Isengard (15.2) with Python 2.7.3
08:07:15 32.189186 T:1574437952 ERROR: [plugin.video.youtube] Unknown kind ''
08:07:28 44.929531 T:1967505408 ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/subscriptions/list/
08:07:28 44.931992 T:1967505408 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/subscriptions/list/) failed
08:07:28 44.947025 T:1574437952 NOTICE: Thread BackgroundLoader start, auto delete: false
08:07:29 45.714966 T:1574437952 NOTICE: Thread LanguageInvoker start, auto delete: false

If this error-message appear, I try it a few times again and suddenly it works... After this message, this exception doesn't appear again.

If I close the plugin and want to use it again, the same message appears again. Now, I have to try it a few times more (more then the first time) and it suddenly works...

If I retry this scenario again, it's now unpossible to skip this error message by try it again and again. If I restart the Rasperry Pi, I have the problem, which I described in Issue #42

After I deleted the addon_data-files, I can use the plugin again.

Add pairing support

Currently the add-on lack support (AFAIK) for pairing with youtube as the official apps for smart TVs do. So that's a "nice to have".

Enable support of Multichannel Audio

I'm using the last version of the addon on OpenELEC 6.0.3 (Kodi 15.2) and also on LibreELEC 7.0.2 (Kodi 16.1) on Raspberry Pi 2.
If I try to watch a YouTube video with Multichannel audio (for example Dolby Digital 5.1) the audio in output is always 2.0 channel (Stereo) with AAC Codec.
My setup is to use Audio Passthrough via HDMI (I have an AV Receiver), and I correctly can listen Multichannel audio such as Dolby Digital, DTS, etc... So the problem is not related to my configuration.

Please, is it possible to supports Multichannel audio (Dolby, DTS, etc..)?
May be is it related to add the DASH support in the addon?

Thanks.

\

Hi I was wondering if youtube is broken or not because every build I used says youtube error check your log info.

Attempting to populate Titan widgets like "My Subscriptions" leads to error

Version 5.2.4 on Jarvis 16.1 with Python 2.7.12. Log:

07:14:46 T:140592499570432  NOTICE: [plugin.video.youtube] Running: YouTube (5.2.4) on Jarvis (16.1) with Python 2.7.12
07:14:47 T:140593704564480  NOTICE: Previous line repeats 1 times.
07:14:47 T:140593704564480   ERROR: GetDirectory - Error getting include
07:14:57 T:140592608675584   ERROR: Previous line repeats 3 times.
07:14:57 T:140592499570432   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: 'NoneType' object is not callable
                                            Traceback (most recent call last):
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/default.py", line 7, in <module>
                                                runner.run(__provider__)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/kodion/runner.py", line 32, in run
                                                __RUNNER__.run(provider, context)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/kodion/impl/xbmc/xbmc_runner.py", line 23, in run
                                                results = provider.navigate(context)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/kodion/abstract_provider.py", line 123, in navigate
                                                result = method(context, re_match)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/kodion/register_provider_path.py", line 12, in wrapper
                                                return func(*args, **kwargs)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/youtube/provider.py", line 394, in _on_yt_specials
                                                return yt_specials.process(category, self, context, re_match)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/yt_specials.py", line 242, in process
                                                return _process_new_uploaded_videos_tv(provider, context, re_match)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/yt_specials.py", line 220, in _process_new_uploaded_videos_tv
                                                result.extend(tv.my_subscriptions_to_items(provider, context, json_data))
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/tv.py", line 23, in my_subscriptions_to_items
                                                utils.update_video_infos(provider, context, video_id_dict, channel_items_dict=channel_item_dict)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/utils.py", line 147, in update_video_infos
                                                video_data = resource_manager.get_videos(video_ids)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/resource_manager.py", line 109, in get_videos
                                                result.update(self._update_videos(list_of_50))
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/youtube/helper/resource_manager.py", line 68, in _update_videos
                                                video_data = function_cache.get_cached_only(self._get_video_data, unicode(video_id))
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/kodion/utils/function_cache.py", line 66, in get_cached_only
                                                data, cache_id = self._get_cached_data(partial_func)
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/kodion/utils/function_cache.py", line 56, in _get_cached_data
                                                return self._get(cache_id), cache_id
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/kodion/utils/storage.py", line 191, in _get
                                                result = self._execute(False, query, [item_id])
                                              File "/home/jordan/.kodi/addons/plugin.video.youtube/resources/lib/kodion/utils/storage.py", line 79, in _execute
                                                return self._cursor.execute(query, values)
                                              File "/usr/lib/python2.7/sqlite3/dbapi2.py", line 69, in convert_timestamp
                                                year, month, day = map(int, datepart.split("-"))
                                            TypeError: 'NoneType' object is not callable
                                            -->End of Python script error report<--
07:14:58 T:140592516355840   ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/special/new_uploaded_videos_tv/?reload=20161027110412

Watch later playlist empty

Hi,

using your plugin on OSMC.tv (runs on Kodi) I get empty "Watch later" playlist. I tried to re-login, but it's still empty. Other playlists are ok though.

Regarding google API key issues

Hi
Great that someone has taken over maintanace of the YouTube addon.
I was looking at how the API keys are handled in the Youtube plugin.
Would it not be a better way to have a list of available API keys. So when a user starts the plugin for the first time it will lock a set of API keys. The selection of what API keys to use should be selected by random.
So if there is a quota issues then it should be an easy fix to add some more API keys to the list.
There is probably some user that already generated an own set of key and want to keep using them. So an option could be to override the random behaviour in the settings-file. So for example if "youtube.api.key", "youtube.api.id", "youtube.api.secret" are all empty then use the random API key selection behaviour. If not use the provided keys from the settings file.

Recent content type change reduces view options skin

Issue

In a recent commit ( 542cbfa ) the content type went from episodes to videos however in Aeon Nox at least this reduces the view options to only list / icons so you see no information only its label.

Workaround

Switched content type back to the original kodion.constants.content_type.EPISODES in code returns all the view types (low_list/ tri-panel etc..) but not sure if this is the right solution.

email address in addon.xml

I noticed that this is the new repo for the youtube plugin. But since bromix stopped maintaining this plugin, it might be a good idea to change the email in addon.xml to something else?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.