Release - YouTube Plug-in Thread

  Thread Rating:
  • 10 Vote(s) - 4.6 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bluenote Offline
Fan
Posts: 452
Joined: May 2010
Reputation: 3
Post: #2416
I'm really missing "recommended for you" functionality. Is there another way i can get this on Windows without using a browser?
find quote
jdf76 Offline
Donor
Posts: 677
Joined: Jun 2012
Reputation: 71
Location: Maryland USA
Post: #2417
New Alpha 5.4.0~alpha1

https://github.com/jdf76/plugin.video.yo.../tag/5.4.0
find quote
m28ew Offline
Junior Member
Posts: 9
Joined: Mar 2017
Reputation: 0
Post: #2418
What a great addon!
Everything runs perfect on my side

Just a n00b question...

If I created a playlist and I wanted to play it automatically using kodi's xbmc.PlayMedia
would it be possible if I'd like the order to be randomized instead of having the same sequence all the time?


Thank you
find quote
DjDiabolik Online
Senior Member
Posts: 220
Joined: Oct 2015
Reputation: 0
Post: #2419
(2017-06-15 09:38)jdf76 Wrote:  New Alpha 5.4.0~alpha1

https://github.com/jdf76/plugin.video.yo.../tag/5.4.0

OMG!! It's now possibly to create a "filtered" My Subscriction Smile I have on the pass ask if possibly to add this feature.....

But it's possibly to create a whitelist........ i thinks there's a better idea to create a "filtered" list and create a "My Subscription" channel whit some "hide" channel indicated and separated by "comma" like it's now for a whitelist. It's possible ?

If this is not possibly i thinks it's a good idea add, for example, a "context" function for add a channel directly on the "whitelist" directly from "My Subscription" or directly from search feature..... you thinks it's a good idea ?

...only on your "little world" can you lay down the law...
find quote
m28ew Offline
Junior Member
Posts: 9
Joined: Mar 2017
Reputation: 0
Post: #2420
does anyone know how to solve my issue?

I have a youtube playlist url:

Code:
https://www.youtube.com/playlist?list=PLQw-AwSCH8G3Dhw4vAu0R7OfxDWdUbhaR

according to bromix' instruction
Code:
https://forum.kodi.tv/showthread.php?pid=1930377#pid1930377

I've converted the link to make it played in random order (shuffle)
Code:
plugin://plugin.video.youtube/play/?playlist_id=PLQw-AwSCH8G3Dhw4vAu0R7OfxDWdUbhaR&order=shuffle

but then I don't know how to play the converted link

fyi, I have tried these 4 different following methods,

#1
Code:
li = xbmcgui.ListItem('', iconImage='', thumbnailImage='')
li.setInfo('video', {'Title': ''})
xbmc.Player().play(item=url, listitem=li)


#2
Code:
li = xbmcgui.ListItem( '', iconImage='', thumbnailImage='')
li.setProperty( "IsPlayable", "true")
li.setProperty( "Video", "true")
xbmc.Player().play( url, li)

#3
Code:
xbmc.executebuiltin('Container.Update(%s)' % url)

#4
Code:
xbmc.executebuiltin("xbmc.PlayMedia("+url+",isdir)")


but none of them worked on my side Huh

with method #2 / #3 / #4, I could only see the kodi was able to update the playlist, but then it just stopped & played nothing


any help would be appreciated

thank you


EDIT #1:

I've tried 2 more different methods:

#5
Code:
def play_video(name, iconimage, url, setres=False):
        liz = xbmcgui.ListItem(name, iconImage=iconimage, thumbnailImage=iconimage)
        liz.setInfo(type='Video', infoLabels={'Title':name})
        liz.setProperty("IsPlayable","true")
        liz.setPath(url)
        if not setres: xbmc.Player().play(url)
        else: xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, liz)


#6
Code:
xbmc.executebuiltin('XBMC.RunPlugin('+url+')')


but those methods still won't work with the converted link Huh


EDIT #2:

the converted link can work with this method #7

#7
Code:
liz = xbmcgui.ListItem('', iconImage='')
liz.setInfo(type='Video', infoLabels={'Title':''})
liz.setProperty("IsPlayable","true")
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
xbmcplugin.endOfDirectory(addon_handle)

but this method creates a link in a directory which requires a click, so the playlist can't be played directly / automatically Huh


please help me guys Smile
(This post was last modified: 2017-06-18 08:05 by m28ew.)
find quote
anxdpanic Offline
Senior Member
Posts: 121
Joined: May 2016
Reputation: 21
Post: #2421
Missing from that post is &play=1 is required to start playback

plugin://plugin.video.youtube/play/?playlist_id=PLQw-AwSCH8G3Dhw4vAu0R7OfxDWdUbhaR&order=shuffle&play=1
find quote
anxdpanic Offline
Senior Member
Posts: 121
Joined: May 2016
Reputation: 21
Post: #2422
Added alpha2 zips to https://github.com/jdf76/plugin.video.yo.../tag/5.4.0

- adds filtering My Subscriptions whitelist/blacklist toggle, and add/remove from filter by context menu in Subscriptions
find quote
m28ew Offline
Junior Member
Posts: 9
Joined: Mar 2017
Reputation: 0
Post: #2423
(2017-06-18 18:05)anxdpanic Wrote:  Missing from that post is &play=1 is required to start playback

plugin://plugin.video.youtube/play/?playlist_id=PLQw-AwSCH8G3Dhw4vAu0R7OfxDWdUbhaR&order=shuffle&play=1


Awesome!
Thanks for your help mate Smile

I tested the link with your fix
and now it can work with method #1, #2 & #5 (setres=False)


EDIT:

sorry for giving false report

with the the new fix,
yes! the playlist will be auto-played

but... Huh

unfortunately, kodi will play 1 video only (perhaps it's the first one in the list)

then it will stop and play nothing

the "PREV" & "NEXT" button will not work either (it won't change anything when it clicked)


here is my code if you want to try it: Smile
Code:
url = 'plugin://plugin.video.youtube/play/?playlist_id=PLQw-AwSCH8G3Dhw4vAu0R7OfxDWdUbhaR&order=shuffle&play=1'
li = xbmcgui.ListItem('', iconImage='', thumbnailImage='')
li.setInfo('video', {'Title': ''})
xbmc.Player().play(item=url, listitem=li)
(This post was last modified: 2017-06-19 04:45 by m28ew.)
find quote
DjDiabolik Online
Senior Member
Posts: 220
Joined: Oct 2015
Reputation: 0
Post: #2424
(2017-06-18 19:04)anxdpanic Wrote:  Added alpha2 zips to https://github.com/jdf76/plugin.video.yo.../tag/5.4.0

- adds filtering My Subscriptions whitelist/blacklist toggle, and add/remove from filter by context menu in Subscriptions

OMG!!! Yeah... thanks for adding also the blacklist........ i test immediatelly Smile

...only on your "little world" can you lay down the law...
find quote
anxdpanic Offline
Senior Member
Posts: 121
Joined: May 2016
Reputation: 21
Post: #2425
@m28ew

Code:
url = 'plugin://plugin.video.youtube/play/?playlist_id=PLQw-AwSCH8G3Dhw4vAu0R7OfxDWdUbhaR&order=shuffle&play=1'
xbmc.executebuiltin('PlayMedia("{url}")'.format(url=url))

or you can also create a temporary strm, and pass that to Player or setResolvedUrl
find quote
m28ew Offline
Junior Member
Posts: 9
Joined: Mar 2017
Reputation: 0
Post: #2426
(2017-06-20 00:50)anxdpanic Wrote:  @m28ew

Code:
url = 'plugin://plugin.video.youtube/play/?playlist_id=PLQw-AwSCH8G3Dhw4vAu0R7OfxDWdUbhaR&order=shuffle&play=1'
xbmc.executebuiltin('PlayMedia("{url}")'.format(url=url))

or you can also create a temporary strm, and pass that to Player or setResolvedUrl


Amazing!
Now the shuffled playlist really works with the your script! Cool

Thanks for sharing the useful info mate Smile
find quote
epicfail Offline
Member
Posts: 87
Joined: Jan 2015
Reputation: 1
Post: #2427
Hi!

I´m often get an error message when i start kodi....

See Log:

Code:
17:46:41.591 T:4592   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 "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\de​fault.py", line 7, in <module>
                                                runner.run(__provider__)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\kodion\runner.py", line 32, in run
                                                __RUNNER__.run(provider, context)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\kodion\impl\xbmc\xbmc_runner.py", line 23, in run
                                                results = provider.navigate(context)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\kodion\abstract_provider.py", line 93, in navigate
                                                result = method(context, re_match)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\kodion\register_provider_path.py", line 12, in wrapper
                                                return func(*args, **kwargs)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\youtube\provider.py", line 398, in _on_yt_specials
                                                return yt_specials.process(category, self, context, re_match)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\youtube\helper\yt_specials.py", line 263, in process
                                                return _process_new_uploaded_videos_tv(provider, context, re_match)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\youtube\helper\yt_specials.py", line 230, in _process_new_uploaded_videos_tv
                                                result.extend(tv.my_subscriptions_to_items(provider, context, json_data))
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\youtube\helper\tv.py", line 33, in my_subscriptions_to_items
                                                utils.update_video_infos(provider, context, video_id_dict, channel_items_dict=channel_item_dict)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\youtube\helper\utils.py", line 164, in update_video_infos
                                                video_data = resource_manager.get_videos(video_ids)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\youtube\helper\resource_manager.py", line 109, in get_videos
                                                result.update(self._update_videos(list_of_50))
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\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 "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\kodion\utils\function_cache.py", line 66, in get_cached_only
                                                data, cache_id = self._get_cached_data(partial_func)
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\kodion\utils\function_cache.py", line 56, in _get_cached_data
                                                return self._get(cache_id), cache_id
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\kodion\utils\storage.py", line 194, in _get
                                                result = self._execute(False, query, [item_id])
                                              File "C:\Users\micha\AppData\Roaming\Kodi\addons\plugin.video.youtube\resources\lib\yo​utube_plugin\kodion\utils\storage.py", line 80, in _execute
                                                return self._cursor.execute(query, values)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\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<--
17:46:41.648 T:2804   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.youtube/special/new_uploaded_videos_tv/?reload=
find quote
DjDiabolik Online
Senior Member
Posts: 220
Joined: Oct 2015
Reputation: 0
Post: #2428
I have a "stupid" question...... in preferences i see "Default View" setted at 504....... how i can found a list of exact view ? For example if i choice "Wall Info" what's the corresponding id ?

I have found some info searching on google (here -> https://github.com/faush01/Kodi.Skin.Con...ws.xml)... tryed to set two value to 515 but apparently i don't see nothings append...... how this works ?

Ah... i have the addons 5.4.0 alpha2 unofficial and if i remember on this unofficial version the ovverride view it's working.... or not ?

...only on your "little world" can you lay down the law...
find quote
anxdpanic Offline
Senior Member
Posts: 121
Joined: May 2016
Reputation: 21
Post: #2429
Updated the zip to alpha3 available at github
- adds thumbnail size choice (medium/high)

@epicfail: latest update should cover that if you'd like to test

@DjDiabolik: That is the only difference between official and unofficial, unofficial has override view. The values or hints where to find those values can usually be found in the MyVideoNav.xml for that skin. With unofficial if your skin is supported you can re-run the setup wizard to choose views by name.
find quote
DjDiabolik Online
Senior Member
Posts: 220
Joined: Oct 2015
Reputation: 0
Post: #2430
mmmmmmmmmm... about MyVideoNav.xml.... i can try to search how it's located on OSMC..... i thinks inside current estuary addons folder.....

I thinks there's here -> /usr/share/kodi/addons/skin.estuary/xml/

I have found this:
Code:
<views>50,51,52,53,54,55,500,501,502</views>

And possibly some explanation:
Code:
            <include>View_50_List</include>
            <include>View_51_Poster</include>
            <include>View_52_IconWall</include>
            <include>View_53_Shift</include>
            <include>View_54_InfoWall</include>
            <include>View_55_WideList</include>
            <include>View_500_Wall</include>
            <include>View_501_Banner</include>
            <include>View_502_FanArt</include>
I try to set it to 54 on both value...... see if work in about some hours Smile
Thanks for info..... you thinks this is the correct id ? I tryed to see the rest of files and apparently i can't found nothigs...

...only on your "little world" can you lay down the law...
(This post was last modified: 2017-06-20 22:32 by DjDiabolik.)
find quote
Post Reply