Kodi Community Forum
Release YouTube (IMPORTANT - READ FIRST POST) - 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)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: Release YouTube (IMPORTANT - READ FIRST POST) (/showthread.php?tid=200735)



RE: YouTube (IMPORTANT - READ FIRST POST) - DjDiabolik - 2016-03-09

(2016-03-08, 03:29)misty01 Wrote: Since I wrote the new API key entry in add-on settings I can tell you that you should not include " .apps.googleusercontent.com " if you enter the keys via GUI or if you manually edit the kodi/userdata/addon_data/plugin.video.youtube/settings.xml file. If you are including " .apps.googleusercontent.com ", then you will have something that looks like 871556748454-d6dlm3lg05idd8npdk18k6be4ba3oc68.apps.googleusercontent.com.apps.googleusercontent.com which is not right.

Code:
from login_client.py

'youtube-for-kodi-15': {
     'system': 'Isengard',
     'key': '%s' % api_key,
     'id': '%s.apps.googleusercontent.com' % api_id,  <<< Here you see I did not remove " .apps.googleusercontent.com " from the key string
     'secret': '%s' % api_secret

i have notified the same things.... i have tryed to remove the .apps etc etc on setting.xml and try what's appened............


*EDIT*
I don't really don't know if in setting.xml i need to put whit "apps.googleusercontent" or not...................... i thinks we need to know how we have developed this feature Smile


RE: YouTube (IMPORTANT - READ FIRST POST) - misty01 - 2016-03-09

@DjDiabolik:

I am not going to explain the entire code change, only the basic concept.

If you understand programming, then feel free to exam the code changes by clicking here.

It is very simple value substitution method.

Original bromix login_client.py has api keys hardcoded.

Code:
Here is an small example of just the kodi-quota section of keys as used in bromix version.

'youtube-for-kodi-quota': {
    'token-allowed': False,
    'system': 'All',
    'key': 'AIzaSyA7v1QOHz8Q4my5J8uVEpr0zRrntRjnMmk',
    'id': '597640352045-7um2gr1v5rdobn5bf07ebesm3er48286.apps.googleusercontent.com',
    'secret': 'VmyQ12KkJ_N3yegu4Y-FTGRzx'

Everybody is changing keys to get youtube add-on working, so they must change the keys inside the login_client.py file.

Code:
'youtube-for-kodi-quota': {
    'token-allowed': False,
    'system': 'All',
    'key': '<CHANGE YOUR API KEY HERE>',
    'id': '<CHANGE YOUR API ID HERE>.apps.googleusercontent.com',
    'secret': '<CHANGE YOUR API SECRET HERE>'

Ok, what do you notice from above examples? You see that API Id has ' .apps.googleusercontent.com ' which does not change.
So it is logical to only change the alpha-numeric string in front of .apps.googleusercontent.com, right?

This is exactly what I am doing. Only the alpha-numeric string in front of .apps.googleusercontent.com is changed.

Now we take the 3 values, API Key, API Id and API Secret from hardcoded to variable.

Code:
API Key = '12345678'
API Id = 'abcdefgh'
API Secret = 'a1b2c3d4'

'youtube-for-kodi-quota': {
    'token-allowed': False,
    'system': 'All',
    'key': API Key,
    'id': API Id + '.apps.googleusercontent.com',
    'secret': API Secret

Above code is equal to the example below because the variables API Key, API Id and API Secret are each given data to hold.

Code:
'youtube-for-kodi-quota': {
    'token-allowed': False,
    'system': 'All',
    'key': '12345678',
    'id': 'abcdefgh.apps.googleusercontent.com',
    'secret': 'a1b2c3d4'

Ok, what do you see for 'id' in all examples? Yes, only the portion in front of .apps.googleusercontent.com changes.

Now here is an example of what would happen if you use the entire 'xxxxxxxxxx.apps.googleusercontent.com', which is not correct.

Code:
API Key = '12345678'
API Id = 'abcdefgh.apps.googleusercontent.com'
API Secret = 'a1b2c3d4'

'youtube-for-kodi-quota': {
    'token-allowed': False,
    'system': 'All',
    'key': API Key,
    'id': API Id + '.apps.googleusercontent.com',
    'secret': API Secret

Above code is equal to the example below because the variables API Key, API Id and API Secret are each given data to hold.

Code:
'youtube-for-kodi-quota': {
    'token-allowed': False,
    'system': 'All',
    'key': '12345678',
    'id': 'abcdefgh.apps.googleusercontent.com.apps.googleusercontent.com',  #<<<< THIS IS WRONG
    'secret': 'a1b2c3d4'

So now I hope you have a better understanding why you do not use xxxxxxxxxx.apps.googleusercontent.com, only use xxxxxxxxxx. The .apps.googleusercontent.com is added for you automatically.


RE: YouTube (IMPORTANT - READ FIRST POST) - 7007h4k32 - 2016-03-09

Youtube seems sort of fundamental to Kodi itself. It used to get installed automatically, I think, and several other plugins depend upon it. Why doesn't "Team Kodi" get involved and just handle this?


RE: YouTube (IMPORTANT - READ FIRST POST) - J876 - 2016-03-09

(2016-03-09, 05:46)7007h4k32 Wrote: Youtube seems sort of fundamental to Kodi itself. It used to get installed automatically, I think, and several other plugins depend upon it. Why doesn't "Team Kodi" get involved and just handle this?

This this is open source software created and maintained from a non-profit organisation and volunteers.

It relies on donations of money people and time like a lot of other open source projects.

This is only my guess, but the Kodi team are probably stretched for resources and people as it is.

A Kodi team member, Bromix, created this Youtube addon and cannot maintain it anymore.

Did you read the very first post on the thread before commenting?


RE: YouTube (IMPORTANT - READ FIRST POST) - MattH7 - 2016-03-09

(2016-03-09, 06:11)J876 Wrote:
(2016-03-09, 05:46)7007h4k32 Wrote: Youtube seems sort of fundamental to Kodi itself. It used to get installed automatically, I think, and several other plugins depend upon it. Why doesn't "Team Kodi" get involved and just handle this?

This this is open source software created and maintained from a non-profit organisation and volunteers.

It relies on donations of money people and time like a lot of other open source projects.

This iss only my guess, but the Kodi team are probably stretched for resources and people as it is.

A Kodi team member, Bromix, created this Youtube addon and cannot maintain it anymore.

Did you read the very first post on the thread before commenting?

Bromix wasn't just the developer for the youtube addon, but also Vimeo, and a few other streaming video addons. It's understandable that Bromix may have had to give up maintaining the addon due to other commitments. What is a little bewildering is that several LEGAL streaming addons that were maintained by the same developer who flagged well in advance that they wouldn't be able to continue maintenance were left to rot, while there was a post on the main Kodi site bemoaning the rise of non-kosher kodi+addon packages, when they can't seem to keep the addons in the official repo in a working state or lose the source code.

This isn't meant to cause offense to anyone, but it would suggest that maybe now that Jarvis has been released it might be time to put some focus back on the addons that make Kodi so great and making sure that they can be maintained for future releases.


RE: YouTube (IMPORTANT - READ FIRST POST) - rodalpho - 2016-03-09

(2016-03-09, 09:43)MattH7 Wrote: This isn't meant to cause offense to anyone, but it would suggest that maybe now that Jarvis has been released it might be time to put some focus back on the addons that make Kodi so great and making sure that they can be maintained for future releases.
I think everybody in Team Kodi agrees with you-- they all know that the YouTube addon in particular is very important to Kodi users.

But this is open-source development. They're all volunteers, donating their time and effort out of sheer benevolence with no payment whatsoever. There is no dev manager running Agile scrums assigning Bob, Tom, and Anand to work on YouTube in the next two-week sprint. You can't tell them what to do. Each developer works on what he thinks is interesting, what catches his attention. And none of them are interested in YouTube right now. That doesn't make them jerks, it's just how open-source development works.

Eventually someone will come along that is interested in YouTube, or simply loves Kodi, gets a thrill out of working on something used by millions of people, and wants to make it work, and it will be maintained again. But there may be a couple months until that happens. Just the nature of the beast.


RE: YouTube (IMPORTANT - READ FIRST POST) - DarkHelmet - 2016-03-09

In my opinion this very important addon should be maintained by Youtube/Google directly. Of course I have absolutely no idea if they have interest in it.


RE: YouTube (IMPORTANT - READ FIRST POST) - dnairb - 2016-03-09

(2016-03-09, 19:18)DarkHelmet Wrote: In my opinion this very important addon should be maintained by Youtube/Google directly. Of course I have absolutely no idea if they have interest in it.

Really? And how much do you propose that Team Kodi pay for this? Or should Kodi's users pay? Also, what guarantees would there be that the addon is kept free and open-source?


RE: YouTube (IMPORTANT - READ FIRST POST) - DarkHelmet - 2016-03-09

(2016-03-09, 19:31)dnairb Wrote:
(2016-03-09, 19:18)DarkHelmet Wrote: In my opinion this very important addon should be maintained by Youtube/Google directly. Of course I have absolutely no idea if they have interest in it.

Really? And how much do you propose that Team Kodi pay for this? Or should Kodi's users pay? Also, what guarantees would there be that the addon is kept free and open-source?

No guarantee for open source. Personally I'd accept a closed source addon too if it promises long term functionality I have no idea, if Samsung as my tv producer had to pay for the app (or got money from google) in my tv? I think the business model of youtube is basically ads, which could be shown through the addon.


RE: YouTube (IMPORTANT - READ FIRST POST) - 7007h4k32 - 2016-03-09

Yes, I read the sticky at the beginning of the post!

Everyone's responses to my comment is helping me to understand the situation better. My question about "Team Kodi" is based on the fact that Youtube, as well as dozens of other plugins, are referred to as "Official Kodi Addons". And then this designation is followed by the disclaimer, "Although this is the official Kodi repository we take no liability for any of these Add-ons written by 3rd parties. We are not responsible for their content or application. Any problems please post in the forum thread or contact the foundation".

It seems to me that you cannot have it both ways: it is "official" yet Kodi accepts no responsibility. I guess what this means is that an addon has to "pass muster" before being admitted to the repository, but that is as far as it goes.

Thanks to Team Kodi for providing a dynamic framework for accessing content which is open source!


RE: YouTube (IMPORTANT - READ FIRST POST) - nickr - 2016-03-09

Well @7007h4k32 read the thread and you'll see people HAVE stepped up to fix the addon. The power of open source is demonstrated.


RE: YouTube (IMPORTANT - READ FIRST POST) - DarrenHill - 2016-03-09

Maybe the word "verified" would be better that "official" in terms of what is actually meant.


RE: YouTube (IMPORTANT - READ FIRST POST) - rodalpho - 2016-03-09

The addon is being hotfixed, but that's very different from someone taking ownership as the active maintainer.

Google only makes YouTube apps for huge market share-- android and iOS. FireTV and even Roku were forced to use their HTML5 app. They want Kodi to do the same thing. I use that HTML5 app on my FireTV right now, it actually works great, but it obviously isn't integrated with the Kodi UI and library. And of course it plays ads (until you block them).

The YouTube APIv3 sucks, and searches use so much quota, not due to Google's incompetence but because they really don't want anyone to use it for a third-party youtube app. They want other apps to link to and embed YouTube content freely, but they don't want us to replace their app or HTML5 website.

One of the major enhancements Boxee made to XBMC back in the day was integrating a webkit browser, so users could watch shows on all the various individual websites that proliferated at the time. I know someone at Team Kodi has been working on something similar for several years now, but for whatever reason it wasn't pushed to completion. That's not a great answer-- it means abandoning the Kodi UI, custom-mapping input to Kodi to the webpage, and no doubt a host of other annoying problems-- but it may be the only way to get YouTube, Hulu, and Netflix working smoothly long-term.


RE: YouTube (IMPORTANT - READ FIRST POST) - jdf76 - 2016-03-09

I would love to be able to work on the youtube app hence why i spend so much time answering questions here, but i just lack the skills necessary to become a developer. I definitely want to try and pick up python and help out as much as I can but i can't at the moment. Maybe one day if I do learn how to develop in python i can take on the challenge but all i can do right now is help out in the forum and give my experience as a user/perl scripter. I think the people who have helped out with the youtube plugin have been very gracious with their time helping keep the plugin alive. As I recall bromix picked it up from another developer, so there is definitely going to be someone picking it up. Until that day comes we'll deal with each problem as they come up and someone will be willing to donate time to figure out each problem.

Thank you to everyone who has given their time to making this plugin still work.

Jeff


RE: YouTube (IMPORTANT - READ FIRST POST) - rodalpho - 2016-03-09

Actually, I believe Bromix developed this addon from scratch. There was a previous "official" YouTube addon, but it used a different codebase. So when that developer stepped away, his addon was abandoned and Bromix took over.

And yes, thanks to everybody working on it! I did not mean to diminish your help in any way.