Kodi Community Forum
New Script: YouTube2 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+--- Thread: New Script: YouTube2 (/showthread.php?tid=24803)

Pages: 1 2 3 4 5 6


New Script: YouTube2 - dsvensson - 2007-02-12

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)


- Nuka1195 - 2007-02-12

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/svn/trunk/Apple%20Movie%20Trailers/extras/lib/guibuilder.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.


- dsvensson - 2007-02-12

Nopes, new to me. But the url you provided needed login. Care to provide the public url instead?


- B4tm4n - 2007-02-12

http://xbmc-scripting.googlecode.com/svn/trunk/Apple%20Movie%20Trailers/extras/lib/


- dsvensson - 2007-02-12

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.


- Sydney30 - 2007-02-13

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


- Sydney30 - 2007-02-13

Do you think you could do a Cnet TV one as well??


- dsvensson - 2007-02-13

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/svn/trunk/Apple%20Movie%20Trailers/extras/lib/guibuilder.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.


- dsvensson - 2007-02-13

Oh, and I've tried both with and without a backslash before the filename in the skin.xml


- dsvensson - 2007-02-13

the problem was an outdated version of xbmc, 2.0.1 was too old, using t3ch-070209 now.


- Nuka1195 - 2007-02-13

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.


- dsvensson - 2007-02-15

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.


- anywonder - 2007-02-18

Thanks for this, I've had troubles with the original Youtube script crashing after playing 2 or 3 videos..


- Solo0815 - 2007-02-19

How about adding a option to save the videos to the HD like in the "old" script? Maybe with a progress-bar?


- dsvensson - 2007-02-21

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.