Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
WIP YouTube Browser
#1
A different take on YouTube integration....
While the youtube plugin we have is really nice, IMO youtube doesnt suit to the path-based approach of plugins.
Since I already had some framework for a library browser interface done in ExtendedInfo script (TMDB browser) I thaught it might be a good idea to spend a night to also create something similar for YouTube. Here is a first quick beta.
Image
This includes some nice gimmicks like a custom T9 live search including auto-completion.
Expect lot of bugs since it is in a quite early stage.


You need:
- ExtendedInfo script installed from official repo
- This here installed: https://github.com/phil65/script.youtube.browser

Feedback welcome. Smile
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#2
Looks Very good. can't wait to see more
Reply
#3
Very cool, I already took a shot at skinning it for Mimic.

Image
Reply
#4
(2015-06-22, 20:30)phil65 Wrote: ...
Feedback welcome. Smile

You asked for it Smile

First...nice idea....but I have to do some side-steps.

40 MB Installation for the addon and something is off or needs more optimization. The addon isn't running fast and fluid, because the GUI is stuttering on my systems. I tested it on 3 different machines, 2 of them are capable for gaming and this was the first time something was working really slow.

Code-review:
https://github.com/phil65/script.extende...ils.py#L93
Don't do that Smile This has potential to fail (again) and I have to think the dev. doesn't know what he's excepting here. At work I would punch my co-worker in the face for it, twice and at the end of the day burn his house down. I lied with the last part, after the punch we drink all beer and party.

Do more something like that.
https://github.com/bromix/kodion/blob/ma...ods.py#L12
Someone who's reading the code understands what's expected.

Google: try except antipattern <= the evil spirit of misled exception handling, without antipattern it's simpler to find, understand and correct errors in a proper way.

Here is some other part, this could properly fail again with the other resources of YouTube (the resources aren't consistent), thank the API for it, but you will have to ask for each resource-type in the future if you use the other function of the API.
https://github.com/phil65/script.extende...ube.py#L19

Back to the browser:
If I'm not wrong, yesterday in the IRC someone said additional skinning isn't needed for this. But here it is. This is what MediaPortal broke it's neck in conjunction with addons. Did someone tried to develop addons for MediaPortal? I did...it was C#, great, you got even a abstract base class you could develop on...but you also had to provide parts of the GUI, which later resulted in problems with different skins. That's why I skipped media centers for some years. Either the addon system was broken, not logical or back- and front-end not separated cleanly, which results in dirty code and not maintainable code over the time.

YouTube-API:
be careful with the API, if you activate all parts, the search cast a lot of quota:
https://developers.google.com/youtube/v3...quota_cost

www.youtube.com/tv

I wait for the chromium integration Smile and now you see bromix running as fast as possible from this... Wink
Reply
#5
Looks great, thanks!
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#6
(2015-06-23, 10:28)bromix Wrote: 40 MB Installation for the addon and something is off or needs more optimization.
If core starts to support resource add-ons the add-on will shrink to probably 3 mb or less. Implementing alternative mechanisms to download data separately is a no-go, so I barely have a choice in that aspect.
(2015-06-23, 10:28)bromix Wrote: The addon isn't running fast and fluid, because the GUI is stuttering on my systems. I tested it on 3 different machines, 2 of them are capable for gaming and this was the first time something was working really slow.
Fluid here on a 2 year old laptop. Perhaps you should check your machines Wink If not, you already have an alternative UI implementation by braz available (and BigNoid will do one for Nox too afaik).
(2015-06-23, 10:28)bromix Wrote: Code-review:
https://github.com/phil65/script.extende...ils.py#L93
Don't do that Smile This has potential to fail (again) and I have to think the dev. doesn't know what he's excepting here. At work I would punch my co-worker in the face for it, twice and at the end of the day burn his house down. I lied with the last part, after the punch we drink all beer and party.
Lol. Seriously? You're doing a code review on a first quick shot and what you come up with is some old silly utility function? (yes, it's ugly, I admit that, but up to now it never failed Wink ) Comments about the general architecture would be more helpful. I would burn my chef in exchange if he would lose focus so much. Smile (and yes, you are also allowed to contact me via IRC if you think you have any helpful advice. Wink )

(2015-06-23, 10:28)bromix Wrote: Here is some other part, this could properly fail again with the other resources of YouTube (the resources aren't consistent), thank the API for it, but you will have to ask for each resource-type in the future if you use the other function of the API.
https://github.com/phil65/script.extende...ube.py#L19
Again: This is the result of one day of work, don't expect anything to be cleaned up. I wouldnt wonder if there are even some unused snippets in there dealin with the old v2 API.
(2015-06-23, 10:28)bromix Wrote: Back to the browser:
If I'm not wrong, yesterday in the IRC someone said additional skinning isn't needed for this. But here it is. This is what MediaPortal broke it's neck in conjunction with addons. Did someone tried to develop addons for MediaPortal? I did...it was C#, great, you got even a abstract base class you could develop on...but you also had to provide parts of the GUI, which later resulted in problems with different skins. That's why I skipped media centers for some years. Either the addon system was broken, not logical or back- and front-end not separated cleanly, which results in dirty code and not maintainable code over the time.
Well, what's your proposed solution? Plug-Ins are the only way to get a 100% consistent UI. Plugins arent suited for all usecases though because they imply a tree-based navigation. I havent seen any other tree-based navigation approach for youtube on any other platform. (you may correct me here Wink ) which makes it pretty obvious that it is the approach is simply wrong from an UX POV.
(2015-06-23, 10:28)bromix Wrote: YouTube-API:
be careful with the API, if you activate all parts, the search cast a lot of quota:
https://developers.google.com/youtube/v3...quota_cost

www.youtube.com/tv

I wait for the chromium integration Smile and now you see bromix running as fast as possible from this... Wink
Again: Don't expect me to be able to cope 100% correctly with an API after one day of work. Fixing stuff related to the API is dead-easy, fixing stuff / architecture flaws related to the window loading mechanisms for example is a very different story.

Thanks for your positive comment!
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#7
Hi Phil.

Great idea! Smile

Does control 5004 (Order By) not work for Script-YoutubeList.xml? It doesn't appear to be visible...
Reply
#8
(2015-06-24, 03:07)Gade Wrote: Hi Phil.

Great idea! Smile

Does control 5004 (Order By) not work for Script-YoutubeList.xml? It doesn't appear to be visible...

Thx. Only the sort type is available, the API does not allow ascending vs. descending as far as I can see.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#9
(2015-06-24, 03:17)phil65 Wrote:
(2015-06-24, 03:07)Gade Wrote: Hi Phil.

Great idea! Smile

Does control 5004 (Order By) not work for Script-YoutubeList.xml? It doesn't appear to be visible...

Thx. Only the sort type is available, the API does not allow ascending vs. descending as far as I can see.

So it is best to remove it from Script-YoutubeList.xml?
Reply
#10
(2015-06-24, 09:30)Gade Wrote:
(2015-06-24, 03:17)phil65 Wrote:
(2015-06-24, 03:07)Gade Wrote: Hi Phil.

Great idea! Smile

Does control 5004 (Order By) not work for Script-YoutubeList.xml? It doesn't appear to be visible...

Thx. Only the sort type is available, the API does not allow ascending vs. descending as far as I can see.

So it is best to remove it from Script-YoutubeList.xml?

You can remove it now, yes (needs latest extendedinfo GIT)
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#11
Thanks!

The Keyboard Classic button in Script-T9Search.xml doesn't seem to do anything with the latest git.
Reply
#12
@Gade
Thx, fixed.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#13
This looks awesome. I would like to include this kind of view in my addon Collection TV (formerly YouTube Collections)
Reply
#14
(2015-06-25, 18:02)SportySpice Wrote: This looks awesome. I would like to include this kind of view in my addon Collection TV (formerly YouTube Collections)

That probably won´t be possible without a bigger rewrite Wink (plugin vs. script)
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#15
(2015-06-25, 18:14)phil65 Wrote:
(2015-06-25, 18:02)SportySpice Wrote: This looks awesome. I would like to include this kind of view in my addon Collection TV (formerly YouTube Collections)

That probably won´t be possible without a bigger rewrite Wink (plugin vs. script)

There must be a way. I'll have to look into your source when I get the chance to see how everything works.
For now, I am getting "addon has the wrong structure" error when trying to install
Reply

Logout Mark Read Team Forum Stats Members Help
YouTube Browser3