Update Media Sources using API - Specifically removing invalid sources where the File path is invalid. #12387
Replies: 2 comments 2 replies
-
|
While I would like a better way to manage this from the API. I did find the reason my collections would not self clean. It had to do with this plugin : github.com/danieladov/jellyfin-plugin-mergeversions . I am going to dig into the source code and see if I can find a way for this to better manage itself or at least play friendly. I separated all the collections and then reran the clean feature. now things are back to normal. |
Beta Was this translation helpful? Give feedback.
-
|
After fooling around with this much longer than I should have. I finally just connected to the library.db and ran a delete on the "TypedBaseItems" where the path matched my old folders. This cleaned things up for the most part. I am sure we have some orphaned records, but I will look into that when I have more time. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Before anyone says The Tasks will do it. understand that they do not in my case. I have many Media Sources that point to missing files and all cleanup tasks have run.
I am trying to update the Media Sources for an Item specifically to remove invalid entries.
looking at the Controller : https://github.com/jellyfin/jellyfin/blob/a82527dcdff2082131904c41ce0cda66ed8a69d2/Jellyfin.Api/Controllers/ItemUpdateController.cs
It appears that the MediaSources are not updated. And seem to be ignored in this call. Does anyone know how to update the media items ?
What My current scripts do is loop all items and the MediaSources. If the path is no longer valid it removes that Media Source from the Array. My hope was that it would update the list on the server side using the API but currently that seems to be ignored completely.
Any ideas would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions