cguZZman / plugin.googledrive

The Google Drive addon for Kodi
GNU General Public License v3.0
212 stars 72 forks source link

Local subtitle support #247

Closed Ariette closed 3 years ago

Ariette commented 3 years ago

I tried to use private subtitles(in subtitle folder of kodi, which is at the local drive) with google drive plugin, but always failed to load them automatically. If I want to display a local subtitle, then I have to browse the one manually. Finally, I found that kodi doesn't try to scan external subtitles when using google drive plugin, whether I use .strm files or not.

log for local video

NOTICE: Creating InputStream
DEBUG: Thread BackgroundLoader 12088 terminating
DEBUG: CUtil::ScanForExternalSubtitles: Searching for subtitles...
DEBUG: Loading settings for \file\path\here.mkv
DEBUG: CUtil::ScanForExternalSubtitles: END (total time: 19 ms)
NOTICE: Creating Demuxer
.
.
.

log for gd video

NOTICE: Creating InputStream
DEBUG: CurlFile::ParseAndCorrectUrl() adding custom header option 'Authorization: ***********'
DEBUG: CurlFile::Open(0xf24645e650) https://www.googleapis.com/drive/v3/files/***
DEBUG: Loading settings for \file\path\here.mkv.strm
DEBUG: CPlayerGUIInfo::InitCurrentItem(\file\path\here.mkv.strm)
DEBUG: [plugin.googledrive][MainThread-1564]: playback started: https://www.googleapis.com/drive/v3/files/***
.
.
.

Can you add 'Automatically set subtitles from local drive' option just like the cloud one? Thank you!

cguZZman commented 3 years ago

The addon has no way to know if the play started from an strm file, nor the path or any other local information. Only the url inside of the file will be passed to the addon. Your subtitle can be in your cloud drive also. That way it can be assigned automatically.