Jump to content

Unable to delete movie library


Go to solution Solved by Gummibeer,

Recommended Posts

Posted

Hey,

I'm unable to delete my Movie library and it also doesn't scan the library anymore. Below is a screenshot from the MediaItems table in the library.db it seems like there's a circular relation between the folder items. 🤔
It tries to send a POST request to one of these - depending on the library I want to delete:

/emby/Library/VirtualFolders/Delete?refreshLibrary=true&id=4&name=Filme&X-Emby-Client=Emby+Web&X-Emby-Device-Name=Chrome+macOS&X-Emby-Device-Id=7297c7ce-c2fe-4bb8-a23e-496b091eb20c&X-Emby-Client-Version=4.8.8.0&X-Emby-Token=8a854e13a2be4840b2cb908a8577377f&X-Emby-Language=de

/emby/Library/VirtualFolders/Delete?refreshLibrary=true&id=496083&name=Filme&X-Emby-Client=Emby+Web&X-Emby-Device-Name=Chrome+macOS&X-Emby-Device-Id=7297c7ce-c2fe-4bb8-a23e-496b091eb20c&X-Emby-Client-Version=4.8.8.0&X-Emby-Token=8a854e13a2be4840b2cb908a8577377f&X-Emby-Language=de

The request takes forever and nothing happens. The only lines in log I can find are these:

2024-10-07 13:40:29.017 Info Server: http/1.1 POST http://emby_remote_ip:8096/emby/Library/VirtualFolders/Delete?refreshLibrary=true&id=496083&name=Filme&X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome macOS&X-Emby-Device-Id=7297c7ce-c2fe-4bb8-a23e-496b091eb20c&X-Emby-Client-Version=4.8.8.0&X-Emby-Token=x_secret1_x&X-Emby-Language=de. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

2024-10-07 13:48:47.099 Debug Server: http/1.1 GET http://emby_remote_ip:8096/emby/Library/VirtualFolders/Delete?refreshLibrary=true&id=4&name=Filme&X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome macOS&X-Emby-Device-Id=7297c7ce-c2fe-4bb8-a23e-496b091eb20c&X-Emby-Client-Version=4.8.8.0&X-Emby-Token=x_secret1_x&X-Emby-Language=de. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

2024-10-07 13:48:47.112 Info Server: http/1.1 Response 404 to host1. Time: 13ms. GET http://emby_remote_ip:8096/emby/Library/VirtualFolders/Delete?refreshLibrary=true&id=4&name=Filme&X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome macOS&X-Emby-Device-Id=7297c7ce-c2fe-4bb8-a23e-496b091eb20c&X-Emby-Client-Version=4.8.8.0&X-Emby-Token=x_secret1_x&X-Emby-Language=de

Is there any way I can get rid of one/both of these libraries without setting up a fresh server instance? Only smaller solution I can think of would be to manipulate the library.db manually - no idea what the impact would be and which of all I should delete? Or delete/move the library.db entirely while emby is shut down and start it again.
Is there any other way I can forcefully delete a library when the web UI doesn't do it? In the iOS app it also doesn't work.

I'm running on a Synology DS1522+ in case that's relevant - but have full SSH access when needed.

Bildschirmfoto 2024-10-07 um 13.46.09.png

  • Solution
Posted

Okay, it seems like that circular relationship was the root cause for the inability to delete and also that the library scan hasn't found any items.
I have shut down emby, copied the library.db as backup and deleted the items 489639, 489640, 496083. After that I booted emby again and the additional library disappeared. No idea how but the remaining Movies library has still shown the /volume3/Movies path - to be sure I deleted the library now completely through webUI and created a new movie library.
It hasn't taken a minute till the first items appeared back in the movies library. 🥳

Only thing I fear is that all favorites and watch states are lost now. 🤔😟

Happy2Play
Posted (edited)
26 minutes ago, Gummibeer said:

Only thing I fear is that all favorites and watch states are lost now.

Since you did not start a new database you should be fine.  Only way to lose watch status is if the items did not have a providerid like say home movies as path/dbid is only used on items with no providerids pretty sure Favorites are the same.

So once all media is readded you should be fine.

If you are Premiere user and use the Backup and Restore plugin you should be able to extract userdata from a backup database.

If no you need to look at a backup play for Emby programdata folder or at a minimum Emby databases.

Configuration Backup | how-to-backup-manually

 

Edited by Happy2Play
Posted

Oh yeah, have seen some already watched ones during import and now also favorites are appearing. Seems like favorites take longer - but the scan is also not complete yet. So all fine.
I'm a premium user - haven't configured the backup & restore yet. Probably a good reminder to do so now. 😂

  • Like 2
Happy2Play
Posted

When configuring the plugin ensure to maintain extra copies of the databases as Emby only maintains one full backup.  Would look at say a week or more as a couple could have whatever issue that is going on.  But really depends on the size of the db and that space you have available.

image.png.455f018f1a5dda54160fd749e2ea6c3f.png

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...