New Script: YouTube2

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
dsvensson Offline
Skilled Python Coder
Posts: 52
Joined: Jan 2007
Reputation: 0
Post: #1
As of recently the old YouTube 1.8b finally broke completly, I have no idea
why and the source code was a bit messy so I now bring you YouTube2.

I'm not the author of the other YouTube script and this script is written
from scratch. It's not fully implemented yet as I wanted to get something
out the door so that all you YouTube heads out there could get your daily fix.

I'll probably be posting a couple of updates in the near future until I feel
the script is feature complete.

Happy YouTubing everyone!

http://exodus.xmms.se/~nano/YouTube2-0.90.zip

(it will probably pop up in the XBMCScripts installer in a near future)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #2
have you heard of guibuilder.py. It allows you to skin your scripts like any XBMC window. May I suggest you use that. You can grab the latest from SVN. Apple Movie Trailers uses it.

https://xbmc-scripting.googlecode.com/sv...builder.py

There will be an update to guibuilder.py in a day or so. <focusedcolor> was added to python's controlbutton. I don't want to release it yet as you would need an XBMC build of today or later.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
dsvensson Offline
Skilled Python Coder
Posts: 52
Joined: Jan 2007
Reputation: 0
Post: #3
Nopes, new to me. But the url you provided needed login. Care to provide the public url instead?
find quote
B4tm4n Offline
Senior Member
Posts: 274
Joined: Jan 2005
Reputation: 0
Location: UK
Post: #4
http://xbmc-scripting.googlecode.com/svn...xtras/lib/
find quote
dsvensson Offline
Skilled Python Coder
Posts: 52
Joined: Jan 2007
Reputation: 0
Post: #5
I don't suppose any of you guys have managed to get xbmc_pc.exe to run in wine or cedega under Linux? Wink

It gets boring when debugging scripts directly on the xbox.
find quote
Sydney30 Offline
Junior Member
Posts: 43
Joined: Feb 2007
Reputation: 0
Post: #6
Have not checked out the script yet but thanks for doing one up.. U tube script is a v cool app.. and I am glad it is working again..

Cheers
find quote
Sydney30 Offline
Junior Member
Posts: 43
Joined: Feb 2007
Reputation: 0
Post: #7
Do you think you could do a Cnet TV one as well??
find quote
dsvensson Offline
Skilled Python Coder
Posts: 52
Joined: Jan 2007
Reputation: 0
Post: #8
Nuka1195 Wrote:have you heard of guibuilder.py. It allows you to skin your scripts like any XBMC window. May I suggest you use that. You can grab the latest from SVN. Apple Movie Trailers uses it.

https://xbmc-scripting.googlecode.com/sv...builder.py

There will be an update to guibuilder.py in a day or so. <focusedcolor> was added to python's controlbutton. I don't want to release it yet as you would need an XBMC build of today or later.

Playing a bit with guibuilder, but it seems I'm missing something.

I use this code snippet to start it all:

Code:
    def load_skin(self, name=None):
        if name == None:
            name = 'default'

        skin_path = os.path.join(os.getcwd()[:-1], 'skins', name)
        img_path = os.path.join(skin_path, 'gfx')
        skin = os.path.join(skin_path, 'skin.xml')

        print img_path, skin

        guibuilder.GUIBuilder(self, skin, img_path, useDescAsKey=True,
                              title='title', line1='line1', dlg=None,
                              pct=None, useLocal=False, debug=True)

        if not self.SUCCEEDED:
            print "b0rk b0rk b0rk!"
        else:
            print "yey!"

And my very minimalistic skin Wink

Code:
<window>
    <resolution>PAL16x9</resolution>
    <controls>
        <control type="image" id="1">
            <description>background image</description>
            <posx>0</posx>
            <posy>0</posy>
            <width>720</width>
            <height>576</height>
            <texture>background.png</texture>
        </control>
    </controls>
</window>

The printed skin paths and gfx paths are:

Code:
Q:\scripts\xbmc_test\skins\default\gfx
Q:\scripts\xbmc_test\skins\default\skin.xml

SUCCEEDED is set to False, and I only get a black picture, but no other error in the log. Have I missed something obvious? No exceptions are cast either.
find quote
dsvensson Offline
Skilled Python Coder
Posts: 52
Joined: Jan 2007
Reputation: 0
Post: #9
Oh, and I've tried both with and without a backslash before the filename in the skin.xml
find quote
dsvensson Offline
Skilled Python Coder
Posts: 52
Joined: Jan 2007
Reputation: 0
Post: #10
the problem was an outdated version of xbmc, 2.0.1 was too old, using t3ch-070209 now.
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #11
Yeah, sorry about the url, thanks B4tm4n.

It does require the newest builds as you found out. I try to keep up with additions in XBMC.

Glad you got it working. Hopefully skinners will create there own skins for it.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
dsvensson Offline
Skilled Python Coder
Posts: 52
Joined: Jan 2007
Reputation: 0
Post: #12
Updated to use guibuilder, you need to use a fairly new xbmc, I use 2007-02-09 so that one works at least.

http://exodus.xmms.se/~nano/YouTube2-0.91.zip

It can also be grabbed from svn:

http://xbmc-scripting.googlecode.com/svn/trunk/Youtube/

the name will be changed to just YouTube soon.
find quote
anywonder Offline
Senior Member
Posts: 101
Joined: Oct 2006
Reputation: 0
Post: #13
Thanks for this, I've had troubles with the original Youtube script crashing after playing 2 or 3 videos..
find quote
Solo0815 Online
Fan
Posts: 344
Joined: Sep 2004
Reputation: 0
Post: #14
How about adding a option to save the videos to the HD like in the "old" script? Maybe with a progress-bar?

there are only 10 sorts of people: those who understand binary and those who don't

PC: Kubuntu 14.04 and Win7 --- Raspberry Pi: OpenELEC --- VU+ Duo: VTi 7.0.x --- NAS: OMV 1.0.x with XBMC-Server
find quote
dsvensson Offline
Skilled Python Coder
Posts: 52
Joined: Jan 2007
Reputation: 0
Post: #15
Solo0815 Wrote:How about adding a option to save the videos to the HD like in the "old" script? Maybe with a progress-bar?

Yeah, that will happen sooner or later. But as I'm spoiled with a fast connection it's not on the top of my todo list. I'll probably push out a new version this week. That feature will probably happen the version after that one.
find quote
Post Reply