Comments (1)
Originally Autoscan had this exact behaviour implemented. Files were checked for their existence before sending any requests to the targets. Each time an existence check was unsuccessful, the min-age would be applied again so the existence could be retried later (up to a configurable limit). However, this behaviour was removed in Autoscan 0.4.0 due to our Google Drive (through Bernard) integration.
Essentially, the problem we began facing was the following:
Autoscan was file-based, each item in the datastore was required to have both a folder path and a file name. So when we send scan requests to targets, we first checked whether the folder path + file name existed on the file system. When successful, we grabbed the folder path and sent it off to the targets (Plex requires a folder to be scanned, not a file).
Now, here comes the problem: Plex only scans a folder when its parent folder exists. Of course this is totally fine when files are added or have changed, but it becomes problematic when entire folders are being deleted. The following case made us remove everything file-related:
- Original files lived in
/Shows/The Boys/Season 1/episodes.mkv
/Shows/The Boys
is renamed to/Shows/The Boys (2019)
Now, at this point we must scan both the new path to add the correct path for the new file entries and the old path to clean up and remove the previous entries. However, we must scan the path /Shows/The Boys
as its parent /Shows
must still exist for Plex to do anything. Yet, the architecture we were using (the folder path + file name) caused us to forget the original event (that /Shows/The Boys
is deleted) and instead only told us that a few specific files were removed (with no insight of the total number of files). Therefore, Autoscan tried to scan the path /Shows/The Boys/Season 1
to remove the items. But as you can imagine, it did not work as the parent /Shows/The Boys
did no longer exist.
With this issue in mind and the only up-side of saving file paths being file existence, we removed the file-based architecture completely and instead moved on to folders exclusively. This has fixed our issue and this will continue to be the way the architecture is designed for Autoscan moving forward.
- The change from folder+file based to exclusively folder based: Folders of Madness
- The release where this change made its way into Autoscan officially: 0.4.0
from autoscan.
Related Issues (20)
- Certain library keeps scanning HOT 1
- Question about disabling Plex HOT 3
- Query Plex API to wait until nothing is being scanned before sending a new entry
- Readarr trigger stopped working suddenly
- Have Sonarr and Radarr as a target?
- Support Dropbox
- Multiple rewrites don't work past the first value HOT 2
- "Other Videos" in Plex not being found when using inotify HOT 1
- Lidarr | All notifications are unavailable due to failures HOT 3
- Since 7/27 no longer receiving common from sonarr and a-train
- FTL Failed initialising target with HTTPS plex URL HOT 3
- Allow Anchor rewrite
- latest plex version 1.32.7 breaks autoscan HOT 6
- Fatal error occurred while processing targets, processor stopped, triggers will continue... error="scan: 524 HOT 1
- Failure to start for users with no home directory HOT 1
- Tdarr plugin HOT 1
- Plex does not "scan the whole library" when a file is added, so what is the benefit of autoscan HOT 3
- Mylar3 and Komga
- What is format for two emby servers ? HOT 1
- Add triggers for rename and artist delete and album delete for lidarr HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoscan.