cmh31909 0 Posted April 7 Share Posted April 7 I was watching a video (not tv series, just a video in a folder with other videos) and finished the video and then hit the delete button. Emby deleted the entire folder. I had been watching other videos and deleting them the same way and had no issues. I had not change folders or anything, just watching video after video in the same folder. I checked the Emby log and it shows the API call to the server to delete the video (not the folder), but right after that in the log, you can see where it deletes the entire folder. I was using the Roku client on a RokuUltra. 2024-04-06 00:05:07.375 Info Server: http/1.1 DELETE http://192.168.0.64:8096/emby/items/348226. UserAgent: Roku/DVP-12.5 (12.5.5.4174-C2) 2024-04-06 00:05:07.377 Info App: Removing item from database, Type: Video, Name: Avoid These Popular Supplements -Damaging Side Effects-, Path: /mnt/winmce/Videos/YouTube/Medical/Avoid These Popular Supplements -Damaging Side Effects-.mp4, Id: 348226 2024-04-06 00:05:07.390 Info App: Deleting directory /mnt/winmce/Videos/YouTube/Medical 2024-04-06 00:05:07.794 Info App: Deleting path /var/lib/emby/metadata/library/d8/d8dea70be1c368b7aef0c01c6e1c5e51 2024-04-06 00:05:07.795 Info Server: http/1.1 Response 204 to host1. Time: 420ms. DELETE http://192.168.0.64:8096/emby/items/348226 Emby Version 4.8.1.0 Roku/DVP-12.5 (12.5.5.4174-C2) Link to comment Share on other sites More sharing options...
Happy2Play 8289 Posted April 7 Share Posted April 7 What is the library content type? @ebr@speechles I will guess this is specific to the client as I just tested in web client but on current release 4.8.3.0 and it only deleted the video. Link to comment Share on other sites More sharing options...
cmh31909 0 Posted April 7 Author Share Posted April 7 I was watching a video (not tv series, just a video in a folder with other videos) and finished the video and then hit the delete button. Emby deleted the entire folder. I had been watching other videos and deleting them the same way and had no issues. I had not change folders or anything, just watching video after video in the same folder. I checked the Emby log and it shows the API call to the server to delete the video (not the folder), but right after that in the log, you can see where it deletes the entire folder. I was using the Roku client on a RokuUltra. 2024-04-06 00:05:07.375 Info Server: http/1.1 DELETE http://192.168.0.64:8096/emby/items/348226. UserAgent: Roku/DVP-12.5 (12.5.5.4174-C2) 2024-04-06 00:05:07.377 Info App: Removing item from database, Type: Video, Name: Avoid These Popular Supplements -Damaging Side Effects-, Path: /mnt/winmce/Videos/YouTube/Medical/Avoid These Popular Supplements -Damaging Side Effects-.mp4, Id: 348226 2024-04-06 00:05:07.390 Info App: Deleting directory /mnt/winmce/Videos/YouTube/Medical 2024-04-06 00:05:07.794 Info App: Deleting path /var/lib/emby/metadata/library/d8/d8dea70be1c368b7aef0c01c6e1c5e51 2024-04-06 00:05:07.795 Info Server: http/1.1 Response 204 to host1. Time: 420ms. DELETE http://192.168.0.64:8096/emby/items/348226 Emby Version 4.8.1.0 Roku/DVP-12.5 (12.5.5.4174-C2) Link to comment Share on other sites More sharing options...
Happy2Play 8289 Posted April 7 Share Posted April 7 No need to post multiple topics even though your issues would appear specific to the Roku. Link to comment Share on other sites More sharing options...
cmh31909 0 Posted April 7 Author Share Posted April 7 This is actually the first time I have had it delete the folder and not just the video. The content type of the folder is "home videos and photos". Link to comment Share on other sites More sharing options...
ebr 14916 Posted April 7 Share Posted April 7 Looking at that log, the app requested the delete on a single video and then the server decided it should also delete the containing folder. It would do this if it thought that was the only video in the folder. I'm guessing this would only be reproduceable under the exact set of circumstances/file organization/makeup that existed here but it doesn't appear to be related to the app at all. 1 Link to comment Share on other sites More sharing options...
cmh31909 0 Posted April 7 Author Share Posted April 7 7 hours ago, ebr said: Looking at that log, the app requested the delete on a single video and then the server decided it should also delete the containing folder. It would do this if it thought that was the only video in the folder. I'm guessing this would only be reproduceable under the exact set of circumstances/file organization/makeup that existed here but it doesn't appear to be related to the app at all. That is actually a very good theory. It is quite possible that that was the last video in the folder, however, that folder did contain subfolders that did still contain videos. So if what you say is true, Emby should also check that not only is it the last video but that there are no sub-folders or at least make sure they are empty as well. It may also be a good idea to prompt and let the user know it will actually be deleting the folder, at least that way, I could have said "no" and avoided the problem. Link to comment Share on other sites More sharing options...
Happy2Play 8289 Posted April 7 Share Posted April 7 Not sure here as I just delete multiple items from a folder to include last item in a folder via Roku and only the items were deleted and empty folder remained via Home Video and Photo library. But I can guess other conditions must apply. Link to comment Share on other sites More sharing options...
ebr 14916 Posted April 8 Share Posted April 8 16 hours ago, Happy2Play said: But I can guess other conditions must apply Yes, something specific made the server think that was a single movie in a folder. Link to comment Share on other sites More sharing options...
cmh31909 0 Posted April 8 Author Share Posted April 8 Perhaps just add some code to the server to look at and see if there are still non-empty subfolders before deleting the folder? Link to comment Share on other sites More sharing options...
ebr 14916 Posted April 8 Share Posted April 8 5 minutes ago, cmh31909 said: Perhaps just add some code to the server to look at and see if there are still non-empty subfolders before deleting the folder? For movies, that is valid.... trailers, specials, etc. Link to comment Share on other sites More sharing options...
cmh31909 0 Posted April 8 Author Share Posted April 8 My library is just of "home videos", not movies or tv, but still, the same rules should apply, do not automatically delete a folder that still has sub-folders that have content. Link to comment Share on other sites More sharing options...
ebr 14916 Posted April 9 Share Posted April 9 18 hours ago, cmh31909 said: My library is just of "home videos", not movies or tv, but still, the same rules should apply, do not automatically delete a folder that still has sub-folders that have content. In your case, the specific layout or naming of the item must have matched Emby's convention for a movie, so that's what the system saw it as. Movies can have subfolders with other video content and it is completely correct to also delete these if a delete of the movie is requested. Now, and I think this has come up before, it could be argued that we should never resolve something as a Movie if it is within a library marked as "Home videos".... Link to comment Share on other sites More sharing options...
cmh31909 0 Posted April 9 Author Share Posted April 9 >Now, and I think this has come up before, it could be argued that we should never resolve something as a Movie if it is within a library marked as "Home videos". Agreed. I'm not sure why you don't always use the Content Type designation of the folder as the determining factor instead of guessing based on the file name. Also, movie naming conventions are very specific, and the video file I deleted was nowhere near that pattern (as you can see in the log). Link to comment Share on other sites More sharing options...
Happy2Play 8289 Posted April 9 Share Posted April 9 3 hours ago, ebr said: In your case, the specific layout or naming of the item must have matched Emby's convention for a movie, so that's what the system saw it as. Movies can have subfolders with other video content and it is completely correct to also delete these if a delete of the movie is requested. Now, and I think this has come up before, it could be argued that we should never resolve something as a Movie if it is within a library marked as "Home videos".... Doesn't look like it. /Medical/Avoid These Popular Supplements -Damaging Side Effects-.mp4 But in my testing so far I can only get item to delete, "1. Module Two [Folder]" is left behind empty. \COURSE ABC [Folder]\1. Module Two [Folder]\1. Second vid.strm Link to comment Share on other sites More sharing options...
Luke 37084 Posted April 9 Share Posted April 9 4 hours ago, Happy2Play said: Doesn't look like it. /Medical/Avoid These Popular Supplements -Damaging Side Effects-.mp4 But in my testing so far I can only get item to delete, "1. Module Two [Folder]" is left behind empty. \COURSE ABC [Folder]\1. Module Two [Folder]\1. Second vid.strm The collapse hidden config switch will likely impact this. With it being set to false now on all new libraries and installs, this shouldn't be reprocubile anymore. 1 Link to comment Share on other sites More sharing options...
Happy2Play 8289 Posted April 9 Share Posted April 9 Ah yes my test was with a library "CollapseSingleItemFolders": false,. Will retest again with a "CollapseSingleItemFolders": true, when I get a chance. 1 Link to comment Share on other sites More sharing options...
cmh31909 0 Posted April 10 Author Share Posted April 10 4 hours ago, Luke said: The collapse hidden config switch will likely impact this. With it being set to false now on all new libraries and installs, this shouldn't be reprocubile anymore. I would I go about changing this for the library on my existing system? Link to comment Share on other sites More sharing options...
Happy2Play 8289 Posted April 10 Share Posted April 10 1 minute ago, cmh31909 said: I would I go about changing this for the library on my existing system? Delete and readd your library or you would have to pull the library info from the api then repost it via the api changing the flag. Generalized info can be found here as you will use /Library/VirtualFolders/LibraryOptions to change info once you get it from query. Or make a backup of the database and change it directly in the itemsextradata table for the specific library. Ensure you have a backup of DB is you are going to poke around. But testing this I still couldn't get it to delete the folder also. So I can only guess a legacy issue and can't be reproduced easily. Tested with true and false setting on "CollapseSingleItemFolders". Link to comment Share on other sites More sharing options...
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