Notifiarr / toolbarr

Starr Toolbarr
https://notifiarr.com/discord
MIT License
92 stars 4 forks source link

add check for existing root folder and merge them #155

Closed notifiarr-bot closed 4 months ago

notifiarr-bot commented 5 months ago

i have 10 root folders, i want to change them all to the same one. your code insists on trying to create the root folder that i am trying to change it to and when it already exists it throws an error. so now the user has to delete the root folder, go to the invalid paths, re-assign a root folder (1 step becomes 3) when your app can simply bypass that it already exists and just change the root folder as that is what is trying to be done. that is all i am saying. 1 step x 10 root folders becomes 3 steps x 10 root folders because it is insisting on creating a new one instead of using an existing one

Origin user: austinbest Origin message: Discord Server Link Reporting user: austinbest Reporting message: Discord Server Link

Log:

2024/04/10 22:04:39 [TRACE] Call:UpdateDBRootFolder(Radarr1,G:\Films\,F:\Films\)
2024/04/10 22:04:39 [DEBUG] Running Query: SELECT Id AS id, "" AS name, Path As path FROM Movies
2024/04/10 22:04:39 [DEBUG] Running Query: SELECT Id AS id, Name AS name, RootFolderPath As path FROM ImportLists
2024/04/10 22:04:39 [DEBUG] Running Query: SELECT Id AS id, Title AS name, RootFolderPath As path FROM Collections
2024/04/10 22:04:39 [TRACE] No listeners for event 'DBitemTotals'
2024/04/10 22:04:39 [DEBUG] Running Query: UPDATE RootFolders SET Path='F:\Films\' WHERE Path='G:\Films\'
2024/04/10 22:04:39 [TRACE] json call result data: {"result":null,"error":"Querying Sqlite3 DB: constraint failed: UNIQUE constraint failed: RootFolders.Path (2067)","callbackid":"starrs.Starrs.UpdateRootFolder-122370445"}