Cloudbox / autoscan

Autoscan replaces the default Plex and Emby behaviour for picking up changes on the file system.
MIT License
594 stars 49 forks source link

How to delete a folder without causing partial sync errors #187

Closed alashow closed 1 year ago

alashow commented 1 year ago

Hello. After removing a folder that's not even scanned by plex, autoscan stopped working with this error:

Jan  4 08:59:25 ERR Consecutive errors occurred while syncing drive, drive has been stopped... error=["drive_id: performing partial sync: getting parents: removed file: could not get folder: random_deleted_folder_id: random_deleted_folder_id: folder not found: sql: no rows in result set","drive_id: performing partial sync: getting parents: removed file: could not get folder: random_deleted_folder_id: random_deleted_folder_id: folder not found: sql: no rows in result set","drive_id: performing partial sync: getting parents: removed file: could not get folder: random_deleted_folder_id: random_deleted_folder_id: folder not found: sql: no rows in result set","drive_id: performing partial sync: getting parents: removed file: could not get folder: random_deleted_folder_id: random_deleted_folder_id: folder not found: sql: no rows in result set","drive_id: performing partial sync: getting parents: removed file: could not get folder: random_deleted_folder_id: random_deleted_folder_id: folder not found: sql: no rows in result set"]

Any way to solve this without doing a full database rebuild?

m-rots commented 1 year ago

I'd advice you to switch over to A-Train. The Google Drive implementation that's currently inside Autoscan unfortunately has multiple logic errors which we were not able to fix. A-Train uses a completely different approach, which has worked flawlessly since its introduction. I'd definitely recommend you to check it out :)!

alashow commented 1 year ago

Thanks will check it out.

Does switching from bernard to A-train require database file recreation? Will I still have to delete autoscan.db to allow it rebuild or does changing to a-train in autoscan config will resolve errors somehow?

m-rots commented 1 year ago

A-Train builds its own database file inside its container, so there's no need to delete the current autoscan.db file. Except for removing the Bernard section in Autoscan's config file, there's no need to change anything there either, as a-train is automatically enabled in recent versions of Autoscan.

alashow commented 1 year ago

Does it not make sense still to delete the database? My library is pretty big & autoacan.db is ~127 mb.

m-rots commented 1 year ago

Only thing to keep in mind is that Autoscan's queue is also in the autoscan.db file. However, if you haven't downloaded any new items, it's perfectly save to remove the file!