YouTube Addon porting
YouTube Addon porting
Finally I decided to port the bromix youtube addon, also it is now listed as the official kodi youtube addon.
I'm very near having it completely working on xbox it's only a path function which needs to be edited. I debugged now for hours and coming step by step to the aim
His code is very "objected" and not documented that makes it harder... also it seems the functions are completely equivalent on kodi and x4x but returning different things.
I'm very near having it completely working on xbox it's only a path function which needs to be edited. I debugged now for hours and coming step by step to the aim
His code is very "objected" and not documented that makes it harder... also it seems the functions are completely equivalent on kodi and x4x but returning different things.
Re: Have you a request for addons or scripts for xbmc4xbox ?
Thanks so much for the update on the progress. Historically, you've always been one of the core group of dedicated developers, so I'm sure the community has full confidence that you'll get it up and running on the xbox. It's just a matter of time, and people that are still using a console originally released in 2001 tend to be the patient type.
-
- Posts: 532
- Joined: Thu Aug 02, 2012 7:46 am
- Has thanked: 82 times
- Been thanked: 61 times
Re: Have you a request for addons or scripts for xbmc4xbox ?
If anybody wants to use a temp youtube install Search Youtube from xunitytalk repo, downfall is no offical videos work and 720p playback, their is no option for this, but it works.
Re: Have you a request for addons or scripts for xbmc4xbox ?
Hi,
I tryed youtube as you described .Not working on xbox.can you please put the addon in.Thank you.
I tryed youtube as you described .Not working on xbox.can you please put the addon in.Thank you.
-
- Posts: 532
- Joined: Thu Aug 02, 2012 7:46 am
- Has thanked: 82 times
- Been thanked: 61 times
Re: Have you a request for addons or scripts for xbmc4xbox ?
https://www.dropbox.com/s/86o30lzkr92n0 ... x.zip?dl=0
Ftp to xbox,unzip and copy to your plugin videos, you dont have to install with zip.
Ftp to xbox,unzip and copy to your plugin videos, you dont have to install with zip.
Re: Have you a request for addons or scripts for xbmc4xbox ?
Hi notthesame.Thanks for youtube FTP.It work on xbox .GREAT
Re: Have you a request for addons or scripts for xbmc4xbox ?
The "Youtube Search" addon is a bit out of date but still works fine. The downside is that it can only fetch 720p, 360p, 240p,... NO 480p that means for xbox only 360p is possible with this version...
Nevertheless I patched it to always take 360p.
http://www94.zippyshare.com/v/QS7GL5Yx/file.html
My work on YouTube addon by bromix is nearly finished but there is one major problem left that can't be fixed with Python easily:
bromix wrote his own routine do set sys.args that means instead of link params like ?key=value he does plugin://pluginname/here/come/the/args/coded/as/foldernames
of course those folders arent available so also default.py is missing but kodi just looks in the parent dir for a default.py until it reaches the pluginname path -> it will find the default.py
and only warns. x4x instead doesn't look all those folders and gives error. My idea was now to answer this bad routine with an even badder routine: just create all those folders and in every folder put a copy of default.py -> I think this will work although it's very ugly
Nevertheless I patched it to always take 360p.
http://www94.zippyshare.com/v/QS7GL5Yx/file.html
My work on YouTube addon by bromix is nearly finished but there is one major problem left that can't be fixed with Python easily:
bromix wrote his own routine do set sys.args that means instead of link params like ?key=value he does plugin://pluginname/here/come/the/args/coded/as/foldernames
of course those folders arent available so also default.py is missing but kodi just looks in the parent dir for a default.py until it reaches the pluginname path -> it will find the default.py
and only warns. x4x instead doesn't look all those folders and gives error. My idea was now to answer this bad routine with an even badder routine: just create all those folders and in every folder put a copy of default.py -> I think this will work although it's very ugly
- 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: Have you a request for addons or scripts for xbmc4xbox ?
I would just rewrite the url generation / parameters etc - so it uses key=value querystring style parameters. I looked at the youtube plugin before briefly, and got it partially working afair - most of the url handling is done in one place isn't it ?
[edit]
to be more specific, I adjusted previous code that worked like this by just sticking the entire path into a single parameter like
plugin://pluginname/here/come/the/args/
to
plugin://pluginname/?params=/here/come/the/args/
you can then just have a bit of code that gets the value, and passes it over to the existing code etc.
[edit]
to be more specific, I adjusted previous code that worked like this by just sticking the entire path into a single parameter like
plugin://pluginname/here/come/the/args/
to
plugin://pluginname/?params=/here/come/the/args/
you can then just have a bit of code that gets the value, and passes it over to the existing code etc.
Re: Have you a request for addons or scripts for xbmc4xbox ?
I'm not sure if that's easier. What could you get working? Maybe you did other things so I can see your idea.
I edited xbmc_context.py:
abstract_context.py:
Maybe one more cannot see atm. I also wrote a nice "Youtube Updater" it downloads the latest version from github patches it and installs/updates the addon.
Obviously the patching routing is missing for now.
In my opinion it could work like said adding all folder structures and copies of default.py each copy maybe with slightly different import paths.
I edited xbmc_context.py:
Code: Select all
if override:
self._uri = sys.argv[0].replace("video/", "video*")
#xbmc.log("sysarg0: " + str(sys.argv[0]))
#xbmc.log("sysarg1: " + str(sys.argv[1]))
#xbmc.log("sysarg2: " + str(sys.argv[2]))
comps = urlparse.urlparse(self._uri)
temp_netloc = comps.netloc
temp_netloc = temp_netloc.replace("video*", "video/")
comps = comps._replace(netloc=temp_netloc)
self._path = urllib.unquote(comps.path).decode('utf-8')
Code: Select all
def create_uri(self, path=u'/', params=None):
if not params:
params = {}
pass
uri = create_uri_path(path)
#if uri:
# uri = "%s://%s%s" % ('plugin', self._plugin_id.encode('utf-8'), uri)
#else:
# uri = "%s://%s/" % ('plugin', self._plugin_id.encode('utf-8'))
# pass
if uri:
uri = "%s://%s%s%s" % ('plugin', 'video/', self._plugin_id.encode('utf-8'), uri)
else:
uri = "%s://%s%s/" % ('plugin', 'video/', self._plugin_id.encode('utf-8'))
pass
Obviously the patching routing is missing for now.
In my opinion it could work like said adding all folder structures and copies of default.py each copy maybe with slightly different import paths.
Re: Have you a request for addons or scripts for xbmc4xbox ?
Yes that would be the better way but I can not imagine how much work would be left without seeing what you already changed, it would be nice if you could upload the things you changed maybe I see better what is missing.
- Dom DXecutioner
- Posts: 585
- Joined: Thu Jul 05, 2012 11:59 pm
- Location: California
- Has thanked: 249 times
- Been thanked: 219 times
- Contact:
Re: Have you a request for addons or scripts for xbmc4xbox ?
@tim619: As a matter of suggestion, it'd probably be best if you open a new topic specifically for YouTube work in progress.
- 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: Have you a request for addons or scripts for xbmc4xbox ?
I don't have any code - I only had a quick play some time ago.
-
- Posts: 1028
- Joined: Wed Jul 04, 2012 8:01 am
- Has thanked: 1 time
- Been thanked: 148 times
Re: Have you a request for addons or scripts for xbmc4xbox ?
Working on update from my Youtubesearch addon .
Change to youtube v3 api
Download option for video and only audio from the video over contextmenu
working with best video for main xbmc and best playing suported videos on xbmc4xbox.
more come later
regards jan
Change to youtube v3 api
Download option for video and only audio from the video over contextmenu
working with best video for main xbmc and best playing suported videos on xbmc4xbox.
more come later
regards jan
Re: Have you a request for addons or scripts for xbmc4xbox ?
@Buzz
I've now edited the code as you said, it seems indeed easier and now only one function is left
(instead of plugin://plugin.video.youtube/special/popular_right_now/ -> plugin://plugin.video.youtube/?args=/special/popular_right_now/ etc)
Edit: I think it works now, need to test on xbox
@Dom
Yes you're right already thought about it, too and will open another thread soon.
I've now edited the code as you said, it seems indeed easier and now only one function is left
(instead of plugin://plugin.video.youtube/special/popular_right_now/ -> plugin://plugin.video.youtube/?args=/special/popular_right_now/ etc)
Edit: I think it works now, need to test on xbox
@Dom
Yes you're right already thought about it, too and will open another thread soon.
Re: Have you a request for addons or scripts for xbmc4xbox ?
Hi,
Any news about new youtube?
Thankyou
Any news about new youtube?
Thankyou
-
- Posts: 532
- Joined: Thu Aug 02, 2012 7:46 am
- Has thanked: 82 times
- Been thanked: 61 times
Re: Have you a request for addons or scripts for xbmc4xbox ?
Did you try to use the temp version tim patch for the mean time, i been using it and it works fine.
Re: Have you a request for addons or scripts for xbmc4xbox ?
Hi,Thanks for your reply.I cannot find it.Where will i get it from.
- sixties keith
- Posts: 534
- Joined: Wed Aug 01, 2012 9:30 am
- Has thanked: 27 times
- Been thanked: 32 times
YouTube Addon Porting
cheers for this, going to test it out really soon, ok to post over at totalxbmc or better to wait for full release? thanks
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.
-
- Posts: 532
- Joined: Thu Aug 02, 2012 7:46 am
- Has thanked: 82 times
- Been thanked: 61 times
Re: Have you a request for addons or scripts for xbmc4xbox ?
Page 11 but heres the link thanks to tim. http://www94.zippyshare.com/v/QS7GL5Yx/file.htmlmel123 wrote:Hi,Thanks for your reply.I cannot find it.Where will i get it from.