Subtitles downloading in temp folder
#16
(2019-07-05, 08:27)Klojum Wrote:
(2019-07-05, 06:59)sle70000 Wrote: Hope this helps.

Yes and no. I'm still confused where the subtitles come from. Are they downloaded automatically (auto-download?), or does it also happen when selecting/downloading them manually via the subtitle OSD?
As the log file from the other users are no longer available, kindly provide a debug-enabled kodi.log file where this all happens, and perhaps we see a hint of why subs are stored in the temp folder. 
Hi,
It doesn't matter how the subtitle is downloaded(manually or auto) as long as the "Play next video automatically" is enabled or you are using the context menu and "Play from here option".
Reply
#17
Here are log files for six scenarios. Only two are downloading the subtitle in the movie folder.

downloaded next to the movie -- https://paste.kodi.tv/awopekulog.kodi --autosubs addon enabled,  automatically download first subtitle enabled,  Play next video automatically disabled, navigate on episode and play
downloaded next to the movie -- https://paste.kodi.tv/osuzaxonod.kodi --autosubs addon disabled, automatically download first subtitle disabled, Play next video automatically disabled, navigate on episode and play, subtitle menu, download subtitle

downloaded to temp ------------ https://paste.kodi.tv/xatowezawo.kodi --autosubs addon enabled,  automatically download first subtitle enabled,  Play next video automatically enabled,  navigate on episode and play
downloaded to temp ------------ https://paste.kodi.tv/ahazuvoref.kodi --autosubs addon disabled, automatically download first subtitle disabled, Play next video automatically enabled,  navigate on episode and play, subtitle menu, download subtitle
downloaded to temp ------------ https://paste.kodi.tv/deravutebu.kodi --autosubs addon enabled,  automatically download first subtitle enabled,  Play next video automatically disabled, navigate on episode and context menu play from here
downloaded to temp ------------ https://paste.kodi.tv/fexicesixa.kodi --autosubs addon disabled, automatically download first subtitle disabled, Play next video automatically disabled, navigate on episode and context menu play from here, subtitle menu, download subtitle
Reply
#18
Just picking out one of them:

Code:
2019-07-05 20:40:57.709 T:3584 DEBUG: ### [BSPlayer.params] - Current Action: download.
2019-07-05 20:40:57.827 T:3584 DEBUG: ### [BSPlayer.download_subtitles] - Subtitles Download Successfully From: http://download2.bsplayer-subtitles.com/...050a061b5f.
2019-07-05 20:40:57.827 T:3584 DEBUG: ### [BSPlayer.download] - Downloaded Subtitle Path: C:\Users\sile\AppData\Roaming\Kodi\userdata\addon_data\service.subtitles.bsplayer\temp\Last Man Standing - 07x16 - Urban Exploring.Web-TBS.English.HI.C.orig.Addic7ed.com.srt
2019-07-05 20:40:57.827 T:3584 INFO: CPythonInvoker(2, C:\Users\sile\AppData\Roaming\Kodi\addons\service.subtitles.bsplayer\service.py): script successfully run
2019-07-05 20:40:57.827 T:3584 DEBUG: CPythonInvoker::onExecutionDone(2, C:\Users\sile\AppData\Roaming\Kodi\addons\service.subtitles.bsplayer\service.py)
2019-07-05 20:40:57.842 T:3584 INFO: Python interpreter stopped
2019-07-05 20:40:57.842 T:3584 DEBUG: Thread LanguageInvoker 3584 terminating
2019-07-05 20:40:57.843 T:9756 DEBUG: CGUIDialogSubtitles::OnDownloadComplete - Saved subtitle C:\Users\sile\AppData\Roaming\Kodi\userdata\addon_data\service.subtitles.bsplayer\temp\Last Man Standing - 07x16 - Urban Exploring.Web-TBS.English.HI.C.orig.Addic7ed.com.srt to special://temp/3409.en.srt
2019-07-05 20:40:57.848 T:6540 DEBUG: CUtil::GetExternalStreamDetailsFromFilename - Language = 'eng' / Name = '3409 (External)' / Flag = '0' from special://temp/3409.en.srt

It looks like bsplayer is getting pretty confused:
DEBUG: ### [BSPlayer.download] - Downloaded Subtitle Path: C:\Users\sile\AppData\Roaming\Kodi\userdata\addon_data\service.subtitles.bsplayer\temp\Last Man Standing - 07x16 - Urban Exploring.Web-TBS.English.HI.C.orig.Addic7ed.com.srt
Where does this path come from in the first place?
Reply
#19
I don't know but that path is also used on the examples that are working(https://paste.kodi.tv/awopekulog.kodi , https://paste.kodi.tv/osuzaxonod.kodi)
However I've coppied the files loccaly, I've useed kodi db instead of MYSQL and I've also changed the subtitle addon to Opensubtitle and the subtitle is still copied to Temp folder.(https://paste.kodi.tv/fanivacuyi.kodi)
So is not a subtitle addon issue.
Is not a network path issue.
Is not a MYSQL db issue.

What I've could notticed from diffrent logs is that if the "Play from here" or "Play next video automatically" is used the player is served with the media library link:
2019-07-05 20:11:33.539 T:11164  NOTICE: VideoPlayer::OpenFile: videodb://tvshows/titles/5/7/3409?season=7&tvshowid=5

But when the files are played one by one the absolute path to the file is sent to the player:
2019-07-05 19:55:50.229 T:2984  NOTICE: VideoPlayer::OpenFile: nfs://192.168.10.10/export/2TBSG/Media Library/TVShows/Last.Man.Standing/Season 07/Last.Man.Standing.US.S07E15.720p.WEB.x264-TBS/last.man.standing.us.s07e15.720p.web.x264-tbs.mkv

Maybe that's the issue.
Reply
#20
It looks like is a known issue here https://github.com/xbmc/xbmc/pull/12311 but it doesn't seems to be a solution yet.
Anyway I've modifyed the opensubtitles addon and now it downloads the subtitle both in the temp dir and movie dir.
Is an ugly hack but maybe someone with python knowlege and programing skils may manage to pull something of it.
For those who want to try it anyway here's the link: https://github.com/sile70000/service.sub...nsubtitles
Reply
#21
Hi SLE70000 nice find and change in the subtitle addon but, unfortunately for me it doesn't work, for the simplest reason (i presume) - in my case, subtitle is being downloaded into temp folder under some number, not show name, so your script changes cannot find the file to copy it to TV show/Movie folder. Excerpt from log

22:08:13.978 T:868   DEBUG: CGUIDialogSubtitles::OnDownloadComplete - Saved subtitle C:\Users\Bruno\AppData\Roaming\Kodi\userdata\addon_data\service.subtitles.opensubtitles\temp\9fd5b22e-3320-40c2-8534-1dbbe5638d97.srt to special://temp/9159.en.srt
22:08:13.981 T:5884   DEBUG: CUtil::GetExternalStreamDetailsFromFilename - Language = 'eng' / Name = '9159 (External)' / Flag = '0' from special://temp/9159.en.srt

I don't know if this is the default behavior of Kodi (downloading subs into temp folder under some "codename") and unfortunately I do not python enough to take codenamed file, rename it and copy it to tV show/Movie folder.

Regards
Reply
#22
(2019-08-07, 12:34)bothari Wrote: Hi SLE70000 nice find and change in the subtitle addon but, unfortunately for me it doesn't work, for the simplest reason (i presume) - in my case, subtitle is being downloaded into temp folder under some number, not show name, so your script changes cannot find the file to copy it to TV show/Movie folder. Excerpt from log

22:08:13.978 T:868   DEBUG: CGUIDialogSubtitles::OnDownloadComplete - Saved subtitle C:\Users\Bruno\AppData\Roaming\Kodi\userdata\addon_data\service.subtitles.opensubtitles\temp\9fd5b22e-3320-40c2-8534-1dbbe5638d97.srt to special://temp/9159.en.srt
22:08:13.981 T:5884   DEBUG: CUtil::GetExternalStreamDetailsFromFilename - Language = 'eng' / Name = '9159 (External)' / Flag = '0' from special://temp/9159.en.srt

I don't know if this is the default behavior of Kodi (downloading subs into temp folder under some "codename") and unfortunately I do not python enough to take codenamed file, rename it and copy it to tV show/Movie folder.

Regards

Hi,
Actually the operation is not logged but what it does is parallel copy the file to movie folder so it should be available for next time when you play the movie.
For the current playing session Kodi will still use the temp file but check the movie folder for the subtitle file. It should be there for further use.
The decision for downloading path is taken in CGUIDialogSubtitles which is hard coded - compiled into Kodi- and it cannot be modified.
So instead we let Kodi do its business and we  parallel copy the file to movie folder.
Reply
#23
(2019-08-29, 05:29)sle70000 Wrote:
(2019-08-07, 12:34)bothari Wrote: Hi SLE70000 nice find and change in the subtitle addon but, unfortunately for me it doesn't work, for the simplest reason (i presume) - in my case, subtitle is being downloaded into temp folder under some number, not show name, so your script changes cannot find the file to copy it to TV show/Movie folder. Excerpt from log

22:08:13.978 T:868   DEBUG: CGUIDialogSubtitles::OnDownloadComplete - Saved subtitle C:\Users\Bruno\AppData\Roaming\Kodi\userdata\addon_data\service.subtitles.opensubtitles\temp\9fd5b22e-3320-40c2-8534-1dbbe5638d97.srt to special://temp/9159.en.srt
22:08:13.981 T:5884   DEBUG: CUtil::GetExternalStreamDetailsFromFilename - Language = 'eng' / Name = '9159 (External)' / Flag = '0' from special://temp/9159.en.srt

I don't know if this is the default behavior of Kodi (downloading subs into temp folder under some "codename") and unfortunately I do not python enough to take codenamed file, rename it and copy it to tV show/Movie folder.

Regards

Hi,
Actually the operation is not logged but what it does is parallel copy the file to movie folder so it should be available for next time when you play the movie.
For the current playing session Kodi will still use the temp file but check the movie folder for the subtitle file. It should be there for further use.
The decision for downloading path is taken in CGUIDialogSubtitles which is hard coded - compiled into Kodi- and it cannot be modified.
So instead we let Kodi do its business and we  parallel copy the file to movie folder. 
I've just added a line in the addon for logging the operation.
Reply
#24
Hi, 

just to let you know that I found the culprit for subtitles not downloading to media folder - it was Windos 10 Ransomware protection -> Controlled folder access feature! Although I marked kodi.exe as safe program still it regarded it as a threat. M$ ftw !
Reply
#25
(2019-09-19, 21:57)bothari Wrote: Hi, 

just to let you know that I found the culprit for subtitles not downloading to media folder - it was Windos 10 Ransomware protection -> Controlled folder access feature! Although I marked kodi.exe as safe program still it regarded it as a threat. M$ ftw !

I've got this problem on Win7. Not sure but I think it started after last install of Kodi update (18.5 2019-11-16).
Reply
#26
(2019-07-07, 09:32)sle70000 Wrote: I don't know but that path is also used on the examples that are working(https://paste.kodi.tv/awopekulog.kodi , https://paste.kodi.tv/osuzaxonod.kodi)
However I've coppied the files loccaly, I've useed kodi db instead of MYSQL and I've also changed the subtitle addon to Opensubtitle and the subtitle is still copied to Temp folder.(https://paste.kodi.tv/fanivacuyi.kodi)
So is not a subtitle addon issue.
Is not a network path issue.
Is not a MYSQL db issue.

What I've could notticed from diffrent logs is that if the "Play from here" or "Play next video automatically" is used the player is served with the media library link:
2019-07-05 20:11:33.539 T:11164  NOTICE: VideoPlayer::OpenFile: videodb://tvshows/titles/5/7/3409?season=7&tvshowid=5

But when the files are played one by one the absolute path to the file is sent to the player:
2019-07-05 19:55:50.229 T:2984  NOTICE: VideoPlayer::OpenFile: nfs://192.168.10.10/export/2TBSG/Media Library/TVShows/Last.Man.Standing/Season 07/Last.Man.Standing.US.S07E15.720p.WEB.x264-TBS/last.man.standing.us.s07e15.720p.web.x264-tbs.mkv

Maybe that's the issue.

I am facing the exact same issue on my Kodi 18.5.
was there any progress with this bug?

I can't edit every subtitle provider I use - I have 6 of them and they are continuously updating..
Reply
#27
(2020-02-29, 15:20)shmizan Wrote:
(2019-07-07, 09:32)sle70000 Wrote: I don't know but that path is also used on the examples that are working(https://paste.kodi.tv/awopekulog.kodi , https://paste.kodi.tv/osuzaxonod.kodi)
However I've coppied the files loccaly, I've useed kodi db instead of MYSQL and I've also changed the subtitle addon to Opensubtitle and the subtitle is still copied to Temp folder.(https://paste.kodi.tv/fanivacuyi.kodi)
So is not a subtitle addon issue.
Is not a network path issue.
Is not a MYSQL db issue.

What I've could notticed from diffrent logs is that if the "Play from here" or "Play next video automatically" is used the player is served with the media library link:
2019-07-05 20:11:33.539 T:11164  NOTICE: VideoPlayer::OpenFile: videodb://tvshows/titles/5/7/3409?season=7&tvshowid=5

But when the files are played one by one the absolute path to the file is sent to the player:
2019-07-05 19:55:50.229 T:2984  NOTICE: VideoPlayer::OpenFile: nfs://192.168.10.10/export/2TBSG/Media Library/TVShows/Last.Man.Standing/Season 07/Last.Man.Standing.US.S07E15.720p.WEB.x264-TBS/last.man.standing.us.s07e15.720p.web.x264-tbs.mkv

Maybe that's the issue.

I am facing the exact same issue on my Kodi 18.5.
was there any progress with this bug?

I can't edit every subtitle provider I use - I have 6 of them and they are continuously updating.. 
Nobody seems to care about this bug. 
So...
I only use two and actually they are unchanged from quite some time. So I've changed them. Here is the second one if anybody want it.
https://github.com/sile70000/service.subtitles.bsplayer
Reply
#28
(2020-03-22, 12:25)sle70000 Wrote: Nobody seems to care about this bug. 

Sure, that would be it. IMHO, if this was truly a Kodi problem, at least half of all Windows users would be kicking and screaming here, probably some of the other OS users as well. But that is not the case. Here we have not even a handful cases where properly storing subtitles is a problem. So it's either a write permission issue, outside interference or divine intervention. So far we haven't been able to replicate the problem.
Reply
#29
(2020-03-22, 14:07)Klojum Wrote:
(2020-03-22, 12:25)sle70000 Wrote: Nobody seems to care about this bug. 

Sure, that would be it. IMHO, if this was truly a Kodi problem, at half of all Windows users would be kicking and screaming here, probably some of the other OS users as well. But that is not the case. Here we have not even a handful cases where properly storing subtitles is a problem. So it's either a write permission issue, outside interference or divine intervention. So far we haven't been able to replicate the problem. 
will someone look into it, if I post logs?
"Play next video automatically" is a fairly overlooked feature, so I am not sure about the screaming and kicking part..
it's not permission issue, since it saves next to the files perfectly fine if I turn it off.
Reply
#30
(2020-03-23, 13:20)shmizan Wrote:
(2020-03-22, 14:07)Klojum Wrote:
(2020-03-22, 12:25)sle70000 Wrote: Nobody seems to care about this bug. 

Sure, that would be it. IMHO, if this was truly a Kodi problem, at half of all Windows users would be kicking and screaming here, probably some of the other OS users as well. But that is not the case. Here we have not even a handful cases where properly storing subtitles is a problem. So it's either a write permission issue, outside interference or divine intervention. So far we haven't been able to replicate the problem. 
will someone look into it, if I post logs?
"Play next video automatically" is a fairly overlooked feature, so I am not sure about the screaming and kicking part..
it's not permission issue, since it saves next to the files perfectly fine if I turn it off.

It's actually a relative path 'issue' . Play next sends relative path to player and therefore can't search for subtitles as there is no title to search with. This is not a Kodi problem but an addon issue. The addons cannot translate the relative path to a title and therefore won't work. Kodi needs to use relative path in order to be able to create a playlist. Unfortunately it's not the answer you were looking for but it's an answer nonetheless.
Kodi Matrix 19.0 HDR Windows API
Reply

Logout Mark Read Team Forum Stats Members Help
Subtitles downloading in temp folder3