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 - sabrex - 2016-09-08

(2016-09-08, 17:03)dmdsoftware Wrote: I'll work on improving the caching.

https://github.com/ddurdle/GDrive-for-KODI/issues/92

Thank you!


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

'Spredsheet name' should be 'Spreadsheet name' Smile
- What does this do, actually? Is it used as a DB for STRM information? If so, where is it stored?

Additionally, could you explain how library integration works? (I notice this has been a feature of your amazing plugin for awhile but I've never understood it). I had assumed it would update the library when a new export of STRM occurs, but never saw that happen.


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

(2016-09-09, 15:56)user321 Wrote: 'Spredsheet name' should be 'Spreadsheet name' Smile
- What does this do, actually? Is it used as a DB for STRM information? If so, where is it stored?

Additionally, could you explain how library integration works? (I notice this has been a feature of your amazing plugin for awhile but I've never understood it). I had assumed it would update the library when a new export of STRM occurs, but never saw that happen.

Some info around it here including how to set it up -> https://github.com/ddurdle/GDrive-for-KODI/wiki/CLOUD_DB---FAQ

It is a feature I'm actively working on. Right now it will keep track of resume and watch status (will allow resume for STRM files including those loaded from KODI library).

There are some other features like commands that let you specify special conditions when that media file is played (such as seeking to a certain point, prompting for video quality for that video, etc).

When enabled, when you watch video or play music files, the entries will appear in the spreadsheet.

When you generate STRM (save STRM), you'll notice a spreadsheet.tab file is created. This contents can be copied into the spreadsheet.

The spreadsheet will also be used to track tv and movie IDs so that you can associate this permanently. There is a field to paste a NFO into the appropriate column, which this information will be displayed when viewed in the plugin. Working on fanart and other images.

Automatic STRM generation is being tested since 0.8.06 but there are some issues. Eventually this automatic STRM will kick off KODI scan to update the library.


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

Thanks. I had a read of that link (step 2 doesn't seem to exist anymore ('Enable "Use library integration?"' -maybe it's on by default as I can't find the option).

I copied the spreadsheet and renamed it, changed the resume point to 'Google Drive Spreadsheet' but whenever I try and access the enrolled account I get an error. Kodi.log shows:

Error Contents: global name 'service' is not defined
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.gdrive-testing/default.py", line 293, in <module>
service = gdrive_api2.gdrive(PLUGIN_URL,addon,instanceName, user_agent, settings)
File "/storage/.kodi/addons/plugin.video.gdrive-testing/resources/lib/gdrive_api2.py", line 131, in __init__
if title == service.cloudSpreadsheet:#'CLOUD_DB':
NameError: global name 'service' is not defined
-->End of Python script error report<--
20:19:59 1856.868042 T:1963212800 ERROR: GetDirectory - Error getting plugin://plugin.video.gdrive-testing/?content_type&instance=gdrive1&mode=main
20:19:59 1856.869751 T:1963212800 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.gdrive-testing/?content_type&instance=gdrive1&mode=main) failed

Btw, I was sneaky, and just installed 0.8.11.zip (which I see you didn't publish in this thread) under LibreElec 7.0.2 (Jarvis 16.2)

---------------------------------------------------------

Oh and I think I found my own explanation of the library integration feature.

When browsing folders using the GDrive plugin, it will intelligently decipher whether it's movies or tv, and use the various scrapers to get fanart, and disc cover art etc. Would that be a correct assumption? I only ask because after I have navigated into Series Name>Season XX, to generate a season listing of episodes, and then navigate back out, there is cover art. Again if this is your plugin doing this magic, where is the artwork stored?

Or, maybe this is native Kodi function?

I think I prefer STRM files, being present in "TV Shows" and "Videos" (i.e. the native Kodi library), rather than browsing via the GDrive Plugin and it pulling down fanart.

Forgive me for my lack of understanding on all the new features you're adding, and thanks again.


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

(2016-09-13, 22:24)user321 Wrote: Thanks. I had a read of that link (step 2 doesn't seem to exist anymore ('Enable "Use library integration?"' -maybe it's on by default as I can't find the option).

I copied the spreadsheet and renamed it, changed the resume point to 'Google Drive Spreadsheet' but whenever I try and access the enrolled account I get an error. Kodi.log shows:

Error Contents: global name 'service' is not defined
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.gdrive-testing/default.py", line 293, in <module>
service = gdrive_api2.gdrive(PLUGIN_URL,addon,instanceName, user_agent, settings)
File "/storage/.kodi/addons/plugin.video.gdrive-testing/resources/lib/gdrive_api2.py", line 131, in __init__
if title == service.cloudSpreadsheet:#'CLOUD_DB':
NameError: global name 'service' is not defined
-->End of Python script error report<--
20:19:59 1856.868042 T:1963212800 ERROR: GetDirectory - Error getting plugin://plugin.video.gdrive-testing/?content_type&instance=gdrive1&mode=main
20:19:59 1856.869751 T:1963212800 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.gdrive-testing/?content_type&instance=gdrive1&mode=main) failed

Btw, I was sneaky, and just installed 0.8.11.zip (which I see you didn't publish in this thread) under LibreElec 7.0.2 (Jarvis 16.2)

---------------------------------------------------------

Oh and I think I found my own explanation of the library integration feature.

When browsing folders using the GDrive plugin, it will intelligently decipher whether it's movies or tv, and use the various scrapers to get fanart, and disc cover art etc. Would that be a correct assumption? I only ask because after I have navigated into Series Name>Season XX, to generate a season listing of episodes, and then navigate back out, there is cover art. Again if this is your plugin doing this magic, where is the artwork stored?

Or, maybe this is native Kodi function?

I think I prefer STRM files, being present in "TV Shows" and "Videos" (i.e. the native Kodi library), rather than browsing via the GDrive Plugin and it pulling down fanart.

Forgive me for my lack of understanding on all the new features you're adding, and thanks again.

The spreadsheet function is being moved to the account screen, but testing it currently.


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

Today I've been doing some manual stream export testing using two different setups.

Code:
Windows 10 running Kodi 16.1 and GDrive Plugin 0.8.06
-Export STRM to: C:\Users\Me\strm
  - Export TV to: C:\Users\Me\gdrive-tv
  - Export movies to: C:\Users\Me\gdrive-movies

LibreElec running Kodi 16.1 and GDrive Plugin 0.8.12
-Export STRM to: storage/strm
  - Export TV to: storage/gdrive-tv
  - Export movies to: storage/gdrive-movies


My Google Drive structure:
Code:
documentaries
     Series Name
        Season 01
           Series Name - SXXEXX - Episode Name.mkv

series (same as documentaries)
     Series Name
        Season 01
           Series Name - SXXEXX - Episode Name.mkv

movies01
  My Movie (2016)
     My.Movie.2016.720p.bluray-group.mkv
     My.Movie.2016.720p.bluray-group-trailer.mov
     My.Movie.2016.720p.bluray-group.En.srt
  Another Movie (2015)
     Another Movie (2015).mkv
     Another Movie (2015)-trailer.mp4
     Another Movie (2015).srt

movies02 (same as movies01)

When I manually export (example right click 'movies01' folder > export strm > 'yes confirm') it exports to two locations (because it detects movies01 contains movies):
  1. movies01 (nested folder structure, just like my google drive)
  2. gdrive-movies (flat structure with all .strm files in the same folder)

but gdrive-movies does not contain the same number of files, as movies01. Analysing this:

C:\Users\Me\strm
1523 folders (1 folder = 1 movie).
2220 .strm files

C:\Users\Me\gdrive-movies
1854 .strm files

Too much in gdrive-movies. Should be 1523 in a perfect world Smile

So what's in gdrive-movies that shouldn't be there? Examples:

Another Movie (2015)-trailer.mov.strm
Another Movie (2015)-trailer.mp4.strm
Another Movie (2015).srt.

These are not movies and I don't think they need to be copied to the 'movies' folder.

Searching for *-trailer.* returns only the .strm for trailers, but it's 587 files.

1854 - 587 = 1267 .strm files left. That's not correct. Now gdrive-movies would not contain enough .strm files.

So, then I went back to the 'movies01' export and I realised:
Movies in the format:
Movie.Name.Year.720p.SourceType-ReleaseGroup.ext

are not being copied to 'gdrive-movies' by the plugin.

Image


In recent years, I started to keep the original filename of the movie, rather than renaming it. So all my films will have a "clean" human readable folder name, but the movies will be a mix of clean readable names and the original scene release name.

I think I posted about this before, around page 40 something if I remember correctly and I think you fixed it (definitely you fixed the *.srt.strm extra files), but maybe it crept back in somehow?


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

(2016-09-16, 17:39)user321 Wrote: Today I've been doing some manual stream export testing using two different setups.

Code:
Windows 10 running Kodi 16.1 and GDrive Plugin 0.8.06
-Export STRM to: C:\Users\Me\strm
  - Export TV to: C:\Users\Me\gdrive-tv
  - Export movies to: C:\Users\Me\gdrive-movies

LibreElec running Kodi 16.1 and GDrive Plugin 0.8.12
-Export STRM to: storage/strm
  - Export TV to: storage/gdrive-tv
  - Export movies to: storage/gdrive-movies


My Google Drive structure:
Code:
documentaries
     Series Name
        Season 01
           Series Name - SXXEXX - Episode Name.mkv

series (same as documentaries)
     Series Name
        Season 01
           Series Name - SXXEXX - Episode Name.mkv

movies01
  My Movie (2016)
     My.Movie.2016.720p.bluray-group.mkv
     My.Movie.2016.720p.bluray-group-trailer.mov
     My.Movie.2016.720p.bluray-group.En.srt
  Another Movie (2015)
     Another Movie (2015).mkv
     Another Movie (2015)-trailer.mp4
     Another Movie (2015).srt

movies02 (same as movies01)

When I manually export (example right click 'movies01' folder > export strm > 'yes confirm') it exports to two locations (because it detects movies01 contains movies):
  1. movies01 (nested folder structure, just like my google drive)
  2. gdrive-movies (flat structure with all .strm files in the same folder)

but gdrive-movies does not contain the same number of files, as movies01. Analysing this:

C:\Users\Me\strm
1523 folders (1 folder = 1 movie).
2220 .strm files

C:\Users\Me\gdrive-movies
1854 .strm files

Too much in gdrive-movies. Should be 1523 in a perfect world Smile

So what's in gdrive-movies that shouldn't be there? Examples:

Another Movie (2015)-trailer.mov.strm
Another Movie (2015)-trailer.mp4.strm
Another Movie (2015).srt.

These are not movies and I don't think they need to be copied to the 'movies' folder.

Searching for *-trailer.* returns only the .strm for trailers, but it's 587 files.

1854 - 587 = 1267 .strm files left. That's not correct. Now gdrive-movies would not contain enough .strm files.

So, then I went back to the 'movies01' export and I realised:
Movies in the format:
Movie.Name.Year.720p.SourceType-ReleaseGroup.ext

are not being copied to 'gdrive-movies' by the plugin.

Image


In recent years, I started to keep the original filename of the movie, rather than renaming it. So all my films will have a "clean" human readable folder name, but the movies will be a mix of clean readable names and the original scene release name.

I think I posted about this before, around page 40 something if I remember correctly and I think you fixed it (definitely you fixed the *.srt.strm extra files), but maybe it crept back in somehow?

Movies need to have a (date) in them to be considered a movie.


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

Can this not be interpreted from the parent folder name? Maybe the logic could be something like..
If parent folder contains (date) -and subfolder doesn't contain series format, it's a movie?


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

(2016-09-16, 20:39)user321 Wrote: Can this not be interpreted from the parent folder name? Maybe the logic could be something like..
If parent folder contains (date) -and subfolder doesn't contain series format, it's a movie?

Only filenames are considered at this time. You want the folder path to be used?


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

(2016-09-16, 21:30)dmdsoftware Wrote:
(2016-09-16, 20:39)user321 Wrote: Can this not be interpreted from the parent folder name? Maybe the logic could be something like..
If parent folder contains (date) -and subfolder doesn't contain series format, it's a movie?

Only filenames are considered at this time. You want the folder path to be used?

Well, any method that would be able to identify the following variants as a movie:

When a user has renamed their movie:
Code:
Movie Name (YYYY).ext
(when a user has renamed their movie)

When a user has not renamed their movie, and left it according to 'Scene rules':
Code:
Movie.Name.YEAR.<720p/1080p>.BluRay.x264.-GROUP

If the current regex match is for (date), then how about:
Code:
$filename -match '\(\d{4}\)|\.\d{4}\.'

I believe this would match
(date)
or
.date.

Of course, if a user has not renamed their tv series, then it might also contain '.date.', but tv series will also match
Code:
S\d{1,2}E\d{1,2}

So
Code:
$filename -match '\(\d{4}\)|\.\d{4}\.' -and $filename -notmatch S\d{1,2}E\d{1,2}

it's a movie? Smile

also, excluding -trailer.ext and .srt files from having .strm files produced would be good. It will save Kodi scanning them (even though Kodi will ignore them).


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

(2016-09-17, 12:52)user321 Wrote:
(2016-09-16, 21:30)dmdsoftware Wrote:
(2016-09-16, 20:39)user321 Wrote: Can this not be interpreted from the parent folder name? Maybe the logic could be something like..
If parent folder contains (date) -and subfolder doesn't contain series format, it's a movie?

Only filenames are considered at this time. You want the folder path to be used?

Well, any method that would be able to identify the following variants as a movie:

When a user has renamed their movie:
Code:
Movie Name (YYYY).ext
(when a user has renamed their movie)

When a user has not renamed their movie, and left it according to 'Scene rules':
Code:
Movie.Name.YEAR.<720p/1080p>.BluRay.x264.-GROUP

If the current regex match is for (date), then how about:
Code:
$filename -match '\(\d{4}\)|\.\d{4}\.'

I believe this would match
(date)
or
.date.

Of course, if a user has not renamed their tv series, then it might also contain '.date.', but tv series will also match
Code:
S\d{1,2}E\d{1,2}

So
Code:
$filename -match '\(\d{4}\)|\.\d{4}\.' -and $filename -notmatch S\d{1,2}E\d{1,2}

it's a movie? Smile

also, excluding -trailer.ext and .srt files from having .strm files produced would be good. It will save Kodi scanning them (even though Kodi will ignore them).

Thank you for the request. They will be implemented. Any other scraping suggestions?


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

(2016-09-16, 17:39)user321 Wrote: Today I've been doing some manual stream export testing using two different setups.

Code:
Windows 10 running Kodi 16.1 and GDrive Plugin 0.8.06
-Export STRM to: C:\Users\Me\strm
  - Export TV to: C:\Users\Me\gdrive-tv
  - Export movies to: C:\Users\Me\gdrive-movies

LibreElec running Kodi 16.1 and GDrive Plugin 0.8.12
-Export STRM to: storage/strm
  - Export TV to: storage/gdrive-tv
  - Export movies to: storage/gdrive-movies


My Google Drive structure:
Code:
documentaries
     Series Name
        Season 01
           Series Name - SXXEXX - Episode Name.mkv

series (same as documentaries)
     Series Name
        Season 01
           Series Name - SXXEXX - Episode Name.mkv

movies01
  My Movie (2016)
     My.Movie.2016.720p.bluray-group.mkv
     My.Movie.2016.720p.bluray-group-trailer.mov
     My.Movie.2016.720p.bluray-group.En.srt
  Another Movie (2015)
     Another Movie (2015).mkv
     Another Movie (2015)-trailer.mp4
     Another Movie (2015).srt

movies02 (same as movies01)

When I manually export (example right click 'movies01' folder > export strm > 'yes confirm') it exports to two locations (because it detects movies01 contains movies):
  1. movies01 (nested folder structure, just like my google drive)
  2. gdrive-movies (flat structure with all .strm files in the same folder)

but gdrive-movies does not contain the same number of files, as movies01. Analysing this:

C:\Users\Me\strm
1523 folders (1 folder = 1 movie).
2220 .strm files

C:\Users\Me\gdrive-movies
1854 .strm files

Too much in gdrive-movies. Should be 1523 in a perfect world Smile

So what's in gdrive-movies that shouldn't be there? Examples:

Another Movie (2015)-trailer.mov.strm
Another Movie (2015)-trailer.mp4.strm
Another Movie (2015).srt.

These are not movies and I don't think they need to be copied to the 'movies' folder.

Searching for *-trailer.* returns only the .strm for trailers, but it's 587 files.

1854 - 587 = 1267 .strm files left. That's not correct. Now gdrive-movies would not contain enough .strm files.

So, then I went back to the 'movies01' export and I realised:
Movies in the format:
Movie.Name.Year.720p.SourceType-ReleaseGroup.ext

are not being copied to 'gdrive-movies' by the plugin.

Image


In recent years, I started to keep the original filename of the movie, rather than renaming it. So all my films will have a "clean" human readable folder name, but the movies will be a mix of clean readable names and the original scene release name.

I think I posted about this before, around page 40 something if I remember correctly and I think you fixed it (definitely you fixed the *.srt.strm extra files), but maybe it crept back in somehow?

I saw in your original post, one you deleted, that you mentioned video-others (etc). That means you tried out the automatic STRM creation. Any feedback on that? I'm thinking about removing the tv shows and movies folder options (more options create more confusion) and just replace it with the single location where I create a music, movies, tv, and video-other, as demonstrated when you use the automatic STRM. thoughts?


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

The end-goal for STRM (and in general cases, in the automatic STRM), would be that it would also export NFO files if user has then on their Google Drive (so non-standard media could be imported).

srt files should already be excluded (when I checked my directory, didn't find any that were generated:

durdle@carbonx1-ratbirt [] [0] ~/STRM/ $ find . | wc -l
45504
durdle@carbonx1-ratbirt [] [0] ~/STRM/ $ find . | grep srt


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

(2016-09-17, 12:52)user321 Wrote:
(2016-09-16, 21:30)dmdsoftware Wrote:
(2016-09-16, 20:39)user321 Wrote: Can this not be interpreted from the parent folder name? Maybe the logic could be something like..
If parent folder contains (date) -and subfolder doesn't contain series format, it's a movie?

Only filenames are considered at this time. You want the folder path to be used?

Well, any method that would be able to identify the following variants as a movie:

When a user has renamed their movie:
Code:
Movie Name (YYYY).ext
(when a user has renamed their movie)

When a user has not renamed their movie, and left it according to 'Scene rules':
Code:
Movie.Name.YEAR.<720p/1080p>.BluRay.x264.-GROUP

If the current regex match is for (date), then how about:
Code:
$filename -match '\(\d{4}\)|\.\d{4}\.'

I believe this would match
(date)
or
.date.

Of course, if a user has not renamed their tv series, then it might also contain '.date.', but tv series will also match
Code:
S\d{1,2}E\d{1,2}

So
Code:
$filename -match '\(\d{4}\)|\.\d{4}\.' -and $filename -notmatch S\d{1,2}E\d{1,2}

it's a movie? Smile

also, excluding -trailer.ext and .srt files from having .strm files produced would be good. It will save Kodi scanning them (even though Kodi will ignore them).


I pushed out a new release, 0.8.13 in testing that handles this. quick check revealed it was working:

./movies/Ender's_Game.2013.720p.avc1.mp4.strm
./movies/Land.of.the.Lost.2009.720p.BrRip.x264.YIFY.mp4.strm

BTW, found a major issue with automatic STRM (all generated STRM were bad). Fixed that.


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

That's fantastic - thanks.

With 0.8.06 on Windows I still get srt files. See:

Code:
PS C:\users\Me\gdrive-movies> Get-ChildItem -Filter '*srt*'

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       16/09/2016     16:07            142 Bellflower (2011).En.srt.strm
-a----       16/09/2016     16:07            139 Bellflower (2011).srt.strm
-a----       16/09/2016     16:06            135 Cracks (2009).srt.strm
-a----       16/09/2016     16:14            140 Powder Blue (2009).srt.strm
-a----       16/09/2016     16:13            144 Sixteen Candles (1984).srt.strm

but what's odd is that it's only a really small number. I have way more srt files than that. I haven't checked on LibreElec with 0.8.12 as I just find Linux much harder to use.

Anyway I just installed your testing repo, and it automatically updated the Gdrive plugin to 0.8.13. Manually deleted all downloaded .STRM files, and opened the plugin again. Straight away it said "building STRMs". I'll let it run and see how it goes, but two quick pieces of feedback:

1)
C:\Users\Me\strm\movies
---> SW_DVD5_Win_Pro_10_64BIT_English_MLF_X20-25557.ISO.strm

I guess it's detecting all ISOs as movies? Smile

2) I have a folder called 'Learning' with lots of video training in there. So now I have hundreds and hundreds of things like this:
C:\Users\Me\strm\movies\
---> 0101 What are vector graphics.mov.strm
---> 0102 Path and appearance.mov.strm

which of course are not movies either. Perhaps we can set a list of folders to exclude from automatic stream creation?