CommunityScripts icon indicating copy to clipboard operation
CommunityScripts copied to clipboard

[renamerOnUpdate] Updating database fails, "locking protocol"

Open johnnyporn88 opened this issue 2 years ago • 2 comments

Since going to v0.20.2, the plugin is no longer able to update the database.

I have the plugin set to rename AND move the file. It appears to be able to do so, but it is unable to actually update the database with the new file directory and name.

Docker on Ubuntu Server.

Logs:

2023-04-12 01:53:37Debug   Scene.Update.Post [renamerOnUpdate]: returned: Successful!

2023-04-12 01:53:37Debug   [Plugin / renamerOnUpdate] Execution time: 10.47028s

2023-04-12 01:53:37Info    [Plugin / renamerOnUpdate] [SQLITE] Database updated and closed!

**2023-04-12 01:53:37Error   [Plugin / renamerOnUpdate] Error during database operation (database update)**

2023-04-12 01:53:37Debug   [Plugin / renamerOnUpdate] [SQLITE] Database closed

2023-04-12 01:53:37Info    [Plugin / renamerOnUpdate] [OS] File Renamed! (/data/videos/performers/newfilename - 1080p.mp4 -> /data/unsorted/performers/oldfilename - 1080p.mp4)

**2023-04-12 01:53:37Error   [Plugin / renamerOnUpdate] error when trying to update the database (locking protocol), revert the move...**

2023-04-12 01:53:27Info    [Plugin / renamerOnUpdate] [OS] File Renamed! (/data/unsorted/performers/oldfilename - 1080p.mp4 -> /data/videos/performers/newfilename - 1080p.mp4)

2023-04-12 01:53:27Debug   [Plugin / renamerOnUpdate] Python successfully connected to SQLite

2023-04-12 01:53:27Debug   [Plugin / renamerOnUpdate] [OLD path] /data/unsorted/performers/oldfilename - 1080p.mp4

2023-04-12 01:53:27Info    [Plugin / renamerOnUpdate] File will be moved to another directory

2023-04-12 01:53:27Debug   [Plugin / renamerOnUpdate] [NEW path] /data/videos/performers/newfilename - 1080p.mp4

johnnyporn88 avatar Apr 12 '23 06:04 johnnyporn88

I'm having the same issue. Trying to create folders based on studios and the plugin will create the new folder, move the file, not be able to update the database and revert the move (leaving the newly created folder)

illo1771 avatar Aug 28 '23 01:08 illo1771

Any idea what's causing this issue?

SquirtyMcFlirty avatar May 04 '24 02:05 SquirtyMcFlirty

Same here.

24-09-27 15:11:15 Info
[Plugin / renamerOnUpdate] [SQLITE] Database closed! 2024-09-27 15:11:15 Error
[Plugin / renamerOnUpdate] Error during database operation (database update) 2024-09-27 15:11:15 Info
[Plugin / renamerOnUpdate] Removing empty folder (VR/Library/Organized/Folder/Subfolder) 2024-09-27 15:11:15 Info
[Plugin / renamerOnUpdate] [OS] File Renamed! (VR/Library/Organized/Folder/Subfolder/filename.mp4 -> /VR/Library/Unsorted/filename.mp4) 2024-09-27 15:11:15 Error
[Plugin / renamerOnUpdate] error when trying to update the database (You need to setup a library with the new location (VR/Library/Organized/Folder/Subfolder) and scan at least 1 file), revert the move... 2024-09-27 15:11:15 Info
[Plugin / renamerOnUpdate] Creating folder because it don't exist (VR/Library/Organized/Folder/Subfolder) 2024-09-27 15:11:15 Info
[Plugin / renamerOnUpdate] [OS] File Renamed! (/VR/Library/Unsorted/filename.mp4 -> VR/Library/Organized/Folder/Subfolder/filename.mp4)

vancrize avatar Sep 27 '24 13:09 vancrize

What solved it for me: going from

r"VR/Library/Organized/$studio_hierarchy" to r"/VR/Library/Organized/$studio_hierarchy"

The leading slash was not blocking the creation of folders, but apparently moving the file wasnt possible.

vancrize avatar Sep 27 '24 13:09 vancrize