Kodi Community Forum

Full Version: [depricated] old YouTube Plugin - XBMC 13.0 Frodo/Gotham only
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hinz

HenrikDK Wrote:Wow. thats alot of errors Blush, will look into them today Smile

Well, ignore my comment about "Refine to user" on 1.8.1. I must have missed "to user" and thought it was a feature to edit the actual search (like "Refine search").
Hinz Wrote:In the ”Video information” window: http://img638.imageshack.us/img638/4169/...t003pd.png

The reason it says "No plot" is because the video has no description. See:
http://www.youtube.com/watch?v=bSZiXt3PrvE

I will see if we can expose more of the data we get from youtube to xbmc. I know we currently get the upload date, and use it, but it isn't shown.

Hinz

TobiasTheCommie Wrote:The reason it says "No plot" is because the video has no description. See:
http://www.youtube.com/watch?v=bSZiXt3PrvE

I will see if we can expose more of the data we get from youtube to xbmc. I know we currently get the upload date, and use it, but it isn't shown.

I wasn't really saying the "no plot" was a bug. Just that it was in that window I wanted to see video upload date, probably wasn't too clear.
Nektarios Wrote:Hey Henrik,

Have you find any solution for the custom home addon button? I really would love to have youtube on the home screen!

The closest I've come to finding something that would do what you ask would be the method described here:
http://forum.xbmc.org/showpost.php?p=617...tcount=277

Which can also be used for adding the plugin root folder to favorites.

Other than that i think it would require an xbmc track ticket with a more through explanation Smile
Im trying to use your plugin from a plugin Im writing. When Im calling
Code:
url = "plugin://plugin.video.youtube.beta/?action=play_video&videoid=%s" % VideoId
xbmc.RunPlugin(%s)' % url

I get

Code:
ERROR:  XFILE::CPluginDirectory::SetResolvedUrl - called with an invalid handle.

Do you have any plans for letting "external" plugins launch your superb work?
Popeye Wrote:Im trying to use your plugin from a plugin Im writing. When Im calling
Code:
url = "plugin://plugin.video.youtube.beta/?action=play_video&videoid=%s" % VideoId
xbmc.RunPlugin(%s)' % url

I get

Code:
ERROR:  XFILE::CPluginDirectory::SetResolvedUrl - called with an invalid handle.

Do you have any plans for letting "external" plugins launch your superb work?

Actually, this is an xbmc issue, theres nothing in our code to prevent it from being used in other plugins, and we would very much like to see others use it in their plugin for what every cewl stuff they can think of Smile

The problem is that you're calling RunPlugin which doesn't give a proper handle for video playback, we've been experimenting with this our selves though, try something like:
Code:
cm.append( (self.__language__(30522), "XBMC.PlayMedia(%s?path=%s&action=play_video&quality=SD&videoid=%s)" % ( sys.argv[0],  item("path"), item("videoid") ) ) )

This code sample is from the latest beta (linky Smile), and implements video quality selection from the context menu, If you replace "RunPlugin" with "XBMC.PlayMedia" it should work Smile. (note, from the example this also allows you to set predetermined upper limits for video quality, should that strike your fancy Smile )
@HenrikDK , thank you , THANK you, thank YOU!

With your help I have now managed to create a simple addon parsing and listing a rss feed with links to youtube and vimeo. Clicking a youtube video link launches your excellent addon.

Code:
def playVideo(params):
    get = params.get
    videoType = get("videotype")
    videoId = get("videoid")
    url = ""
    if (videoType == "youtube"):
        url = "plugin://plugin.video.youtube.beta/?action=play_video&videoid=%s" % videoId
        
    if (videoType == "vimeo"):
        url = "plugin://plugin.video.vimeo/?mode=2&videoID=%s" % videoId
    
    xbmc.executebuiltin("xbmc.PlayMedia("+url+")")

-time to sleep :p

Hinz

A few suggestions.

Downloading videos
-It should be some way to see when a file hasn't been downloaded yet.
*Different file extension, e.g. "*.!mp4". Though then the file won't appear when browsing in XBMC I think.
*Temporarly rename the file while downloading, e.g.
"[DOWNLOADING]file.wmv"
"[DOWNLOAD-INCOMPLETE]file.wmv" (fai
-Some place in the plugin to see and stop downloads would be good.


"Now playing..." on the Context menu is "missing" on YouTube files and YouTube subscriptions.

Adding videos directly to a specific playlist would be good. As you can't make folders in Favorites then only way to have any order at all on YouTube is with playlists. If you make this possible then deleting from playlists would be needed too.
is this the official youtube addons with Beta3? I only saw one and didn't download it for fear it was the old youtube addon.

-=Jason=-
yes.
Hinz Wrote:A few suggestions.

Downloading videos
-It should be some way to see when a file hasn't been downloaded yet.
-Some place in the plugin to see and stop downloads would be good.
The "plugin" api is very limiting and basically only allow us to interact with XBMC in 2-3 specific ways depending on how you look at it: folders lists, context-menus and video playback. What you're asking for doesn't really seem to fit into that "paradigm", though I agree it would be nicer Sad

Hinz Wrote:*Different file extension, e.g. "*.!mp4". Though then the file won't appear when browsing in XBMC I think.
We have no real way of knowing what file format YouTube will send us when we start a download (basically we just dump the data stream to disk), you could probably write an algorithm to check the header of the file stream for a container marker, but i regard that as an extreme solution very much outside the scope of a simple python plugin. As such we decided that .mp4 would be the best choice even though some files are flv, (both are playable by more capable video playback software like xbmc, vlc and anything else ffmpeg based that doesn't care what the file suffix says Smile )

Hinz Wrote:*Temporarly rename the file while downloading, e.g.
"[DOWNLOADING]file.wmv"
"[DOWNLOAD-INCOMPLETE]file.wmv" (fai
This is doable, and i think i makes sense added to the TODO..

Hinz Wrote:"Now playing..." on the Context menu is "missing" on YouTube files and YouTube subscriptions.
Not sure I get this one, which is probably why it's missing Big Grin, could you elaborate (perhaps even make screenshots for the un-enlightened? Big Grin )

Hinz Wrote:Adding videos directly to a specific playlist would be good. As you can't make folders in Favorites then only way to have any order at all on YouTube is with playlists. If you make this possible then deleting from playlists would be needed too.
I know this is possible with the YouTube API, but finding a way to implement it in xbmc with the current limitations could be a challenge, BUT i think it needs to be researched, so I've added to the TODO.. Smile
Feature Request - For user playlists, can we get the ability to play all items in the playlist? Also, can we get the ability to play the items in random order? Thanks!
Hellos!

First of all - GREAT plugin this is! Smile I'm enjoying it a lot... except for two issues I'm having.

First, downloading videos does not work at all for me. When I initiate a download, the destination file is created with a size of 0 bytes, and it stays that way.

The debug log says the following when I initiate the download:

Code:
14:31:25 T:4584 M:4294967295   DEBUG: XFILE::CPluginDirectory::RunScriptWithParams - calling plugin You Tube('plugin://plugin.video.youtube/','-1','?path=/root/subscriptions&action=download&videoid=Z7n7QXh8s9c&title=Let%27s+Play+Space+Quest+-+part+14+-+Sarien+encounter')
14:31:25 T:4584 M:4294967295    INFO: initializing python engine.
14:31:25 T:4584 M:4294967295   DEBUG: Win32DllLoader::Load(special://xbmcbin/system/python/python24.dll)
14:31:26 T:4584 M:4294967295   DEBUG:   msg: 'import site' failed; use -v for traceback
14:31:26 T:4584 M:4294967295   DEBUG: new python thread created. id=5
14:31:26 T:4720 M:4294967295   DEBUG: thread start, auto delete: 0
14:31:26 T:4720 M:4294967295   DEBUG: Python thread: start processing
14:31:26 T:4720 M:4294967295   DEBUG:   msg: 'import site' failed; use -v for traceback
14:31:26 T:4720 M:4294967295  NOTICE: -->Python Interpreter Initialized<--
14:31:26 T:4720 M:4294967295   DEBUG: XBPyThread::Process - The source file to load is D:\Programs\XBMC\portable_data\addons\plugin.video.youtube\default.py
14:31:26 T:4720 M:4294967295   DEBUG: XBPyThread::Process - Setting the Python path to D:\Programs\XBMC\portable_data\addons\plugin.video.youtube;D:\Programs\XBMC\addons\script.module.pil\lib;D:\Programs\XBMC\addons\script.module.pysqlite\lib;special://xbmc/system/python/DLLs;special://xbmc/system/python/Lib;special://xbmcbin/system/python/python24.zip;special://xbmc/system/python\DLLs;special://xbmc/system/python\lib;special://xbmc/system/python\lib\plat-win;special://xbmc/system/python\lib\lib-tk;D:\Programs\XBMC
14:31:26 T:4720 M:4294967295   DEBUG: XBPyThread::Process - Entering source directory D:\Programs\XBMC\portable_data\addons\plugin.video.youtube
14:31:26 T:4720 M:4294967295  NOTICE: YouTube-1.8.1
14:31:26 T:4720 M:4294967295   DEBUG: LoadLibraryExA called with flags:
                                             - LOAD_WITH_ALTERED_SEARCH_PATH
14:31:26 T:4720 M:4294967295   DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\_socket.pyd)
14:31:26 T:4720 M:4294967295   DEBUG: LoadLibraryExA called with flags:
                                             - LOAD_WITH_ALTERED_SEARCH_PATH
14:31:26 T:4720 M:4294967295   DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\_ssl.pyd)
14:31:26 T:4584 M:4294967295   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
14:31:26 T:4720 M:4294967295   DEBUG: LoadLibraryExA called with flags:
                                             - LOAD_WITH_ALTERED_SEARCH_PATH
14:31:26 T:4720 M:4294967295   DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\pyexpat.pyd)
14:31:27 T:4720 M:4294967295  NOTICE: YouTube-1.8.1 construct_video_url: stream_map : False
14:31:27 T:4584 M:4294967295    INFO: XCURL::DllLibCurlGlobal::CheckIdle - Closing session to http://feeds.feedburner.com (easy=011F3260, multi=002BFA00)
14:31:27 T:4584 M:4294967295    INFO: XCURL::DllLibCurlGlobal::CheckIdle - Closing session to http://xoap.weather.com (easy=012019B8, multi=011DD570)

Second issue:

The skin's view mode is always reset to the default mode when I jump from one directory to another when browsing through Youtube.

E.g. I choose one of my subscriptions, get the first page of videos. I set the view mode from "Thumbnails" to "Wide list" to be able to read the full video names. I choose "More results", and the next page is displayed as Thumbnails again. This happens with all skins I tried and is - sorry - very annoying. Smile

Any hints on those two things?

Oh, and another thing: Seeking in a Youtube video is, well, not really possible. I can jump back and forth a bit, but only inside what has already been buffered. When I enter e.g. "5:00" in a 10-minute video, playback stops, network activity is still quite high, but it does not jump to 5 minutes right away. This is an issue though I already had with the previous Youtube plugin. The first two ones occurred only with this new one; downloading did work correctly with the old one.
ghostelement Wrote:Feature Request - For user playlists, can we get the ability to play all items in the playlist? Also, can we get the ability to play the items in random order? Thanks!

We've tried to create a play all context menu item but couldn't get it to work, but Playlists should already have the Queue Folder option which would allow you to achieve almost the same thing (you have to start the first video but the rest should be the same). Don't know if XBMC has a shuffle option for video playlists but its basically out of our hands, please file a trac ticket if it isn't possible Smile.
Loc2262 Wrote:First, downloading videos does not work at all for me. When I initiate a download, the destination file is created with a size of 0 bytes, and it stays that way.

The debug log says the following when I initiate the download:
Hi as far as I can tell that seems to be an incomplete log, please post a full log with debug enabled in the plugin. From the log It doesn't seem to begin downloading. Also an incomplete debug log makes it very hard for me to get a complete picture of the situation (ex what OS are you using, which folder are you trying to save to, etc, etc)

Loc2262 Wrote:Second issue:
The skin's view mode is always reset to the default mode when I jump from one directory to another when browsing through Youtube.

E.g. I choose one of my subscriptions, get the first page of videos. I set the view mode from "Thumbnails" to "Wide list" to be able to read the full video names. I choose "More results", and the next page is displayed as Thumbnails again. This happens with all skins I tried and is - sorry - very annoying. Smile
What skin are you using?
From the known problems section on the homepage

Quote:Known problems¶

One of the main features of the plugin is that it defaults to thumbnails view for video items. This only works when using the default "Confluence" skin as the plugin is dependent on the Id defined for confluences thumbnails view.

It should be noted that we already created a trac ticket on resolveing this problem (search the thread for the ticket ID if the details matter to you Big Grin) but the devs need time to figure out a proper fix an as such it won't be solved in time for the release of dharma Sad.

Loc2262 Wrote:Oh, and another thing: Seeking in a Youtube video is, well, not really possible. I can jump back and forth a bit, but only inside what has already been buffered. When I enter e.g. "5:00" in a 10-minute video, playback stops, network activity is still quite high, but it does not jump to 5 minutes right away. This is an issue though I already had with the previous Youtube plugin.

Yeah this seems to be an issue with xbmc's player core and the way youtube handles fastforwading through streems. I have the same problem with most streams though the HD qualities (720p and above) seem to behave much better most of the time Smile.

/HenrikDK