Kodi Community Forum
Release gdrive - Google Drive Video/Music Add-on - 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 gdrive - Google Drive Video/Music Add-on (/showthread.php?tid=177557)



RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dmdsoftware - 2016-03-09

(2016-03-09, 17:30)v.koutensky Wrote: Dear friends,

first of all, thank you very much for all the work you do. I am searching for possibility to play my music collection from Gdrive, and Kodi + this addon seems to be right way. But I am facing several troubles I am unable to pass even I have read through whole this thread.

Generally I found two possible ways how to work with Gdrive:

1) Playing music directly from Gdrive in file mode:
- playback works so far so good, but problem is, that folders are sorted by default "by track", which makes mess in play order, as the tracks are sorted upside down, and folder list is not sorted alphabeticaly. I can manually change order to "by name" which solves problems, but sorting is done just for actual folder, not aplied to subfolders. I am unable to manually sort all the folders with my songs, as there are thousands of those.
- problem might be solved by changing default sorting of files "by name" as default, but I cannot find any way how to do this

2) Playing via .strm files
- I have generated .strm files from my Gdrive music folder to the local directory. Exporting of strm files and directory structure is OK, the Kodi shows good structure. Problem is, that I can play only one song - no way how to add whole album to playlist, or how to add files to library.

Any advice on playing albums either one or second way correctly would be apreciated. Maybe I am just doing some stupid mistake.

All my tests are done with flac, mp3 or mp4 music files.
I confirm that song caching is not working with 0.7.41 testing. Song wont start to play
With 0.7.17, caching works unpredictable - sometimes song plays well, usually 1 song of the album is not played, and Kodi skips directly to second.

Thank you. Vit

For 1, you should be able to bring up the sorting option in KODI. In confluence, you move to the left of the screen and it will bring up sorting options. It is defaulting on one that is supposed to be optimized for music. I will add a configuration option to allow the user to set a default. In earlier versions of the plugin, I simply didn't parse the content, so there was no sorting other than by name. Are you playing back via Music or Video? Each will have different sorting options.

For 2, music STRM files are not importable by KODI. I'm looking at idea around using JSON-RPC to import them directly from the plugin (but it might bypass scraping though).


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - v.koutensky - 2016-03-09

(2016-03-09, 18:07)dmdsoftware Wrote: For 1, you should be able to bring up the sorting option in KODI. In confluence, you move to the left of the screen and it will bring up sorting options. It is defaulting on one that is supposed to be optimized for music. I will add a configuration option to allow the user to set a default. In earlier versions of the plugin, I simply didn't parse the content, so there was no sorting other than by name. Are you playing back via Music or Video? Each will have different sorting options.

Thank you for a prompt reply. I know the left menu and sorting options. Problem is that it sets sorting just for actual directory, not for the subdirectories. If you will be able to add a chance to change default sorting, it will solve my problems.

I play through "Music".
But thank you for idea playing through "Video". The sorting is OK there. I will test it and let know.

It would be good to have option to select default sorting in "Music", but unless you do so, playing through video is OK.


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dmdsoftware - 2016-03-09

(2016-03-09, 19:07)v.koutensky Wrote:
(2016-03-09, 18:07)dmdsoftware Wrote: For 1, you should be able to bring up the sorting option in KODI. In confluence, you move to the left of the screen and it will bring up sorting options. It is defaulting on one that is supposed to be optimized for music. I will add a configuration option to allow the user to set a default. In earlier versions of the plugin, I simply didn't parse the content, so there was no sorting other than by name. Are you playing back via Music or Video? Each will have different sorting options.

Thank you for a prompt reply. I know the left menu and sorting options. Problem is that it sets sorting just for actual directory, not for the subdirectories. If you will be able to add a chance to change default sorting, it will solve my problems.

I play through "Music".
But thank you for idea playing through "Video". The sorting is OK there. I will test it and let know.

It would be good to have option to select default sorting in "Music", but unless you do so, playing through video is OK.

Yes, most certainly. It is an easy addition, so it should be in for next release (today or tomorrow).


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - ashlar - 2016-03-09

(2016-03-07, 12:43)ashlar Wrote: Ehm... now playback doesn't start. I select a file for playback, I see that caching starts... but I think that when it reaches the required percentage (as per settings) it stops caching and it doesn't start playback.
Logs to follow.

Log here: http://xbmclogs.com/p1q7ukbrb

Settings:

Never transcode activated
Force prompt for quality selection deactivated
Always cache for playback activated
Continue downloading after player is user-stopped deactivated

Caching stops exactly at 1% of the file (which is the setting I have in "Percent to buffer before playback".
Did you have a chance to look at this?


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dmdsoftware - 2016-03-10

(2016-03-09, 20:32)ashlar Wrote:
(2016-03-07, 12:43)ashlar Wrote: Ehm... now playback doesn't start. I select a file for playback, I see that caching starts... but I think that when it reaches the required percentage (as per settings) it stops caching and it doesn't start playback.
Logs to follow.

Log here: http://xbmclogs.com/p1q7ukbrb

Settings:

Never transcode activated
Force prompt for quality selection deactivated
Always cache for playback activated
Continue downloading after player is user-stopped deactivated

Caching stops exactly at 1% of the file (which is the setting I have in "Percent to buffer before playback".
Did you have a chance to look at this?

Yes, I tried to playback about 6 files with the same settings and they all played back fine. The only issue I saw was when trying to replay the file a second time, it looked like it was downloading it again rather then using the cached copy. Will need to look into that.


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dabinn - 2016-03-10

(2016-03-09, 17:08)dabinn Wrote:
(2016-03-09, 15:52)dmdsoftware Wrote:
(2016-03-09, 12:37)dabinn Wrote: Hi,

I just tried this add-on, and found all my mkv files in google drive was not shown in KODI, but mp4/avi files are OK. Does this add-on only support videos which were transcoded by google drive ?
-----
update:

I found the problem was caused by the missing file type in google drive.
As it is mentioned in post #587
http://forum.kodi.tv/showthread.php?tid=177557&pid=2119033#pid2119033

My mkv files are shown as "Unknown File" instead of "Video" in google drive. The files are uploaded with a upload tool, If I re-upload them with a browser, the file type will be shown as "Video", and the gdrive add-on can found them.

Is there a way to force gdrive add-on to read file extension, instead of using the file type judged by google drive ?

Are you using the testing branch? or stable? The fix for the missing file extension should work for this unknown video as well.

With the testing branch(gdrive-testing 0.7.41), I saw the google drive 'getting started' file which has no extension is shown at the root directory, (but it is strange that this file was deleted and should be in trash.) gdrive 0.7.17 did not show this file at all.
But mkv/rmvb files are still not shown with both testing/stable branch.


Hi,
I tried to find the cause from source code.
If I added file types (e.g. 'mkv', 'rmvb') in file 'gdrive_api2.py', The video files will be shown and played in KODI correctly.
Code:
# entry is a video
elif ((fileExtension.lower() == '' or fileExtension.lower() not in ('','sub')) and (resourceType == 'application/vnd.google-apps.video' or 'video' in resourceType or fileExtension.lower() in ('ts','mkv','rmvb')) and contentType in (0,1,2,4,7)):

I guess maybe the 'resourceType' are not right, in this case file extension is need for recognizing the video files.


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dabinn - 2016-03-10

Does the addon supports 'ass' & 'ssa' subtitle ?
When I rename the '.ass' file extension to '.srt' in google drive, the ass file will be loaded and correctly displayed with the subtitle effects.
But I cannot get these subtitle loaded without rename them to srt.


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dmdsoftware - 2016-03-10

(2016-03-10, 03:55)dmdsoftware Wrote:
(2016-03-09, 20:32)ashlar Wrote:
(2016-03-07, 12:43)ashlar Wrote: Ehm... now playback doesn't start. I select a file for playback, I see that caching starts... but I think that when it reaches the required percentage (as per settings) it stops caching and it doesn't start playback.
Logs to follow.

Log here: http://xbmclogs.com/p1q7ukbrb

Settings:

Never transcode activated
Force prompt for quality selection deactivated
Always cache for playback activated
Continue downloading after player is user-stopped deactivated

Caching stops exactly at 1% of the file (which is the setting I have in "Percent to buffer before playback".
Did you have a chance to look at this?

Yes, I tried to playback about 6 files with the same settings and they all played back fine. The only issue I saw was when trying to replay the file a second time, it looked like it was downloading it again rather then using the cached copy. Will need to look into that.

I thought maybe you were using a special path that is KODI-specific, so I tested again with a path using samba (one that would cause the plugin to drop down to non-resume download mode) and the tests passed there as well.


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dmdsoftware - 2016-03-10

(2016-03-10, 07:54)dabinn Wrote:
(2016-03-09, 17:08)dabinn Wrote:
(2016-03-09, 15:52)dmdsoftware Wrote: Are you using the testing branch? or stable? The fix for the missing file extension should work for this unknown video as well.

With the testing branch(gdrive-testing 0.7.41), I saw the google drive 'getting started' file which has no extension is shown at the root directory, (but it is strange that this file was deleted and should be in trash.) gdrive 0.7.17 did not show this file at all.
But mkv/rmvb files are still not shown with both testing/stable branch.


Hi,
I tried to find the cause from source code.
If I added file types (e.g. 'mkv', 'rmvb') in file 'gdrive_api2.py', The video files will be shown and played in KODI correctly.
Code:
# entry is a video
elif ((fileExtension.lower() == '' or fileExtension.lower() not in ('','sub')) and (resourceType == 'application/vnd.google-apps.video' or 'video' in resourceType or fileExtension.lower() in ('ts','mkv','rmvb')) and contentType in (0,1,2,4,7)):

I guess maybe the 'resourceType' are not right, in this case file extension is need for recognizing the video files.

Correct. This is the addition I had in mind getting into the code. There were already previous exception for empty '.ts' files that are not recognizable by Google Drive as video. These two additional ones will accomodate your particular MKV and RMVB files.


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dmdsoftware - 2016-03-10

(2016-03-10, 13:34)dabinn Wrote: Does the addon supports 'ass' & 'ssa' subtitle ?
When I rename the '.ass' file extension to '.srt' in google drive, the ass file will be loaded and correctly displayed with the subtitle effects.
But I cannot get these subtitle loaded without rename them to srt.

I wasn't aware of these subtitle types. As you pointed out, since they are native to KODI, I'll add code to recognize them so that you don't need to rename them to .srt/.sub.


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - Nikostratus - 2016-03-11

Interesting.
Is there a way to add metadata information?


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dmdsoftware - 2016-03-11

(2016-03-10, 07:54)dabinn Wrote:
(2016-03-09, 17:08)dabinn Wrote:
(2016-03-09, 15:52)dmdsoftware Wrote: Are you using the testing branch? or stable? The fix for the missing file extension should work for this unknown video as well.

With the testing branch(gdrive-testing 0.7.41), I saw the google drive 'getting started' file which has no extension is shown at the root directory, (but it is strange that this file was deleted and should be in trash.) gdrive 0.7.17 did not show this file at all.
But mkv/rmvb files are still not shown with both testing/stable branch.


Hi,
I tried to find the cause from source code.
If I added file types (e.g. 'mkv', 'rmvb') in file 'gdrive_api2.py', The video files will be shown and played in KODI correctly.
Code:
# entry is a video
elif ((fileExtension.lower() == '' or fileExtension.lower() not in ('','sub')) and (resourceType == 'application/vnd.google-apps.video' or 'video' in resourceType or fileExtension.lower() in ('ts','mkv','rmvb')) and contentType in (0,1,2,4,7)):

I guess maybe the 'resourceType' are not right, in this case file extension is need for recognizing the video files.

(2016-03-10, 13:34)dabinn Wrote: Does the addon supports 'ass' & 'ssa' subtitle ?
When I rename the '.ass' file extension to '.srt' in google drive, the ass file will be loaded and correctly displayed with the subtitle effects.
But I cannot get these subtitle loaded without rename them to srt.


These fixes In v0.7.45
http://dmdsoftware.net/repository.ddurdle-testing/plugin.video.gdrive-testing/plugin.video.gdrive-testing-0.7.45.zip

v0.7.45 (2016-03-10)
- fix search error when CLOUD_DB is enabled
- add support for subtitles .ass and .ssa
- add mkv and rmvb extension mapping in unknown file situation
v0.7.44 (2016-03-09)
- fix for playback of offline file
v0.7.43 (2016-03-08)
- CLOUD_DB: load data during listings (resume + play count)
- CLOUD_DB: fix resume points
- CLOUD_DB: STRM resume points
- CLOUD_DB: updated add to queue
- drop Brazil language file


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dmdsoftware - 2016-03-11

(2016-03-11, 04:42)Nikostratus Wrote: Interesting.
Is there a way to add metadata information?

Sort of. For starters,

1) if you have a fanart.jpg in the directory, it will load that
2) you can export to STRM files and folders and then import them to KODI to scrub and load in the TV Shows + Movies

Currently working on

1) letting users store NFO files alongside their media to load metainfo
2) letting users manage directly in a cloud_db spreadsheet which users can paste NFO info into as such shown in this screenshot
Image

3) finally, looking to ability to pull data from KODI's library -- if you had a TV show like The Simpsons S20E01 in Google Drive and exported STRM and imported into KODI library, then when you view this file in the plugin, it will recognize it as having meta info available in KODI and load the metainfo and images from the library, populating #2 permanently


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - v.koutensky - 2016-03-11

Any luck with that default sorting for music? I can play music through video, but anyway.
I was unable to find any change.

Caching problem seems to be fixed, everything works well even when playing bigger flac files.

Vit


RE: [RELEASE] gdrive - Google Drive Video/Music Add-on - dabinn - 2016-03-11

(2016-03-11, 05:35)dmdsoftware Wrote:
(2016-03-10, 07:54)dabinn Wrote:
(2016-03-09, 17:08)dabinn Wrote: With the testing branch(gdrive-testing 0.7.41), I saw the google drive 'getting started' file which has no extension is shown at the root directory, (but it is strange that this file was deleted and should be in trash.) gdrive 0.7.17 did not show this file at all.
But mkv/rmvb files are still not shown with both testing/stable branch.


Hi,
I tried to find the cause from source code.
If I added file types (e.g. 'mkv', 'rmvb') in file 'gdrive_api2.py', The video files will be shown and played in KODI correctly.
Code:
# entry is a video
elif ((fileExtension.lower() == '' or fileExtension.lower() not in ('','sub')) and (resourceType == 'application/vnd.google-apps.video' or 'video' in resourceType or fileExtension.lower() in ('ts','mkv','rmvb')) and contentType in (0,1,2,4,7)):

I guess maybe the 'resourceType' are not right, in this case file extension is need for recognizing the video files.

(2016-03-10, 13:34)dabinn Wrote: Does the addon supports 'ass' & 'ssa' subtitle ?
When I rename the '.ass' file extension to '.srt' in google drive, the ass file will be loaded and correctly displayed with the subtitle effects.
But I cannot get these subtitle loaded without rename them to srt.


These fixes In v0.7.45
http://dmdsoftware.net/repository.ddurdle-testing/plugin.video.gdrive-testing/plugin.video.gdrive-testing-0.7.45.zip

v0.7.45 (2016-03-10)
- fix search error when CLOUD_DB is enabled
- add support for subtitles .ass and .ssa
- add mkv and rmvb extension mapping in unknown file situation
v0.7.44 (2016-03-09)
- fix for playback of offline file
v0.7.43 (2016-03-08)
- CLOUD_DB: load data during listings (resume + play count)
- CLOUD_DB: fix resume points
- CLOUD_DB: STRM resume points
- CLOUD_DB: updated add to queue
- drop Brazil language file

Hi,
Something is wrong with .ass subtitle in v0.7.45.
Click on a video, after the 'Choose a stream' dialog, screen stopped at 'Bufering... 100%' for several minutes. (KODI was not freeze, but it will crash if I hit stop button at this moment)
I also test video files with idx/sub subtitle, same situation. Only srt subtitle is OK.

If I know how to print/output debug message from the python code, I may able to help debugging this.


--
Update:
I still don't know why xbmc.log('debug string', xbmc.LOGERROR) did not update my kodi.log.
Finally I have setup the pydev debugger, and will try to trace the subtitle issue.