[RELEASE] YouTube (Video) Plugin

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Closed
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Thumbs Up  [RELEASE] YouTube (Video) Plugin
Post: #1
youtube plugin in the xbmc-addons svn.
ask any questions here

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find
Nazgulled Offline
Fan
Posts: 530
Joined: Feb 2009
Reputation: 0
Post: #2
For me, the same thing happens as in the "Apple Movie Trailers II" plguin, nothing happens...

I just installed it from the SVN and when I try to launch it, the window that tries to load the items from the web, quickly appears and disappears and from what I can see, it doesn't retrieve any items, it says 0.
find
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #3
then pastebin a full debug log. can't help without your help

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find
Nazgulled Offline
Fan
Posts: 530
Joined: Feb 2009
Reputation: 0
Post: #4
For a full debug log, I need to enable it in the advancedsettings.xml right? And which one is the log? Some file specifically or the one in my profile folder (since I use 8.10 Atlantis with -p flag) named xbmc.log?
find
tslayer Offline
Team-XBMC Developer
Posts: 3,557
Joined: Oct 2003
Reputation: 12
Post: #5
Manual has all this information. You can also look at the links in my signature.

42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find
whity Offline
Junior Member
Posts: 24
Joined: Dec 2008
Reputation: 0
Post: #6
Same here.


Code:
22:53:41 T:3066890032 M:275951616    INFO: initializing python engine.
22:53:41 T:3066890032 M:275951616   DEBUG: Loading: /usr/share/xbmc/system/python/python24-i486-linux.so
22:53:42 T:3066890032 M:275759104   DEBUG: new python thread created. id=2
22:53:42 T:2845805456 M:275759104   DEBUG: Running thread 2845805456
22:53:42 T:2845805456 M:275759104   DEBUG: thread start, auto delete: 0
22:53:42 T:2845805456 M:275759104   DEBUG: Python thread: start processing
22:53:42 T:3066890032 M:275689472   DEBUG: WaitOnScriptResult - waiting on the Youtube plugin...
22:53:42 T:2845805456 M:275689472  NOTICE: -->Python Interpreter Initialized<--
22:53:42 T:2845805456 M:275689472  NOTICE:
22:53:42 T:2845805456 M:275689472  NOTICE: Traceback (most recent call last):
22:53:42 T:2845805456 M:275689472  NOTICE:   File "/home/eee/.xbmc/plugins/video/Youtube/default.py", line 33, in ?
22:53:42 T:2845805456 M:275689472  NOTICE:
22:53:42 T:2845805456 M:275689472  NOTICE: plugin.Main()
22:53:42 T:2845805456 M:275689472  NOTICE:   File "/home/eee/.xbmc/plugins/video/Youtube/YoutubeAPI/xbmcplugin_categories.py", line 26, in __init__
22:53:42 T:2845805456 M:275689472  NOTICE:
22:53:42 T:2845805456 M:275689472  NOTICE: self.make_presets_folders()
22:53:42 T:2845805456 M:275619840  NOTICE:   File "/home/eee/.xbmc/plugins/video/Youtube/YoutubeAPI/xbmcplugin_categories.py", line 38, in make_presets_folders
22:53:42 T:2845805456 M:275619840  NOTICE:
22:53:42 T:2845805456 M:275619840  NOTICE: os.makedirs( xbmc.translatePath( self.BASE_PRESETS_PATH ) )
22:53:42 T:2845805456 M:275619840  NOTICE:   File "/usr/share/xbmc/system/python/python24.zip/os.py", line 159, in makedirs
22:53:42 T:2845805456 M:275619840  NOTICE:
22:53:42 T:2845805456 M:275619840  NOTICE: mkdir(name, mode)
22:53:42 T:2845805456 M:275619840  NOTICE: OSError
22:53:42 T:2845805456 M:275619840  NOTICE: :
22:53:42 T:2845805456 M:275619840  NOTICE: [Errno 2] No such file or directory: 'special://profile/plugin_data/video/Youtube'
22:53:42 T:2845805456 M:275619840  NOTICE:
22:53:42 T:2845805456 M:275619840   ERROR: Scriptresult: Error
22:53:43 T:2845805456 M:275554304   DEBUG: xbp_dlopen loading python lib /usr/share/xbmc/system/python/python24.zip/time.so. flags: 2
22:53:43 T:2845805456 M:275415040   DEBUG: Loading: /tmp/xbmc-eee/time.so
22:53:43 T:2845805456 M:275415040   DEBUG: RegisterExtensionLib, adding Z:/time.so (0xac00a0c8)
22:53:43 T:2845805456 M:275415040   DEBUG: xbp_dlsym - load symbol inittime
22:53:43 T:2845805456 M:275496960   DEBUG: xbp_dlopen loading python lib /usr/share/xbmc/system/python/python24.zip/collections.so. flags: 2
22:53:43 T:2845805456 M:275496960   DEBUG: Loading: /tmp/xbmc-eee/collections.so
22:53:43 T:2845805456 M:275496960   DEBUG: RegisterExtensionLib, adding Z:/collections.so (0xb06e2310)
22:53:43 T:2845805456 M:275496960   DEBUG: xbp_dlsym - load symbol initcollections
22:53:43 T:2845805456 M:275496960    INFO: Python script stopped

(Hope I got all of the relevant stuff)
find
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #7
i should say you need a very recent xbmc build. after the special:// paths patch. and until that patch is merged back to xbox branch. it won't work on xbox.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #8
all but the build date and revision.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find
whity Offline
Junior Member
Posts: 24
Joined: Dec 2008
Reputation: 0
Post: #9
Arr. Here you are:

22:53:08 T:3066890032 M:306335744 NOTICE: Starting XBMC, Platform: GNU/Linux. Built on Nov 14 2008 (SVN:16164)

It's the plain old Atlantis release.
find
tslayer Offline
Team-XBMC Developer
Posts: 3,557
Joined: Oct 2003
Reputation: 12
Post: #10
You need to update.

42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find
Nazgulled Offline
Fan
Posts: 530
Joined: Feb 2009
Reputation: 0
Post: #11
I guess I have too...

Couple of questions though, after upgrading to the latest SVN, should we reinstall the plugins too from the SVN Repo Installer?

And another thing, are they still going to the XBMC folder in "Program Files" (in Windows case) or to the user folder?
(This post was last modified: 2009-02-08 00:40 by Nazgulled.)
find
whity Offline
Junior Member
Posts: 24
Joined: Dec 2008
Reputation: 0
Post: #12
Good advise, tslayer. Smile

Works now like a charm... thank you both!
find
mikko70 Offline
Member
Posts: 80
Joined: Mar 2007
Reputation: 0
Post: #13
there is small bug.
before you could use plugin, you must run settings and set download path.

this causes problem
<setting id="download_path" type="folder" source="video" option="writeable" label="30110" default="" />
find
Temhil Offline
Skilled Python Coder
Posts: 397
Joined: Apr 2008
Reputation: 1
Location: Canada
Exclamation  Quick fix for Mac and Xbox
Post: #14
Hi Nuka1195,

Great plugin, thanks a lot.
I got the last release from SVN (last commit from Feb 9th), it works on windows, but it doesn't works on last official release of XBMC on XBOX and on Mac.

I made a quick fix in the xbmcplugin_category.py file which cover all the cases (tested on Windows, XBOX and Mac).

Code:
"""
    Category module: list of categories to use as folders
"""

# main imports
import sys
import os
import xbmc
import xbmcgui
import xbmcplugin

PLATFORM_MAC = os.environ.get( "OS", "" ).lower() == "os x"


class _Info:
    def __init__( self, *args, **kwargs ):
        self.__dict__.update( kwargs )


class Main:
    # base paths
    BASE_SKIN_THUMBNAIL_PATH = "/".join( [ "special://xbmc", "skin", xbmc.getSkinDir(), "media", sys.modules[ "__main__" ].__plugin__ ] )
    if PLATFORM_MAC or not os.path.isdir( BASE_SKIN_THUMBNAIL_PATH  ): BASE_SKIN_THUMBNAIL_PATH = "/".join( [ "Q:\\", "skin", xbmc.getSkinDir(), "media", sys.modules[ "__main__" ].__plugin__ ] )
    BASE_PLUGIN_THUMBNAIL_PATH = os.path.join( os.getcwd(), "thumbnails" )
    BASE_PRESETS_PATH = "/".join( [ "special://profile", "plugin_data", "video", os.path.basename( os.getcwd().replace( ";", "" ) ) ] )
    if PLATFORM_MAC or not os.path.isdir( BASE_PRESETS_PATH  ): BASE_PRESETS_PATH = "/".join( [ "P:\\", "plugin_data", "video", os.path.basename( os.getcwd().replace( ";", "" ) ) ] )

    def __init__( self ):
No changes after 'def __init__( self )'

As you can see the issue is on special path still not recognized properly on XBOX and Mac. The test on mac is done because it seems there is a pb when you check is the directory exists, whatever, just to let know this works.

I made available your plugin with this fix via the script Installer Passion-XBMC
Thank again

[Image: passionxbmc_signature.png]
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

[Image: project_thin_badge.gif]
find
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #15
You may now play those adult rated videos, requires you supply a username/password for logging in.

Quote:
[Youtube]
-changed: version -> 1.2
-added: login with cookie. needed for those adult videos. why the api authentication isn't enough is beyond me.
Quote:

[Youtube]
-changed: version -> 1.1
-changed: english language strings
-added: authentication
-changed: save presets in users settings.xml file
-changed: use xbmc.skinHasImage() check for category icons. (They need to be in skinname/media/Youtube/, named identical to the method name with a .png ext. eg "recently_featured.png")

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find
Thread Closed