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.
(2018-10-23, 17:05)wayjin Wrote: [ -> ]e folders for individual libraries in Google Drive

@wayjin I honestly use strm feature and check the "Check for changes" option.  So far I haven't had long wait times for scanning except when I first set it up to export all of the strm files.
@wayjin you should be able to navigate through your drive starting from http://localhost:8587/source/
if you have a folder "Movies" in your root, the complete URL would be something like http://localhost:8587/source/Google Drive/<Your Name>/Movies
But you don't have to build the URL yourself, just use the option in Videos > Files > Add videos.. > Browse, and then add source network location and then navigate to your folder.
Hey @cguZZMan thanks again for great addon!
So I unchecked "always ask for the stream format before play" because I always just choose original format. but some times when my internet is slow I need to play in a lower resolution. So I have to go through the menu and check the "always ask for the stream format before play" which is a bit of a pain. just wondering is it possible to add a option in the long press menu on a movie/show where it says "play" "information" "marked as watched" etc with the new option "choose resolution"
Thanks again
I wonder if I should be worried about Google Drive api ban if using the addon?
Concerning the API quota,

If storage of the stream files are also in gdrive, will that quickly cause me to get a ban? Or do I need to get these files off gdrive completely?
@Yoshifriend that could be a good improvement for later. You can add it to the list here: https://github.com/cguZZman/plugin.googledrive/issues

@gurabli why should you? If you use your drive as a personal storage of your video collection, which is the intent of this addon to help with, you won't probably even realize there is a ban.

@ace1024 the main idea of the addon is to play your videos stored in your drive. Forget about the ban.
Hello.
I have the problem that my audio and image files are not shown. The audio folder contains mp3 files and covers in jpg, but they are not shown. There is one m3u in the folder, that file is listed. With the video files there are no preblems. What's wrong?
I tried also to enter the folders by "video addons" / "music addons" / "picture addons" - but no music or pictures listed.
Post your debug log file after navigating to your folder where the files are located.
You must navigate with the addon entering from the "Music add-ons" option if you want audio files displayed. For images, you must enter from the "Picture add-ons" option.
Each mode will apply the correspondent filter. If you enter the addon from the "Video add-ons" option, it will display video files only.
It's working now. I have another question.

...
url = "plugin://plugin.googledrive/?item_id=AAA&driveid=XXX&item_driveid=XXX&action=play&content_type=video"
pic = "plugin://plugin.googledrive/?item_id=BBB&driveid=XXX&item_driveid=XXX&action=play&content_type=image"
listitem=xbmcgui.ListItem(title, iconImage=pic, thumbnailImage=pic)
listitem.setInfo( type="Video", infoLabels={ "Title": title, "plot": plot } )
xbmc.Player().play(url, listitem)
...
url is working, pic not. Is there a solution?
And is it possible to list all files from folder with something like os.listdir(path) ?
If you are using the google drive addon to serve files for another addon, you could import the cloud drive common module to your addon and then use a utility class to get the download URL.

addon.xml

<requires>
     <import addon="script.module.clouddrive.common" />
</requires>

and then get the url with something like this

from clouddrive.common.service.download import DownloadServiceUtil
...
...
url = DownloadServiceUtil.build_download_url(driveid, item_driveid, item_id, filename,'plugin.googledrive')
you can send anything in the filename parameter, not necessarily the real file name.

This will generate an url pointing to the download service of the google drive addon which in turn will redirect it to the real download url from google.
Is there a way to auto start slideshow with pictures from a google drive directory?
Can I use autoexec.py? If autoexec.py works, what is the path that points to a specified directory within google drive?
Thank you!
The plugin's path that lists a directory for pictures is something like

plugin://plugin.googledrive/?action=_list_folder&content_type=image&driveid=11111&item_driveid=22222&item_id=33333)
where
driveid is the id of your account. you can pull it from the accounts.cfg file in the addon_data folder
item_driveid is the same as driveid.
item_id is folder id in google drive. You can get it from the kodi logs or may be is more easy to go to the google drive page and after opening the folder you want, the url will be something like https://drive.google.com/drive/u/0/folders/33333. The last part is the item_id.
Hello cguZZMan,

i have the Problem like Publish3r had. When i enter from Music-Addons, no mp3 shows up.

** deleted **


Would be nice if you can say whats the problem because i tested it on windows and android, on booth i dont get to show music files
Again, post your debug log file after navigating to your folder where the files are located.
You must navigate with the addon entering from the "Music add-ons" option if you want audio files displayed. For images, you must enter from the "Picture add-ons" option.
Each mode will apply the correspondent filter. If you enter the addon from the "Video add-ons" option, it will display video files only.

https://kodi.wiki/view/Log_file/Easy
(2018-11-03, 02:38)cguZZMan Wrote: [ -> ]Again, post your debug log file after navigating to your folder where the files are located.
 Sorry, heres the debug log file:
** deleted **