LSchallot / JellyRoller

CLI Jellyfin Controller Utility for Linux and Windows
GNU General Public License v2.0
46 stars 3 forks source link

How can I scan specific library only? #47

Open stiw47 opened 5 days ago

stiw47 commented 5 days ago

Hi, thanks for this nice piece of software. Not an actual issue, but don't know where else I would ask. I can see, there is a scan-library option presented:

[stiw47@archmedia jellyfin]$ ./jellyroller --help | grep scan
  scan-library               Start a library scan

But I have no idea how this is working, and I assume it scans all libraries. I have one very big library with cartoons for my kids, where I am setting titles manually in our native language when I add something, and I don't want this library to be scanned ever. On the other hand, rest of the libraries with movies/shows, etc. are in English, and I would like to use your tool in scripting which I'm doing to automatically download trailers from YT, to be used with local intros plugin.

In short:

  1. What exactly doing scan-library sub-command?
  2. Is there a way to specify library for scanning, and not all libraries to be scanned?

Thanks.

stiw47 commented 5 days ago

Actually, I found how can I do it via API:

$ curl -L -X POST 'http://media.archmedia/Items/790d9f167f6adfd960a2c87db735e099/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default&ReplaceAllImages=false&ReplaceAllMetadata=false&apiKey=e807c5fa30234fbb97a55ca7ebd5887e'

Where 790d9f167f6adfd960a2c87db735e099 is the ID of the library I want to refresh, and e807c5fa30234fbb97a55ca7ebd5887e is my Jellyfin API key obviously. (and @ all people: Don't bother to access, media.archmedia is local domain resolvable from my home network only, and my Jellyfin instance is not reachable from the internet at all, so I took the freedom to post everything in plain 😇😇)

Anyway, I would still like to get the answer on previous question, nothing urgent and thanks once again.

LSchallot commented 2 days ago

The scan-library functionality was based on the built-in scheduled tasks of library scanning, hence why it does everything or nothing. This fit my use case when it was written.

Since you have a legitimate use case for specific libraries, I can get the functionality added and included in the 0.5.0 build.

stiw47 commented 2 days ago

Hello. Vau, thanks for that 😀, and thank you for your answer. As far as I read through forums and reddit's through these many years of Jellyfin use, there are also other people who has "some their library" they wont to be auto scanned. I mean, if such a library is scanned as "scan for new and updated files" only - it should be harmless, but there is always little fear, like: "What if this change all my titles to e.g. English, on over 500 items?" 🥹.

Nevermind, did you think about to make few types of scan, or...? I mean, Jellyfin has some granularity here as, "scan for new and updated files", "search for missing metadata", and "replace all metadata" + there is additional option for last 2 types "replace existing images". Do you plan to cover them all? This^^ is not request, just asking, and thank you once again for nice piece of sw, you are doing in your free time.

LSchallot commented 2 days ago

I will probably focus on specifying which library to scan and what type of scan to perform (scan for new and updated files, replace all metadata, etc.).