Kodi Community Forum

Full Version: Google Drive for KODI
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2019-06-27, 05:39)kenmills Wrote: [ -> ]OK so my Google Drive stopped plaing videos again.  I spent an hour in a support call with Google, and it is not on thier end.   My acount is fine and there are no limits hit.

My Kodi erro log says:

019-06-26 20:34:56.792 T:4094853136  NOTICE: VideoPlayer::OpenFile: plugin://plugin.googledrive/?item_id=1E69kV-fqgXu4AgE2TKVWKN9dU2TwqpRc&driveid=11903832458131341177&item_driveid=11903832458131341177&action=play&content_type=video
2019-06-26 20:34:56.934 T:3726549808 WARNING: CPythonInvoker(22, /storage/.kodi/addons/plugin.googledrive/addon.py): the python script "/storage/.kodi/addons/plugin.googledrive/addon.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon4xbmc7MonitorE
2019-06-26 20:34:58.101 T:3637506864  NOTICE: Creating InputStream
2019-06-26 20:34:59.053 T:3637506864   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
2019-06-26 20:34:59.053 T:3637506864   ERROR: CCurlFile::Open failed with code 403 for http://127.0.0.1:53254/download/11903832...urious.mkv:
2019-06-26 20:34:59.872 T:3637506864   ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 403
2019-06-26 20:34:59.872 T:3637506864   ERROR: CCurlFile::Open failed with code 403 for http://127.0.0.1:53254/download/11903832...urious.mkv:
2019-06-26 20:34:59.873 T:3637506864   ERROR: Open - failed to open source <http://127.0.0.1:53254/download/11903832458131341177/11903832458131341177/1E69kV-fqgXu4AgE2TKVWKN9dU2TwqpRc/2.Fast.2.Furious.2003.mkv>
2019-06-26 20:34:59.873 T:3637506864   ERROR: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.googledrive/?item_id=1E69kV-fqgXu4AgE2TKVWKN9dU2TwqpRc&driveid=11903832458131341177&item_driveid=11903832458131341177&action=play&content_type=video]
2019-06-26 20:34:59.873 T:3637506864  NOTICE: CVideoPlayer::OnExit()
2019-06-26 20:34:59.929 T:4094853136  NOTICE: CVideoPlayer::CloseFile()
2019-06-26 20:34:59.929 T:4094853136  NOTICE: VideoPlayer: waiting for threads to exit
2019-06-26 20:34:59.929 T:4094853136  NOTICE: VideoPlayer: finished waiting


Any ideas what that means?  A 403 error means forbidden!

Cheers,
Ken

Further info, if I try to access the movie via the Google appps API, I get this error:

{ "error": { "errors": [ { "domain": "usageLimits", "reason": "dailyLimitExceededUnreg", "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.", "extendedHelp": "https://code.google.com/apis/console" } ], "code": 403, "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup." } }

But I am authenticated (signed in) under my G Suite business account, which owns the videos.  How have I exceeded the quote?  Is the authentication that we do, somehow using a shared Google API/auth or something?

I have my own API key created with google apps, perhaps there is a way to add it to the queries?

Ken
(2019-03-18, 21:36)LARQ Wrote: [ -> ]
(2019-03-14, 14:20)ashlar Wrote: [ -> ]
(2019-03-14, 06:22)avraham Wrote: [ -> ] Hi,

Were you able to add multiple sources like http://localhost:8587/source/my account/TV Shows  ?    
I ended up going for the .strm approach but, yes, multiple sources are most definitely doable.

You need to have "Allow using Google Drive as a source" in the add-on settings activated.
Then you go to Videos, Add Videos, Browse. There you need to select "Add network location...".

In the window that comes up you select:
Protocol: Web server directory HTTP)
Server address: localhost
Remote path: source
Port: 8587

You press ok and then you can navigate Google Drive from the new entry created and select specific folders to create different video sources. 
I would like to be clear about the main differences between using the exported files STRM (Method 1) or using the folders of google drive as a source (Method 2):
1) Firstly if I notice a difference in the speed of start of the movies or series, this is slower when Method 2 is used.
2) With Method 2, Once in a while, the empty Google Drive folder appears and all the access paths for the movies and series disappear. But this is solved by disabling the Add-on: Cloud Drive Common Module and the Add-on: google drive. Then restart Kodi and re-activate them.
3) ..

Any other difference you can find?

Using strm doesn’t consume bandwidth , correct ? Can the same be said about Method 2 using Google Drive as a source ?
(2018-05-29, 16:52)cguZZMan Wrote: [ -> ]@woomg sure you can.
You just need to clone the login server from GitHub, compile it and run it. It runs with java and can be build with maven.
You need to pass your clientid and secret as environment variables when you run the server.
Also you would need to modify the value of __api_url from the file plugin.googledrive/resources/lib/provider/googledrive.py to point to your server.
I will try to put some documentation in github to easy the process for those who want to implement their own login server. 

I haven't tested it with a headless kodi but, yes, coping the addon_data for the addon (which includes your configuration) should be enough.
@cguZZMan  - Are there instructions for setting this up yet?  I'd like to do the same.  DO you know if this will allow me to use my own G Suite project API when accessing files from my Google Drive, when using this addon?  Or would that be accomplished another way?

Thanks!
Ken
(2018-11-20, 04:55)cguZZMan Wrote: [ -> ]@haldadir you are getting a temporary ban from google (error 403). Is your account being shared? It usually happens when a file is played too many times.
You can play the file if you enable the option "Always ask for the stream format before play" in the addon settings. And then select a format other than the "Original format".

AHA!  After re-reading this entire thread, it seems like I may be getting this temporary ban from Google.

Since I use G Suite, business Google drive, is there a way i can avoid this ban by accessing the files with my own private API key?  Does having the files listed as private or public affect this in any way?

I already export the strm files, and have it set to monitor for changes.  I know that this will help with the banning.  Is there any other ways to help with this?

I have maybe 12 devices all accessing and potentially playing files, and want to avoid the ban.

Cheers,
Ken
(2019-03-18, 21:36)LARQ Wrote: [ -> ]
(2019-03-14, 14:20)ashlar Wrote: [ -> ]
(2019-03-14, 06:22)avraham Wrote: [ -> ] Hi,

Were you able to add multiple sources like http://localhost:8587/source/my account/TV Shows  ?    
I ended up going for the .strm approach but, yes, multiple sources are most definitely doable.

You need to have "Allow using Google Drive as a source" in the add-on settings activated.
Then you go to Videos, Add Videos, Browse. There you need to select "Add network location...".

In the window that comes up you select:
Protocol: Web server directory HTTP)
Server address: localhost
Remote path: source
Port: 8587

You press ok and then you can navigate Google Drive from the new entry created and select specific folders to create different video sources.  
I would like to be clear about the main differences between using the exported files STRM (Method 1) or using the folders of google drive as a source (Method 2):
1) Firstly if I notice a difference in the speed of start of the movies or series, this is slower when Method 2 is used.
2) With Method 2, Once in a while, the empty Google Drive folder appears and all the access paths for the movies and series disappear. But this is solved by disabling the Add-on: Cloud Drive Common Module and the Add-on: google drive. Then restart Kodi and re-activate them.
3) ..

Any other difference you can find? 

Disable the googe drive addon?
I have Kodi installed on a pc and I’m saving my strm to google drive . On my Android device I have configured localhost but all the strm folders from my library are not showing at all . How can I fix this ?
(2019-06-29, 05:24)Keithsr Wrote: [ -> ]
(2019-03-18, 21:36)LARQ Wrote: [ -> ]
(2019-03-14, 14:20)ashlar Wrote: [ -> ]I ended up going for the .strm approach but, yes, multiple sources are most definitely doable.

You need to have "Allow using Google Drive as a source" in the add-on settings activated.
Then you go to Videos, Add Videos, Browse. There you need to select "Add network location...".

In the window that comes up you select:
Protocol: Web server directory HTTP)
Server address: localhost
Remote path: source
Port: 8587

You press ok and then you can navigate Google Drive from the new entry created and select specific folders to create different video sources.  
I would like to be clear about the main differences between using the exported files STRM (Method 1) or using the folders of google drive as a source (Method 2):
1) Firstly if I notice a difference in the speed of start of the movies or series, this is slower when Method 2 is used.
2) With Method 2, Once in a while, the empty Google Drive folder appears and all the access paths for the movies and series disappear. But this is solved by disabling the Add-on: Cloud Drive Common Module and the Add-on: google drive. Then restart Kodi and re-activate them.
3) ..

Any other difference you can find? 


On allowing Google Drive as a source can this work with folks I have shared my library with ? I’ve created a folder of strm files for someone to load and while they see google drive they don’t see any of the created strm categories .
is This Addon still being supported ?
Last Visit to the Forum by the OP, cguZZMan, Monday, 6th May, 2019, 17:06 (2 months ago)
(2019-07-11, 12:56)jmh2002 Wrote: [ -> ]Last Visit to the Forum by the OP, cguZZMan, Monday, 6th May, 2019, 17:06 (2 months ago)


Ok. Tried to install Addon on my pc and I get a pop up that says Unknown Error : Extra Data :line 73 column 8 -line 84 column 2 (char 3481 -3762 ) Please try again
Last Visit to the Forum by the OP, cguZZMan, Monday, 6th May, 2019, 17:06 (2 months ago)

That's not good...

Ok... @cguZZMan 

I have some problems with my mp3s.
Maybe it's a known issue, but i don't wanna read the hole thread.

1.) - and it's not so important for me...

Addons -> Music Addons -> GoogleDrive -> MP3 Folder: no mp3s listed. Folder is empty.

2.) - very important for me:

Added Google Drive to Video and Music database/library with localhost:port/path...
It's working for both.
Videofiles scraping works. All information are loaded.
MP3 scraping ist not working. Kodi tries to scrape... 0% up to 100% but in the end no data found.
I hope CGuzzman is ok . 2 months is a long time .
(2019-07-22, 15:24)Publish3r Wrote: [ -> ]2.) - very important for me:

Added Google Drive to Video and Music database/library with localhost:port/path...
It's working for both.
Videofiles scraping works. All information are loaded.
MP3 scraping ist not working. Kodi tries to scrape... 0% up to 100% but in the end no data found.

As far as I have understood about how Kodi works, I don't think it's possible to make this to work.
Because music scraping works differently than video scraping.
Kodi reads the metadata of the songs from the files (it's a mandatory) unlike video scraping.
Kodi can't read the files because they are not actual audio files.
I may don't know what I am talking about, but I think I am right on this.
I don't think this is something cguZZMan could make it to work.
Kodi's music scraping would have to be changed fundamentally.
(2019-07-23, 03:19)olympus Wrote: [ -> ]
(2019-07-22, 15:24)Publish3r Wrote: [ -> ]2.) - very important for me:

Added Google Drive to Video and Music database/library with localhost:port/path...
It's working for both.
Videofiles scraping works. All information are loaded.
MP3 scraping ist not working. Kodi tries to scrape... 0% up to 100% but in the end no data found.

As far as I have understood about how Kodi works, I don't think it's possible to make this to work.
Because music scraping works differently than video scraping.
Kodi reads the metadata of the songs from the files (it's a mandatory) unlike video scraping.
Kodi can't read the files because they are not actual audio files.
I may don't know what I am talking about, but I think I am right on this.
I don't think this is something cguZZMan could make it to work.
Kodi's music scraping would have to be changed fundamentally. 
@olympus Maybe you are right. But another guy from the german kodi forum is using gdrive with rclone and emby. He can scrape his mp3s.
I'm not using emby and i don't want to use it. Rclone is of course an alternative to this addon. I have to try it, maybe it will work with rclone.