Jump to content

Subtitles - How to save only subtitles to the media folder


ulrick65
Go to solution Solved by Luke,

Recommended Posts

ulrick65

First off, as always...thanks for this awesome piece of software...it is fantastic and works perfectly for me!

 

On to the question:  I maintain my own metadata, so I don't have Emby do it automatically.  I enabled subtitles and when I manually go in and pick a subtitle for an episode, it downloads it...but it downloads it to the metadata folder, not into the folder with the media file.  I think I know why, because in that library I have "Save artwork into media folders" unchecked.  I did this because I don't want Emby to mess with the artwork, etc. in the folder.

 

First off, I assume that when it downloads the subtitles to the metadata folder, they are only available to the web version of emby and not to my install of KODI (which has the Emby plugin working fine).  Is that true?

 

Is there a way to just have Emby download subtitles without turning this on?  Or if I do turn it on, how do I set things up so Emby only downloads the subtitles there and nothing else?  Ideally, I would love to have it do it automatically (just subtitles mind you) since I am now quite hearing impaired and would like to have subtitles for places where I dont have them already (embeded in the MKV for example).

 

Thanks for any input on how to make this work.

Link to comment
Share on other sites

Happy2Play

Did you enable "Save subtitles into media folders"?  per library-enable advanced settings the option is near the bottom

Link to comment
Share on other sites

ulrick65

Did you enable "Save subtitles into media folders"?  per library-enable advanced settings the option is near the bottom

 

Yes, that is checked.

Link to comment
Share on other sites

Yes, that is checked.

 

So that means going forward, any new subtitles that are downloaded will be downloaded to your media folders. Does this answer your question?

Link to comment
Share on other sites

ulrick65

So that means going forward, any new subtitles that are downloaded will be downloaded to your media folders. Does this answer your question?

 

No, not really.  That is currently checked and has been checked, but when I go in and download a subtitle...it puts it in the Metadata folder instead. 

 

I did figure out that they are then passed along to Kodi and work with the episode (I did not realize that before, until I asked the question above and decided to try it...and low and behold, it works) however, I would really prefer they get stored in the media folder itself.

Link to comment
Share on other sites

 

 

That is currently checked and has been checked, but when I go in and download a subtitle...it puts it in the Metadata folder instead. 

 

If the server doesn't have write access to your media folder, then it will automatically revert to saving in the metadata folder. So you'll need to make sure of that. if you can provide a server log example, we can verify that is what happened. Thanks.

Link to comment
Share on other sites

ulrick65

I see what it happening.  I checked the log and it shows that it downloads it to both places...which I thought was odd.  I then figured out (something I forgot, tough to get old!) Emby does not have Write access to the media folder.

 

Is it normal that it saves it in both places or is it just saving it to the Metadata since it knows it could not save it to the media folder (even though it did not throw and error or put anything in the log about having trouble writing there).

 

Here's the log entries:

 

2019-10-15 16:39:29.628 Info HttpClient: POST https://api.opensubtitles.org/xml-rpc
2019-10-15 16:39:29.853 Info SubtitleManager: Saving subtitles to /mnt/DS1512/TV/Killjoys/Season 04/Killjoys - S04E09 - The Kids Are Alright.en.srt
2019-10-15 16:39:29.854 Info SubtitleManager: Saving subtitles to /var/lib/emby/metadata/library/ba/ba257992792d7c561ad25f004f49256a/Killjoys - S04E09 - The Kids Are Alright.en.srt

Looks like I answered the question, not sure if perhaps it is worth doing something to at least note that it tried to write there and couldn't?  I leave that up to you good folks!

 

One last thing if I could:

 

If I give Emby write access to be able to put the subtitle there, are there are other things that it might do in the folders that I am currently unaware that it would if it had write access?  I currently have the following settings in all my media library settings:

 

automatically refresh metadata from internet:  Never

Metadata savers:  None checked

Save artwork into media folders:  Not checked

Download images in advance:  Not checked

Save subtitles into media folders:  Checked

 

Thanks for the feedback and help, I appreciate it.

 

 

 

Link to comment
Share on other sites

Happy2Play

I can not reproduce with those exact settings you listed above.  But the only reason to fallback to /metadata/library is permissions.  May need to enable debug logging. then restart your server to start that level of logging and repeat your test.

 

Changing logging level requires a restart to apply the change.

Link to comment
Share on other sites

Then yes based on your log above, it is permissions. The server does not have write access to the folder. It tries to save to the first path, which fails, then it moves onto the fallback option.

 

I removed the error trace from the log some time ago, I think I had just had enough of users seeing the error in the log and telling us there was something wrong with our software, when it was just a matter of write access. But i can add some kind of logging statement back in.

Link to comment
Share on other sites

ulrick65

Thanks to both of you for the help.

 

In order to give it write ability, I have to change the path (its an NFS share between Linux boxes and a Synology NAS...so I cant just give it write access)....which if memory serves me right, means a complete rebuild of the library.  I did this once before and if I remember right, it was not a lot of fun as I then had to rebuild the local KODI databases as well....but I guess we will see how it goes.

 

I am hoping with the settings I posted above, that Emby will not be writing anything else to the media folders other than the subtitles...correct?

 

Thanks.

Link to comment
Share on other sites

Happy2Play

 

I am hoping with the settings I posted above, that Emby will not be writing anything else to the media folders other than the subtitles...correct?

 

 

Correct

 

You can always setup a test folder/library and work with one series in that folder.

Link to comment
Share on other sites

  • 1 month later...
ulrick65

Some more issues with subtitles related to this topic, so I thought I would post here with the new problem:

 

Emby is saving subtitles to the Library folder and has been since I set it up a month ago in October.

 

The problem now is that everytime it downloads a subtitle and puts it in the Library, on the next scan of the library (and all subsequent scans) it thinks that the media item has changed (both TV and Movies do this) and it rescans the media.  In some cases it redownloads the subtitle and in other cases it doesn't (I have not quite figured out what the difference is).

 

I noticed this because everytime the libraries are scanned (every 12 hours or if I manually force on after adding content) Emby is telling Emby for Kodi that there are thousands of updates...and this has been getting worse (the more subtitles it downloads).

 

I have done substantial testing on one library with roughly 600 movies in it.  I have attached some pertinent snippets from the log file. 

 

The first three scans are when I had "Save Subtitles to Media Folder" enabled...as you can see, it can't save them there as it does not have permission (which we discussed above...I just never went back and disabled the option).  It does save the file in the Library folder though, I have confirmed that in every case I find the file and the date changes accordingly.

 

I turned off "Save Subtitles to Media Folder" and that is the next 3 scans, with the last being done with DEBUG log turned on. 

 

You can see it is still rescanning the media and redownloading the subtitle (in this case anyway, in many other cases...it does not redownload the subtitle...but it does give the "Refreshing /path/to/file due to external subtitles change."

 

As I said, there are a little over 600 movies in this library, but everytime I scan it, it refreshed 263 of them and does exactly the same thing over and over again.  Each time of course, my Kodi boxes get the command to update 263 items on each one.

 

I have tried turning of all the subtitle providers for the library to see if that would stop the refresh and it does not, it still triggers a refresh on all the same files but of course does not attempt to download the subtitles again on the ones that it does that on.

 

Any help would be greatly appreciated.  I originally thought this was a Emby fo Kodi issue, so I spent a boatload of time resetting my local databases, etc. before I figured out what was happening here.

 

Thanks.

 

Emby Subtitle Searchs.txt

Link to comment
Share on other sites

ulrick65

Hi, currently this is normal, although redownloading is not. Can we look at an example of that? Thanks.

 

It's normal that it will touch all of the media that it already downloaded the file for every single time the media scan runs?  Can you explain that a little bit?  It never did this before I turned on Subtitles...and I have now turned them off and it still does it?  Is there a way to fix this?  It is a huge pain to have to have a library update make all my KODI installs update 4,000 records (which is what it is now through all my libraries).  I have a few different libraries based on where the media resides, most of them never change...so if I can turn it off on ones I don't want it to scan and just scan the two that do get new media in them daily, I would do that.

 

The file attached above is a log of the redownloading.  You can see in the logs that I included that it redownloads the same file every time the Library Scan runs.  The filename is:

 

At the Earth's Core (1976)/At the Earth's Core (1976).en.sub

 

Thanks.

Link to comment
Share on other sites

 

 

It's normal that it will touch all of the media that it already downloaded the file for every single time the media scan runs?

 

When the list of external subtitles for a video changes, the video will be re-probed, re-saved to the database, and this will trigger an event that will notify any listeners such as the kodi addon. So that is all normal.

Link to comment
Share on other sites

ulrick65

When the list of external subtitles for a video changes, the video will be re-probed, re-saved to the database, and this will trigger an event that will notify any listeners such as the kodi addon. So that is all normal.

 

I get that, but in this case nothing is changing.  The srt file is downloaded and sitting in the folder in the library.  In a few cases (like the one I gave you above) it redownloads the same file...but in the majority of the cases, it doesn't do anything.  When the media scan runs, it says "Refreshing /path/to/file due to external subtitles change." but it doesn't do anything, it just causes the video to be re-probed and resaved to the database...but obviously it is not updating something properly, because the next scan does exactly the same thing on exactly the same files... there was no need to do that, the file already existed there for the last 50 scans (in some cases) or at least the last several scans (for thousands of them).

Link to comment
Share on other sites

ulrick65

 

Sounds like my issue... I am running 4.2.1.0 stable release, everything is up to date.  I assume the fix is not in the stable version yet then?  I have never run a beta version, but I am not opposed to it if it will fix this issues sooner.  Any idea when the fix will reach stable?

 

Thanks.

Link to comment
Share on other sites

ulrick65

 

 

@@Luke I am not sure how to find out what things are in beta and when they might make it to Stable.  Can you tell me if this fix will be in Stable in short order (like days) or am I looking at weeks or ?  If it's long, can you just tell me what version of Beta I should install to ensure the fix is in there?

 

Thanks.

Link to comment
Share on other sites

ulrick65

Have you explored your server dashboard?

 

 

Yes, look at it everyday lately.  Says I am on version 4.2.1.0 with a green check and "Emby Server is Up To Date".  What am I supposed to see?

Link to comment
Share on other sites

Well you said you didn't know how to tell what changes were in what releases. Have you explored clicking the version number?

Link to comment
Share on other sites

ulrick65

Well you said you didn't know how to tell what changes were in what releases. Have you explored clicking the version number?

 

Nope, I didn't know that was "clickable".  Cool.  Doesn't tell me when to expect 4.3.0.26 to release as stable...but it does show there if I click the drop down.  I am not sure if that means it out now, or just expected to be out...since it tells me I am "up to date" I assumed I was.  I will see about upgrading I guess.  

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...