Jump to content

Scan Single Libraries Only


Spaceboy
Go to solution Solved by rbjtech,

Recommended Posts

Spaceboy

A request for more granular control over the scanning of single libraries has long been asked for and not implemented to date. Thinking of in particular the frequency with which they are scanned.

Is there anyway to scan single libraries at all? thinking of via the API. i took a look but it seems its all or nothing still

Reason for asking is my library takes roughly 6 hours to complete a full scan on a daily basis. the number of items within the library are probably the cause of this (12k movies, c50k episodes, 250k songs, 15k photos and quite a bit more). but typically the only libraries to which new media is added on a daily basis are movies and tv. the other libraries do not need scanning. RTM is also ineffective due to library size so is only enabled on my live tv recordings library.

Or am i just SOL?

Link to comment
Share on other sites

Q-Droid

Are you allowing the scans to refresh metadata after initial import? I'm wondering if setting that to "Never" would cut down on the overhead. I know this doesn't answer your actual question and would be a nice feature to have more granular control of library scans.

 

Link to comment
Share on other sites

Spaceboy
16 minutes ago, Q-Droid said:

Are you allowing the scans to refresh metadata after initial import? I'm wondering if setting that to "Never" would cut down on the overhead. I know this doesn't answer your actual question and would be a nice feature to have more granular control of library scans.

 

nope, pure scan only. metadata provided by TMM

Link to comment
Share on other sites

  • Solution
rbjtech

You can specify the library to scan using it's parent id on the standard API

http://localhost:8097/emby/Items/39006/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default&ReplaceAllImages=false&ReplaceAllMetadata=false&X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=704173df-a340-41e8-b7fe-7af6ee1830ad&X-Emby-Client-Version=4.8.0.8

As an example - 39006 is the Parent Id of the library.

edit - something like this in Curl/API

curl -X POST "http://localhost:8097/emby/Items/39006/Refresh?Recursive=true&MetadataRefreshMode=Default&ImageRefreshMode=Default&ReplaceAllMetadata=false&ReplaceAllImages=false&api_key=******" -H "accept: */*"

Parent Id is shown in the URL when browsing the libraries

http://localhost:8097/web/index.html#!/videos?serverId=****&parentId=39006

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

Happy2Play
7 minutes ago, Spaceboy said:

seems like its gone

 

Nope nothing has changed.

Link to comment
Share on other sites

  • 3 months later...
Spaceboy

this has been working for me for the past few months but has suddenly stopped. i can't see why. this was my curl command

curl -X POST "http://localhost:8096/emby/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Refresh?Recursive=true&MetadataRefreshMode=Default&ImageRefreshMode=Default&ReplaceAllMetadata=false&ReplaceAllImages=false&api_key=blahblah" -H "accept: */*"

i assume following the instructions provided by rjbtech that f137a2dd21bbc1b99aa5c0f6bf02a805 was my parentId

looking at the library now the parentId seems to be 115796.

however

curl -X POST "http://localhost:8096/emby/Items/115796/Refresh?Recursive=true&MetadataRefreshMode=Default&ImageRefreshMode=Default&ReplaceAllMetadata=false&ReplaceAllImages=false&api_key=blahblah" -H "accept: */*"

doesnt get me a library scan either. is it me or the API? most likely me but i'm stuck

Link to comment
Share on other sites

rbjtech

Just tried with the above syntax at it looks ok, scan of that library was started as I can see it in the logs.   library parentId=2237026 in my case.

2022-11-26 16:53:24.997 Info Server: http/1.1 POST http://‌‍‍localhost‌:8096/emby/Items/2237026/Refresh?Recursive=true&MetadataRefreshMode=Default&ImageRefreshMode=Default&ReplaceAllMetadata=false&eplaceAllImages=false. UserAgent: curl/7.83.1
2022-11-26 16:53:24.997 Info Server: http/1.1 Response 204 to ‌‍‍127.0.0.1‌. Time: 0ms. http://‌‍‍localhost‌:8096/emby/Items/2237026/Refresh?Recursive=true&MetadataRefreshMode=Default&ImageRefreshMode=Default&ReplaceAllMetadata=false&eplaceAllImages=false
Quote

curl -X POST "http://localhost:8096/emby/Items/2237026/Refresh?Recursive=true&MetadataRefreshMode=Default&ImageRefreshMode=Default&ReplaceAllMetadata=false&eplaceAllImages=false&api_key=*" -H "accept: */*"

latest beta 4.8.0.19

maybe create a new API key to test ?

Edited by rbjtech
Link to comment
Share on other sites

4 hours ago, Spaceboy said:

this has been working for me for the past few months but has suddenly stopped. i can't see why. this was my curl command

curl -X POST "http://localhost:8096/emby/Items/f137a2dd21bbc1b99aa5c0f6bf02a805/Refresh?Recursive=true&MetadataRefreshMode=Default&ImageRefreshMode=Default&ReplaceAllMetadata=false&ReplaceAllImages=false&api_key=blahblah" -H "accept: */*"

i assume following the instructions provided by rjbtech that f137a2dd21bbc1b99aa5c0f6bf02a805 was my parentId

looking at the library now the parentId seems to be 115796.

however

curl -X POST "http://localhost:8096/emby/Items/115796/Refresh?Recursive=true&MetadataRefreshMode=Default&ImageRefreshMode=Default&ReplaceAllMetadata=false&ReplaceAllImages=false&api_key=blahblah" -H "accept: */*"

doesnt get me a library scan either. is it me or the API? most likely me but i'm stuck

What does it get you? Server log?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...