Kodi Community Forum

Full Version: gdrive - Google Drive Video/Music Add-on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2015-04-21, 02:54)dmdsoftware Wrote: [ -> ]New testing release:

http://dmdsoftware.net/repository.ddurdl...-0.6.2.zip

Version 0.6.2
- add player controls (player + window) -- testing
- override player playback (no longer displays "opening stream") -- testing
- fix playback default for never transcode + always cache
-- Google Drive API 2 module - add force cache to single file option
Version 0.6.1
- add encfs source + target support, decrypted folder support

Just did some extensive video testing on 0.6.2. See comments below. Thanks for all your hard work.

Version 0.6.2
- add player controls (player + window)
* It looks to be working. Not sure how I brought it up though.

- override player playback (no longer displays "opening stream")
* With smaller files, it's ok. But with larger files, there's a long pause and I think it's better to show a dialogue that it's opening the stream (otherwise it feels like XMBC is frozen).

- fix playback default for never transcode + always cache
* This is working fine now. Defaults when just selecting a video. The caching pop up shows fine as well when its caching (although it shows the filename.original).
* I tried the other settings like offline or download, but couldn't figure out where the file gets saved to. Maybe it's in the temporary directory where the cache is.
Perhaps a file download location setting is needed.
-- Google Drive API 2 module - add force cache to single file option
* I like this. It should actually be the default setting in my opinion. I noticed when you pull up the menu when it's playing though, it shows the filename as cache.mp4 (maybe you could show the original selected filename instead)
* Is there anyway to automatically delete the cache file after playing? Or give an option to delete it when exiting or option in the settings to auto delete it?
* Also, I realized the technique used for caching is really downloading the entire file. It's fine with smaller files, but I accidentally had the cache setting on when trying to play a large 8gb HD movie and I completely filled up my Fire TV stick and crashed Kodi (I tried to cancel the caching/downloading, but even though I hit cancel, it still downloaded until it crashed). Maybe put in a check routine of the amount of space available in the temp directory and if its too big, default to streaming with no cache & tell the user this is the case (or just say you can't cache this file b/c it's too big).
* Is there a way to make this a true fixed size buffer cache (i.e. 500mb or 15 seconds ahead) vs. downloading the whole file in the background and just playing it based on the % cache in the settings? This is important for other cloud storage plugins as GDrive is the fastest, but you really need some buffering for other ones like Onedrive. Is Amazon Cloud support with unlimited on the roadmap?
(2015-04-21, 08:48)dr_cure Wrote: [ -> ]- override player playback (no longer displays "opening stream")
* With smaller files, it's ok. But with larger files, there's a long pause and I think it's better to show a dialogue that it's opening the stream (otherwise it feels like XMBC is frozen).

I was thinking maybe of some indicator. Will at least allow the user an option to toggle this on/off.

(2015-04-21, 08:48)dr_cure Wrote: [ -> ]- fix playback default for never transcode + always cache
* This is working fine now. Defaults when just selecting a video. The caching pop up shows fine as well when its caching (although it shows the filename.original).
* I tried the other settings like offline or download, but couldn't figure out where the file gets saved to. Maybe it's in the temporary directory where the cache is.
Perhaps a file download location setting is needed.
It gets saved to a subdirectory under the cache folder selected in settings. It should be directly playable from selecting play offline.

(2015-04-21, 08:48)dr_cure Wrote: [ -> ]-- Google Drive API 2 module - add force cache to single file option
* I like this. It should actually be the default setting in my opinion. I noticed when you pull up the menu when it's playing though, it shows the filename as cache.mp4 (maybe you could show the original selected filename instead)
* Is there anyway to automatically delete the cache file after playing? Or give an option to delete it when exiting or option in the settings to auto delete it?
I try to avoid deleting things. Also, an action to delete can only be tied to either the player action STOPPED or ENDED. Just because a user clicked stopped doesn't mean they won't click play immediately afterwards, trying to playback the content.

(2015-04-21, 08:48)dr_cure Wrote: [ -> ]* Also, I realized the technique used for caching is really downloading the entire file. It's fine with smaller files, but I accidentally had the cache setting on when trying to play a large 8gb HD movie and I completely filled up my Fire TV stick and crashed Kodi (I tried to cancel the caching/downloading, but even though I hit cancel, it still downloaded until it crashed). Maybe put in a check routine of the amount of space available in the temp directory and if its too big, default to streaming with no cache & tell the user this is the case (or just say you can't cache this file b/c it's too big).
* Is there a way to make this a true fixed size buffer cache (i.e. 500mb or 15 seconds ahead) vs. downloading the whole file in the background and just playing it based on the % cache in the settings?
XBMC doesn't allow you to directly manipulate its buffering, so that is why I use this workaround. ffmpeg probably won't recognize a media file if it is split across multiple, as only the header of the file will have key details needed for playback. If it can play back segments, then it might possible to playback segments in a playlist, but of course, there would be pauses in playback as XBMC transitions across segments. A lot of online streaming that use Adobe HDS use segments of a few seconds log, that the client weaves together seamlessly during playback. This is still lacking in XBMC (which uses ffmpeg behind the scenes). I saw plugins that need to deal with stream segments actually download the segments and stitch them together before playing back.


(2015-04-21, 08:48)dr_cure Wrote: [ -> ]This is important for other cloud storage plugins as GDrive is the fastest, but you really need some buffering for other ones like Onedrive. Is Amazon Cloud support with unlimited on the roadmap?
With 0.5.x, I moved to sync gdrive with the cloud services framework that I setup that the other plugins are using. The idea there is a feature that is implemented for one can easily be moved to the other. I have plans on bringing the OneDrive plugin up-to-speed with the gdrive plugin. The only feature that has to be setup manually is the OAUTH2.

Amazon Cloud Drive has some design issues. Firstly, there is no web interface, user needs to install a Windows or MAC client to access their files. There is a developer's API, but it is closed access is highly controlled by Amazon. For some odd reason, they treat it like an app store, and applications that use any of their API need to be reviewed by them, etc. This really didn't deter the idea of making an app through the official channels, but I also noticed that they limit you to 8 devices, and there is no way to unregister a device. Apple does the same with itunes, but they at least let you remove a device. From what I read in the forums, once you have hit your 8 device limit, your account becomes permanently locked and only accessible by one of those registered 8 devices. The guy who developed the Amazon Cloud Drive fuse program mentioned he lost accounts due to this. Seems like a major oversight. Finally, uploading content seems to be a major hurdle with Amazon Cloud. Their API shows that you simply POST the entire file in a single request which is going to be prone to fail for large files. All the other provides provide ability to upload files in chunks, which make it easy to move files between cloud services. I have a custom-made script that backups up my files in a reliable and timely manner between both OneDrive and Google Drive. Never a good idea to put all your eggs in one Cloud-basket. I really wanted to add Amazon Cloud Drive as a third basket, but I'm not about to go through the task of trying to get content synced to it with such limiting options. BTW, their file size limit is 2GB.
with Version 0.6.2
- override player playback (no longer displays "opening stream") -- testing


When i click on a video to play i now get the Opening stream popup and it doesn't go away, if i try and back out it cancels the stream.
(2015-04-22, 00:53)Kraevin Wrote: [ -> ]with Version 0.6.2
- override player playback (no longer displays "opening stream") -- testing


When i click on a video to play i now get the Opening stream popup and it doesn't go away., if i try and back out it cancels the stream.

Hello,

I have the same problem.

PS:A word of appreciation to your project. I'm a fan. Great job
(2015-04-22, 00:53)Kraevin Wrote: [ -> ]with Version 0.6.2
- override player playback (no longer displays "opening stream") -- testing


When i click on a video to play i now get the Opening stream popup and it doesn't go away, if i try and back out it cancels the stream.

(2015-04-22, 11:52)TheWizardPT Wrote: [ -> ]
(2015-04-22, 00:53)Kraevin Wrote: [ -> ]with Version 0.6.2
- override player playback (no longer displays "opening stream") -- testing


When i click on a video to play i now get the Opening stream popup and it doesn't go away., if i try and back out it cancels the stream.

Hello,

I have the same problem.

PS:A word of appreciation to your project. I'm a fan. Great job

Thanks for the testing and feedback. It should be fixed in this new release (v0.6.3):

http://dmdsoftware.net/repository.ddurdl...-0.6.3.zip

There is also a new option and it is disabled by default (revert back to original playback unless enabled).

Version 0.6.3
- fully implement override player playback (no longer displays "opening stream")
- add toggle in settings for override player playback (advance-> use integrated player) [default disable]
- cleanup of settings
- remove "Play original" from context menu for "music"
A carry over from the Hive plugin. In addition to creating .STRM files that can perform searches, you can now create a folder with a name such as "SAVED SEARCH|MySearch", and when that folder is in view in the plugin, it will be show up prefixed with a *, such as *MySearch, indicating that it is a saved search. Clicking on it will display the search results for MySearch.

If you are unorganized like me, and you have all your stuff spewed across your drive, searching becomes super-handy, even more so if you end up searching using the same criteria often.

New release (0.6.4):
http://dmdsoftware.net/repository.ddurdl...-0.6.4.zip

Version 0.6.4
-- implement: support for saved-search #23
-- Google Drive API 2 module - add: saved search (create a folder anywhere on your drive called 'SAVED SEARCH|search critera', and when viewing that folder, that entry will show up with a "*search critera", allowing you to search for content matching "search content"
- bug fix for delayed playback on videos

known issues with this test build:
- Titles of video/music files not displayed properly when using integrated player #26
- Direct playback of music files in pictures does not work #27
Hi, would you be so kind as to help me understand exactly what happens with these "override player playback" functions?

Concerning the streaming original files option, I stress once more the fact that files should have the seek info in their header but that, having gotten hold of the header, XBMC should be more than capable of asking pieces of info far ahead in the file, and Drive API seems to support that. You could cache the header and handle seeking through that, maybe?
(2015-04-23, 14:22)ashlar Wrote: [ -> ]Hi, would you be so kind as to help me understand exactly what happens with these "override player playback" functions?

These kinds of plugins are supposed to just generate either lists of files or lists of resolveable urls. There is also another option of making all files and folders as nonplayable and then just call the XBMC.Player class yourself. By doing this, it bypasses the "opening stream" dialog that is customary in XBMC. I find it not helpful on a PC, but on a device that is not as response (ARM device like a raspberry pi), the time it takes to start a video is much faster when the dialog doesn't have to open. It was taking me 6 seconds to kick off a video on a raspberry pi model A when it did the original approach of resolving a URL for XBMC to playback, and now it takes 3-4 seconds when it calls the XBMC.Player class itself.
(2015-03-30, 20:43)MattBlacK85 Wrote: [ -> ]
(2015-03-29, 17:42)dmdsoftware Wrote: [ -> ]
(2015-03-29, 16:21)MattBlacK85 Wrote: [ -> ]Nice! Working great. Only thing is that of every file in gdrive it creates a strm file. So pictures, nfo etcetera. Now in the library i have 5 same moviesfile instead of 1. Hit or miss which is the good one. Is it possible that it only creates streamfiles from mkv, mp4, avi.

And automated creating streamfiles every day? So don't have to do it mannually

If that is sorted out it will je perfect. Can we donate?

Ah, yes, I'll tie the STRM into the setting in Settings. I have a setting that lets you define what you want to display when you view the Video/Music/Photo plugin, for instance to view only Videos, Videos and Music or Everything, when using the plugin from Video. I'll tie so it also only creates STRM for what the user would see.

You can run the STRM process using a STRM or playlist file for either a single file, directory, or an entire account. Creating this STRM would be manually done, but it could be probably simplified by adding an option. You can set a playlist to run on startup. It wouldn't be too difficult, I don't think, to add a scheduler option.

Donations always accepted below. It pays for keeping a server going hosting the files, hosting for OAUTH2 authentication, and any cloud service storage costs.

http://goo.gl/j7v7SD

Great, just did a small donation for you so far.
I think you mis understood my problem with the library integration. The stream files that are created is for every file. So now I have multiple same movie files in the library.
For example Fast Five:
I have 4 times Fast Five in the library
- Fast Five.jpg.strm
- Fast Five.mkv.strm (so this one is good)
- Fast Five.nl.srt.strm
- Fast Five.nfo.strm

And because of that Kodi will put 4 times Fast Five in the library and one of them is the videostream.
The library will be full of same movie posters.

If your addon will filter this with creating streamfiles (only make streamfiles of .mkv .avi .mp4 etcetera) it will be perfect.

(2015-04-04, 20:24)MattBlacK85 Wrote: [ -> ]Just found a bug in 0.5.5. Creating streamfiles with a '&' results in many file creation of the same folder. I had 30 folders of Angels & Demons for example.

Is there a change log for 0.5.6

(2015-04-05, 14:00)Kraevin Wrote: [ -> ]
(2015-04-05, 11:55)MattBlacK85 Wrote: [ -> ]
(2015-04-04, 22:30)dmdsoftware Wrote: [ -> ]Just curious, was the & issue present in 0.5.0-0.5.4? I remember having "stress tested" multiple times against a few members accounts (over 10TB of content). Did it continue on and finally finish, or did it stop?

I didn't test it on the other releases. Just now on 0.5.5. I'm not sure if it stopped creating files, I think not because every time I deleted folders they would come back... So deleted the addon to make it stop.

I will test this when i get home tonight, i have that series. Will check and see if it creates a bunch of folders and files and post the results here.


UPDATE:

Alright, i did some testing on a few series that had & in the name. Here are the results. First, it correctly created all the folders and files and no duplicates or "bunch of files and folders". it scanned the whole directory and added all the series correctly. The only issue was the renaming of files that the plugin did. DRM is already aware of this and working on some fixes. Here are the examples below of a couple series with the & in the name. Hope this helped.

Will & Grace
Folder Name - Will & Grace
File Name - Will & Grace - S01E01 - The Pilot (Love & Marriage) - [DVD].mkv

Franklin & Bash
Folder Name - Franklin & Bash
File Name - Franklin & Bash - S01E01 - Pilot - [WEBDL-720p].mkv

Brothers & Sisters
Folder Name - Brothers & Sisters
File Name - Brothers & Sisters - S01E01 - Patriarchy - [WEBDL-720p].mkv

Key & Peele
Folder Name - Key & Peele
File Name - Key & Peele - S01E01 - Series Premiere - [Bluray-720p].mkv

The issue with & in the filename is resolved in 0.6.5. I've tested it successfully with folders and files with &. Further, the fix also handles a few other (well, all) trouble characters like , (comma).

And to be clear, MattBlacK85's concern about generating .STRM files for non-video files was addressed and resolved in 0.5.10, so it would test successful also in 0.6.5.

Version 0.6.5:
http://dmdsoftware.net/repository.ddurdl...-0.6.5.zip

Version 0.6.5
- fix for handling special characters in STRM building process (such as &)
- fixes for encfs function for special characters such as ,s in filenames

known issues with this test build:
- Titles of video/music files not displayed properly when using integrated player #26
- Direct playback of music files in pictures does not work #27
Version 0.6.6:
http://dmdsoftware.net/repository.ddurdl...-0.6.6.zip

Version 0.6.6
- code refactoring
- fix: Titles of video/music files not displayed properly when using integrated player #26
- fix: files and folders with ,s in their name break the plugin URL for playback #28
- fix: Direct playback of music files in pictures does not work #27
- thumbnail support when playing back via STRM

known issues with this test build:
- Play from here in videos causes endless "opening stream" + error #29
Testing subtitle support. So far, only introduced the option as a right-click, play with subtitles. The plugin will search your Google Drive for all .srt files for the current video file and present a list to choose from. If there is only 1 matching subtitle file (if you don't have multiple srt files for different languages), then it playsback with that .srt file. Next release will support YouTube XML subtitles embedded in streams.

Version 0.6.7
http://dmdsoftware.net/repository.ddurdl...-0.6.7.zip

known issues with this test build:
- Play from here in videos causes endless "opening stream" + error #29
Hi !

I tested this last version (0.6.7) but impossible to play a video :

Quote:21:56:03 T:388 NOTICE: Thread LanguageInvoker start, auto delete: false
21:56:03 T:388 NOTICE: -->Python Interpreter Initialized<--
21:56:11 T:388 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: too many values to unpack
Traceback (most recent call last):
File "C:\Users\TREX\AppData\Roaming\Kodi\addons\XBMC-gdrive-unstable\default.py", line 1131, in <module>
(mediaURLs,package) = service.getPlaybackCall(package=package.package(mediaFile,mediaFolder))
ValueError: too many values to unpack
-->End of Python script error report<--
21:56:11 T:5132 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.gdrive-testing/?mode=video&instance=gdrive1&folder=&filename=0B9CWy2PjJ_cEblVlbFJiOWM4R0E&filesize=2714043025&title=The+Americans+%282013%29+-+1x01+-+Pilot.mkv&content_type=video]
Awesome job Dmdsoftware for your quick updates!

0.6.6 was working perfect.

0.6.7
I can watch videos that are already in the library that was scanned with 0.6.6. i am unable to rescan the drive though for new episodes and shows with this version 0.6.7. i get the error simular the poster above

13:56:24 T:2820 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.video.gdrive-testing\default.py", line 323, in <module>
silent = getParameter('silent', int(getSetting('strm_silent',0)))
ValueError: invalid literal for int() with base 10: ''
-->End of Python script error report<--
(2015-04-25, 09:58)tatoomana Wrote: [ -> ]Hi !

I tested this last version (0.6.7) but impossible to play a video :

Quote:21:56:03 T:388 NOTICE: Thread LanguageInvoker start, auto delete: false
21:56:03 T:388 NOTICE: -->Python Interpreter Initialized<--
21:56:11 T:388 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: too many values to unpack
Traceback (most recent call last):
File "C:\Users\TREX\AppData\Roaming\Kodi\addons\XBMC-gdrive-unstable\default.py", line 1131, in <module>
(mediaURLs,package) = service.getPlaybackCall(package=package.package(mediaFile,mediaFolder))
ValueError: too many values to unpack
-->End of Python script error report<--
21:56:11 T:5132 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.gdrive-testing/?mode=video&instance=gdrive1&folder=&filename=0B9CWy2PjJ_cEblVlbFJiOWM4R0E&filesize=2714043025&title=The+Americans+%282013%29+-+1x01+-+Pilot.mkv&content_type=video]

I contacted you through github. I pushed out a revised 0.6.7 that fixes ClientLogin, where this error originated from. So it should be playing back.

If you want to take advantage of the new features, you'll need to move to OAUTH2.
(2015-04-25, 20:01)Kraevin Wrote: [ -> ]Awesome job Dmdsoftware for your quick updates!

0.6.6 was working perfect.

0.6.7
I can watch videos that are already in the library that was scanned with 0.6.6. i am unable to rescan the drive though for new episodes and shows with this version 0.6.7. i get the error simular the poster above

13:56:24 T:2820 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.video.gdrive-testing\default.py", line 323, in <module>
silent = getParameter('silent', int(getSetting('strm_silent',0)))
ValueError: invalid literal for int() with base 10: ''
-->End of Python script error report<--

That would be code refactoring at play there. I was looking at this exact segment of code and wondering how it could be still be working .

Are you calling this scan via STRM?