terse 1 Posted October 9 Posted October 9 Hi Emby Team, I would like to request a feature that allows Emby to perform true incremental media library scans on specific folders or file paths through the API, without scanning the entire library or unnecessarily refreshing parent directories. My Current Situation I have a very large Emby media library containing approximately 50TB of movies, stored on cloud storage mounted through CloudDrive. The library structure looks like this: /mnt/clouddrive/115/Movies/ ├── Movie Collection A/ ├── Movie Collection B/ ├── Movie Collection C/ └── update/ ├── Movie-A/ │ └── Movie-A.mp4 ├── Movie-B/ │ └── Movie-B.mp4 └── Movie-C/ └── Movie-C.mp4 I add approximately 5–6 new movies every day, usually under the update directory. Currently, manually triggering a library scan takes a very long time because of the large number of existing files and folders. This is especially problematic with cloud-mounted storage, where directory listing and file operations introduce additional latency. What I Have Tried I tested the existing Emby API: POST /emby/Library/Media/Updated With the following request: { "Updates": [ { "Path": "/mnt/clouddrive/115/Movies/update/Movie-A/Movie-A.mp4", "UpdateType": "Created" } ] } and this{ "Updates": [ { "Path": "/mnt/clouddrive/115/Movies/update/Movie-A=", "UpdateType": "Created" } ] } The API successfully returns HTTP 204. However, the new movie is not detected, and the server logs later show a refresh being scheduled for the parent update directory: LibraryMonitor: update (/mnt/clouddrive/115/Movies/update) will be refreshed. This suggests that the API does not necessarily perform a targeted scan of the specified file or folder. I also understand that /Items/{Id}/Refresh can refresh an existing library item, but newly created movie folders may not have an Item ID yet, making this approach unsuitable for discovering new content. Requested Feature I would like Emby to provide a dedicated API endpoint for scanning a specific filesystem path and discovering newly added media without traversing unrelated directories. For example: POST /emby/Library/ScanPath Request: { "Path": "/mnt/clouddrive/115/Movies/update/Movie-A", "Recursive": true } Expected behavior: Scan only the specified directory and its contents. Detect and import newly added movies, even if their folders do not yet exist in Emby's database. Avoid scanning unrelated directories or the entire media library. Return a scan task ID or status so that external automation scripts can monitor scan progress and completion. Ideally, the API should also support multiple paths in a single request, allowing several newly added movies to be imported efficiently.
Luke 43402 Posted October 9 Posted October 9 Hi, it already is an incremental scan, but the reason it goes up to the parent folder is because all of the files in the folder have to be considered in order to support all of emby's features. But the process of comparing existing movies to the file system and looking for changes should be very quick. We are always looking at ways to improve the performance of this.
terse 1 Posted October 9 Author Posted October 9 11 hours ago, Luke said: Hi, it already is an incremental scan, but the reason it goes up to the parent folder My library contains approximately 50TB of movies stored on CloudDrive-mounted storage, with only 5–6 new movies added per day. Each movie is stored in a separate folder containing the video file and its metadata. For example, my directory structure looks like this: /mnt/clouddrive/115/Movies/update/ ├── Movie-A/ # Newly added movie │ ├── Movie-A.mp4 │ ├── Movie-A.nfo │ ├── poster.jpg │ ├── fanart.jpg │ └── ... ├── Movie-B/ # Existing movie, completely unchanged ├── Movie-C/ # Existing movie, completely unchanged ├── Movie-D/ # Existing movie, completely unchanged └── ... # Thousands of other unchanged movie folders Only Movie-A is newly added. All other movie folders (Movie-B, Movie-C, Movie-D, etc.) and their contents remain completely unchanged. I would like an optional API that scans and imports only the specified movie folder, including all video files and metadata inside it, without enumerating or checking any other folders. For example, specifying /mnt/clouddrive/115/Movies/update/Movie-A/ should scan only Movie-A, without accessing Movie-B, Movie-C, Movie-D, or any other existing movie folders. This is especially important because even checking unchanged directories on CloudDrive can be very slow due to remote storage latency. My goal is to make the scanning time depend on the number of newly added movies, rather than the total number of existing movies in the library. Is there currently any API or configuration that supports this kind of strictly path-scoped scan? If not, could this be considered as an optional feature?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now