[HowTo] YouTube -Work around 'daily limit exceeded', 'unknown kind' - Method 2


#1

FYI- This looks really convoluted and time consuming but it is not.
There is more text to read than the actual steps to do the work.
I have assimilated the information from a lot of webpages outside but the most detailed and comprehensive one was created by kodi forums member activoice

Before you start, remove Youtube add-on and any associated files/settings so we have a clean start.
Re-install youtube (current vesion as of Mar 2016 is 5.1.17) but don’t login at this time.
Login to https://console.developers.google.com/apis/

Click on Credentials (left hand side).
Create a project, follow the prompts to name and create your key (you can define your region in the world under advanced option) - (You don’t need to remember name of your project for future use but I stored it just in case …).

We need to create two credentials, an “API key” credential and an “0Auth client ID” credential for this method to work.


API Key:
Click on the button “create credentials” and then “API Key” and then click on “Browser key”.
Assign a name and click create.
Copy the key as displayed and keep it safe somehwere for later use.


0Auth client ID:
Click on the button “create credentials” and then “0Auth client ID” and then “configure consent screen”.
Add a random name to the Product name box and save your settings.
Click “other” for application type, assign name and create the key.
Save your client ID and client secret for later use.


On the screen that you land, verify that you have an API Key and a 0Auth client ID keys.
Click on API manager on the top left hand side of the screen.
Click on “YouTube Data API v3” and then click on Enable in the resulting screen.


If you don’t see the YouTube Data API key at the above locvation the go to https://console.developers.google.com/apis/library, click on the key and enable it.
Now that we have created our own personal set of keys we can add them to the YouTube add-on.

ssh to the pi
Verify the version of kodi you are using.

osmc@lab1:~$ grep Kodi .kodi/temp/kodi.log | head -3

Search for file login_client.py (should be located at /home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client).
We need to replace a few keys in this file with ones that we created earlier.
Make a copy of the file by running the following command.

osmc@lab1:~$ cd ./home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client
osmc@lab1:~$ sudo cp login_client.py ./login_client.py.orig
osmc@lab1:~$ sudo chown osmc login_client.py.orig
osmc@lab1:~$ sudo chgrp osmc login_client.py.orig

Now that we have a backup of the original file, open the file in an editor and locate the section that corresponds to the version of KODI that you’re using in the file, for me it is ver 16 (example below references that).

osmc@lab1:~$ sudo nano ./.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/login_client.py

Ver 16 section of the file that needs to be edited should look like this
’youtube-for-kodi-16’: {
‘system’: ‘Jarvis’,
key’: ‘AIzaSyBbgC4PZ2_hUdqqX7MIgdg2fK1nohv1jrw’,
id’: ‘17932591024-8jruv1v7s78gipo7s17c91bnk26rqgpf.apps.googleusercontent.com’,
secret’: 'bK9T234WWhqzYdcQLif1L35K’
Replace key in the file with the “API Key” that you created earlier.
Replace id with the “id” from “OAuth client ID” that you created earlier.
Replace secret with the “secret” from “OAuth client ID” that you created earlier.
Save and exit the file by pressing the following key strokes.

###Ctrl-O, ENTER, & Ctrl-X to save the file and exit the file

Restart Kodi or if you are like me, reboot the device.
Either way, login to YouTube and do the double signin/auth by typing in the displayed code at youtube.com/activate.

Hope this method works for you also as it hasworked for me and a few other machines that I have done it on so far



[HowTo] YouTube - Work around 'daily limit exceeded', 'unknown kind' - Method 1
Official Youtube Addon
#2

Thanks for these instructions, but sadly, I still get: Exception in ContentProvider Unknown kind "

Its so annoying, but if I sign out that does work :octopus:


#3

Worked perfectly for me, thanks.


#4

Okay, I followed the instructions on typing in these instructions through SSH. (Using Let’s SSH on my Nook Android tablet and PuTTY on a Windows PC.) After doing the file copies, I try to open up the original file, I type:

sudo nano /.kodi/addons/plugin.video.youtube/resources/lib/youtube/client/login_client.py

…and the editor opens up a blank file. Nothing to edit. Nothing to find.

(Note: On Let’s SSH the editor doesn’t appear, but it seems to show up on PuTTY.)

Since this is a new installation of the YouTube add-on, is it possible that this file was never installed? Or is it possible something happened in the copy process to destroy the original file? Should I uninstall and reinstall the YouTube plugin and hope it shows up? Thanks for any advice.


#5

Either sudo nano .kodi/ or sudo nano /home/osmc/.kodi


#6

Okay. In SSH (using PuTTY for Windows) I typed:

sudo nano /home /osmc /.kodi

…and I get this editor screen…with nothing on it.

Yes, I know it is a directory…apparently with nothing in it. Ctrl-O “WriteOut” doesn’t change anything on screen. Ctrl -R “Read File” doesn’t show anything either. Excuse me if I’m seeming dense, but what do I need to do to get to that file?

I also tried the earlier command suggested…

sudo nano .kodi/

…with the same unresponsive result.

By the way, here are the log files I got from PuTTY…

=====
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.09.04 22:09:04 =~=~=~=~=~=~=~=~=~=~=~=
login as: osmc
osmc@192.168.2.22’s password:
Access denied
osmc@192.168.2.22’s password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Aug 28 22:32:47 2016 from 192.168.2.7

osmc@osmc:~$ /home/osmc/.kodi/addons/plugin.video.youtuber /resources/o lib/youtob ube/
client
-bash: /home/osmc/.kodi/addons/plugin.video.youtube/resources/lib/youtube/client: Is a directory
osmc@osmc:~$ sudo nano .kodi/
GNU nano 2.2.6 New Buffer [ “.kodi/” is a directory ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell
File to insert [from ./] : ^T To FilesM-F New BufferC Cancel^X Execute Command [ Cancelled ]^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur PosX Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell

osmc@osmc:~$ sudo nano /home/ /osmc /kodi .kodi
GNU nano 2.2.6 New Buffer [ “/home” is a directory ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell
File: /osmc [ Switched to /osmc ]Close
[ line 1/1 (100%), col 1/1 (100%), char 0/0 (0%) ]
.kodi [ Switched to /.kodi ]Exit

osmc@osmc:~$ ^Vsudo nan o/home/osmc/.kodi
sudo: nano/home/osmc/.kodi: command not found
osmc@osmc:~$


#7

The problem here is the addition of the / preceding .kodi. It should be this
sudo nano .kodi/addons/plugin.video.youtube/resources/lib/youtube/client/login_client.py


#8

Just a heads up…

The Youtube addon is being developed again.

It now includes a setting that allows entering your own API key info, without having to mess with editing files.

Full info, including step by step instructions, is in the first few posts of the thread over on the kodi site.

http://forum.kodi.tv/showthread.php?tid=267160