jmos1277 9 Posted November 25, 2018 Posted November 25, 2018 I'm updated metadata for some of my television shows and found some inconsistent behavior. Episode images are sometimes (but rarely) saved in the "Season" folder that contains the episode file. When they are saved in the "Season" folder they have the expected filename format "episode-name-thumb.jpg" Most of the time, however, the images are not written to my library, but instead written to the emby directory: "/config/metadata/library/.../poster.jpg". Note that the filename is "poster.jpg" here. I want ALL of the episode images to save into the "Season" folder. I have enabled: "Save artwork into media folders" for my "TV Show" library. I'm running the Linux docker image on unRAID. In both cases, this is what I did: - use metadata manager - select a tv show episode - from the "..." menu, select "edit images" - delete the old episode image (if one exists) - download a new image using the magnifying glass (i.e. search) icon Anyone have any idea why the inconsistent behavior? I've attached several files: - system.xml file - Log.txt * relevant timestamps: "2018-11-25 01:00:45.509" - image is saved to emby directory "2018-11-25 01:05:46.713" - image is saved into "Season" folder system.xml Log.txt
Luke 42090 Posted November 25, 2018 Posted November 25, 2018 Hi, have you checked your settings for that emby library to ensure that saving artwork to local media folders is enabled?
jmos1277 9 Posted November 25, 2018 Author Posted November 25, 2018 Hi, have you checked your settings for that emby library to ensure that saving artwork to local media folders is enabled? I did ... I've attached an image below to ensure that we're talking about the same setting. What I find strange is that I get two different behaviors! Even within a tv series, sometimes a season will save episode images in the "Season" folder and other times a seasons will save episode images in the Emby data directory. I have noticed that it seems to operate at a seasonal granularity. Either all episodes in the season save episode images in the "Season" folder or none of them do.
Luke 42090 Posted November 25, 2018 Posted November 25, 2018 What's probably happening is that the save to your local folder is failing, and then we automatically fall back to the local data directory. The failure is almost always related to permissions, e.g. Emby Server being denied write access to the folder. I stopped printing the error to the server log because troubleshooting was becoming painful, with users seeing permissions-related failures and then thinking it was an Emby problem. The vast majority of the time that is the reason. A disk space related failure could also cause it.
jmos1277 9 Posted November 26, 2018 Author Posted November 26, 2018 (edited) What's probably happening is that the save to your local folder is failing, and then we automatically fall back to the local data directory. The failure is almost always related to permissions, e.g. Emby Server being denied write access to the folder. I stopped printing the error to the server log because troubleshooting was becoming painful, with users seeing permissions-related failures and then thinking it was an Emby problem. The vast majority of the time that is the reason. A disk space related failure could also cause it. Luke, I checked and re-checked the permissions and my disk space. - I have many hundreds of gigabytes of free space, so no problem there. - My permissions are set appropriately. All of my television shows are stored on the same disk and have the same folder permissions at both the series level and the season level. So, I don't think it is a permission issue either. Remember, that saving into the media folder seems to work for some series, but not all series. It also seems to work for some seasons within a series, but not all seasons with that same series. I started digging through the server code to see if there is any way I can get more information about what might be causing the problem. I assume the file of interest is Emby/MediaBrowser.Providers/Manager/ImageSaver.cs. It looks like the 'SaveImage' method is the method that determines a 'path' and a 'retrypath'. I also see that the 'SaveImageToLocation' method should report either an 'UnauthorizedAccessException' or an 'IOException' if there are permission or disk space issues. My log file does not show either of those errors. Is there an easy way I can get more visibility into the 'SaveImage' and 'SaveImageToLocation' methods without having to setup a complete build environment, build, and deploy? Or, maybe you have another idea that I can investigate? Edited November 26, 2018 by jmos1277
Luke 42090 Posted November 26, 2018 Posted November 26, 2018 If you setup a new series for testing and then try with that, what happens?
jmos1277 9 Posted November 28, 2018 Author Posted November 28, 2018 I didn't have any new series to set up, so I did the following: 1) Removed ALL of my tv series from my TV_Shows library by simply moving them to a different folder on my disk. 2) Rescanned the library to 'reset' the tv show database 3) Deleted ALL of the metadata from one series: *.jpg, *.png, *.nfo, etc. (kept tvshow.nfo for convenience) 4) Moved that one series back into my TV_Shows library 5) Rescanned the library with the one series All metadata was correctly replaced on the first scan. Episode images were saved in the media folder as expected with the '-thumb.jpg' extension. I'm still not sure what happened and why the failure occurred in the first place. However, removing a tv series from the database and then re-adding it seemed to resolve the issue. I have since deleted ALL existing metadata from the remaining tv series and moved them back into my TV_Shows library. They are all scanning properly. I guess my database got into some sort of funky state. I would have liked to see what was happening in the 'SaveImage' method to better understand the root of the problem. But, for now, I guess I'll just cross my fingers and hope it continues working.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now