[SCRIPT: RELEASE] YouTube Addon

Discussion of plugin / script development for XBMC4Xbox
Post Reply
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

[SCRIPT: RELEASE] YouTube Addon

Post by Dom DXecutioner »

08.05.2016

I haven't worked on this addon for over a week, and probably won't any time soon as I find myself a bit busy lately. Since it works for my purposes, I don't really have the need either. In either case, you can download it and give it try if you wish. You will need to transfer it - after extracting it from the zip file - to your scripts folder.

You can also send a command to the xbox from any web browser to play a specified video; you will need to pass the video's id:

Code: Select all

http://__YOUR_XBOX_IP_ADDRESS__/xbmcCmds/xbmcHttp?command=ExecBuiltIn(RunScript(special://home/scripts/script.video.youtube/default.py,__VIDEO_ID__))
In some cases you will get some issues with the GUI getting cut off, this isn't script related but rather xbmc gui core related; nothing i can do about it. If it does happen to you, the xbox will need to be restarted. Doesn't happen often, but it will.

Whilst an item is focused (highlighted), you can press the info button for a some options, including: clear history, remove item from history, and view channel.

Download: YouTube v0.5.0

This addon uses Nick Ficano's pytube library, which is included, nothing more needed on your part. This library is what's needed to get the actual video links. Feel free to visit the link to learn more.

07.06.2016

Over the long weekend I gave myself the the time to build a YouTube script as I was in need to view some videos but did not want to use the phone or PC, and it's working nicely!

I want to reiterate, it will be a script, not a plugin; whilst it will be viewable in any skin, it will look best with the Xbox Origins skin.

Also, keep in mind, no support will be granted for the script. If it works for you, great, otherwise, my apologies...

You'll be able to navigate various parts, and search for basic videos. However, playlists, channels, and login will NOT be implemented.

Let me know your thoughts... Below are some screenshots for your enjoyment:

icon and fanart:

Image

The screenshot below is the home screen; normally you would place data and images here, but to preserve memory, I leave it blank until a user selects something. Most of the time we want to search anyway...

Image

The screenshot below is on the music section, which is from youtube.com; you can scroll up-to 8 different sections provided by youtube. Youtube has up-to 10, but i left it at 8, from the previous default of 5.

Image

Same concept as above, except it's sports... you just move right, hit select (a button) and the video will play.

Image

Search results

Image

By default, on the xbox, the format will be mp4, 360p, if no 360p is found, 480p will be selected... In advance, beware, this may - eventually - crash the xbox as it leaves close to 6MB of memory left; at least during my testing.

Cheers! ;)
Image
NOTTHESAME
Posts: 532
Joined: Thu Aug 02, 2012 7:46 am
Has thanked: 82 times
Been thanked: 61 times

Re: [Script: Coming Soon] YouTube Addon

Post by NOTTHESAME »

the basic search and having to watch a video in a SD video will be just fine, the login and channels and playlist is not a big deal for me atleast, thoses who use the xbox for everything im sure will not mind as long as they can watch youtube on there xbox.

Same here , using the pc or the phone for youtube, its not my kind of thing.
the designing is really clean im really liking it, also how it matches up with XBMC origins :) cool!
awesome work thank you for your hard work and using up your spare time for this and bring us a youtube for the xbox once again :)

thanks again dom
User avatar
sixties keith
Posts: 534
Joined: Wed Aug 01, 2012 9:30 am
Has thanked: 27 times
Been thanked: 32 times

Re: [Script: Coming Soon] YouTube Addon

Post by sixties keith »

Great work indeed, thanks so much for this looking forward to testing it out, was a big miss not having a decent solution to youtube on the xbox :)
Image

120gb hdd, vinyl magma skin, front lights, side strip lights, clear jewel mod with lights, ir dongle mod, hdd indicator. X3 with LCD many mods inc custom x3 jewel.
User avatar
BuZz
Site Admin
Posts: 1890
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 65 times
Been thanked: 422 times
Contact:

Re: [Script: Coming Soon] YouTube Addon

Post by BuZz »

great job! :)
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

[Script: Coming Soon] YouTube Addon

Post by Dom DXecutioner »

Thank you, but hold your accolades until you use it; who knows, you might dislike it, or it may (just a matter of time) break due to changes by YouTube.com

I could have built it as a video addon; much easier to code (from what I'm told), but prefer the script approach as it more customizable, in my opinion, of course.
Image
User avatar
Dan Dar3
Posts: 1176
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 273 times
Been thanked: 257 times
Contact:

Re: [Script: Coming Soon] YouTube Addon

Post by Dan Dar3 »

Spotless work as usual, Dom, it looks GREAT!

PS: When you publish the code I might get some time to try and call it from XBMC4Xbox Remote Android app in a similar way to the old plugin (called with PlayMedia(plugin://video/YouTube/?action=play_video&videoid=%s)) as an additional way of playing YouTube videos. Obviously not a priority just putting it out since you announced it.
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

[Script: Coming Soon] YouTube Addon

Post by Dom DXecutioner »

Thank you sir!

That being said - or typed, as it were - I don't think you'd be able to do something like that; remember, plugins and scripts are different in the way code is processed.

I can always create a function to accept the parameters, the function would get the video id, parse it, disregard the ui, and play it.

It would be something like:

Code: Select all

?command=ExecBuiltIn(RunScript(special://home/scripts/YouTube/default.py,video_id=foo))
Or something like that...
Image
User avatar
Dan Dar3
Posts: 1176
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 273 times
Been thanked: 257 times
Contact:

Re: [Script: Coming Soon] YouTube Addon

Post by Dan Dar3 »

That sounds great, but don't make it a priority, I'm sure there are plenty other things you need to do first.
If you need testing or anything else let us know.
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: [Script: Coming Soon] YouTube Addon

Post by Dom DXecutioner »

It should be relatively easy to implement the logic. Just need to test when I get home. I may need some testing done; will send a pm w/ download link... Remember, it will look best with Xbmc Origins skin.
Image
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: [Script: Coming Soon] YouTube Addon

Post by Dom DXecutioner »

Dom DXecutioner wrote:It should be relatively easy to implement the logic. Just need to test when I get home. I may need some testing done; will send a pm w/ download link... Remember, it will look best with Xbmc Origins skin.
pm sent
Image
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: [Script: Coming Soon] YouTube Addon

Post by r32crazy01 »

Awesome!!, thanks Dom :)
Hyster
Posts: 4
Joined: Fri Nov 27, 2015 8:00 pm
Has thanked: 2 times

Re: [Script: Coming Soon] YouTube Addon

Post by Hyster »

Wooow tanks Dom is this great :D very cool ...... but " yo no entender como se descarga " :( link PM ? , will send PM ?, sorry :shock: I don`t speak english help me please. :roll:
fxmech
Posts: 673
Joined: Wed Aug 01, 2012 9:15 am
Has thanked: 37 times
Been thanked: 46 times

Re: [Script: Coming Soon] YouTube Addon

Post by fxmech »

Very happy to see it will be in the remote. :)

O.T. Now, just to get my UPnP renderer to work with BubbleUPnP once and for all!

I've been procrastinating on checking out all these goodies!!

Sent from my SM-T320 using Tapatalk
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: [SCRIPT: RELEASE] YouTube Addon

Post by Dom DXecutioner »

the download link is now available on the first post... i still have some code refactoring, 'optimizations' and minor features to complete; until then, might as well release this before youtube changes. :)
Image
woss
Posts: 2
Joined: Mon Aug 08, 2016 8:41 am
Has thanked: 1 time
Been thanked: 2 times

Re: [SCRIPT: RELEASE] YouTube Addon

Post by woss »

Awesome! Thank you so much Dom, I've been waiting so long for this release. Recently tested... all seems to be perfect.
Last edited by woss on Mon Aug 08, 2016 4:47 pm, edited 2 times in total.
User avatar
nidge
Posts: 472
Joined: Fri Jul 27, 2012 8:29 pm
Location: Norfolk, United Kingdom
Has thanked: 24 times
Been thanked: 26 times
Contact:

Re: [SCRIPT: RELEASE] YouTube Addon

Post by nidge »

Well done Dom :)
I can report it working great on my N64 Freak 1ghz, 128mb, v1.4 Xbox. :D
http://www.theoriginalxboxshoppe.weebly.com
http://www.ebid.net/uk/stores/Computers-and-Consoles


Crystal Xbox v1.4, Xecuter 3, 500gb sata hard disk, 1ghz CPU, 128mb RAM, HD component 720p, blue LED's.
Crystal Xbox v1.4, Xecuter 3, 320gb sata hard disk, stock CPU, 128mb RAM, HD component 720p.
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

[SCRIPT: RELEASE] YouTube Addon

Post by Dom DXecutioner »

I'm glad it's working as intended...
Image
MasterChief2
Posts: 42
Joined: Tue Oct 01, 2019 9:57 am
Has thanked: 2 times
Been thanked: 46 times

Re: [SCRIPT: RELEASE] YouTube Addon

Post by MasterChief2 »

Hi to all. I'm trying to make new script that will be used for streaming movies or tv shows from internet. I am currently learning how to write GUI for scripts and I think this addon is a good example but unfortunately I dont have source code of python files on picture below. @Dom DXecutioner do you maybe have .py files for these classes? ;) Also if someone can give some tips how to create similar GUI to the GUI of this addon. Thanks in advance.
Image
MasterChief2
Posts: 42
Joined: Tue Oct 01, 2019 9:57 am
Has thanked: 2 times
Been thanked: 46 times

Re: [SCRIPT: RELEASE] YouTube Addon

Post by MasterChief2 »

Dom DXecutioner wrote: Wed Jul 06, 2016 8:20 pm In some cases you will get some issues with the GUI getting cut off, this isn't script related but rather xbmc gui core related; nothing i can do about it. If it does happen to you, the xbox will need to be restarted. Doesn't happen often, but it will.
This commit could fix this strange behavior.

P.S. I'm just leaving this here so I can revisit it when I get time :)
Post Reply