katbyte 47 Posted 1 hour ago Posted 1 hour ago While poking at Emby with an MCP server I've been writing, I found items that can't be deleted through the API at all. If an item's folder no longer exists on disk, and that folder held more than one item, DELETE /Items/{Id} answers 404 Could not find a part of the path '<folder>' and the entry stays in the database. An item that was alone in its folder deletes fine in the same state, including a film stacked as CD1/CD2 — so it's the multiple-items-per-folder case that breaks. Reproduced on a clean 4.10.0.31: 1. Create /media/test/Two Films (2011)/ holding First Film (2011).mp4 and Second Film (2013).mp4. 2. Add /media/test as a movie library and scan. Two entries appear. 3. Delete the folder Two Films (2011) from disk. Don't rescan. 4. Call DELETE /Items/{Id} on either entry. Expected: the entry is removed, as it is when a scan drops missing items. Actual: 404 Could not find a part of the path '/media/test/Two Films (2011)'. Both entries stay. Recreating that folder empty and repeating the exact same calls returns 204 and removes both entries. So the delete only needs to read the folder, not the files in it. A missing folder should be treated the same as an empty one. These entries can't be removed by any route I could find without actually creating the folder. Renaming a library folder left me with thousands of entries under the old path, outside every library, so no scan ever revisits them and the API delete is the only thing left. Most deleted fine; the ones that had shared a folder refused until I recreated each folder by hand. I saw the same error for an episode in that state, but I only reproduced the film case cleanly.
Luke 43131 Posted 1 hour ago Posted 1 hour ago Quote so no scan ever revisits them hi, what do you mean by this? The scan will handle what you've manually deleted.
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