Is it now possible to change the order of library scanning - TV *first*, then movies - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: Is it now possible to change the order of library scanning - TV *first*, then movies (/showthread.php?tid=356804) Pages:
1
2
|
Is it now possible to change the order of library scanning - TV *first*, then movies - bossanova808 - 2020-09-01 I asked this a long time ago, but things change...so....is it now possible to change the order in which new items are scanned to the video library? I have always wanted new TV episodes (which, by their nature, tend to appear much more frequently) - to be scanned in before new Movies. But, at least in the past, Kodi would only scan in Movies first and there as no way to change that. With a large library, the scanning process can take several minutes. Having to wait out the (often) fruitless/not needed Movies scan is really quite tedious... (I understand there are potentially fancier solutions like watchdogs etc, running headless Kodi instances pointed at MySQL DBs etc, but they soon get complicated with profiles and so on...) RE: Is it now possible to change the order of library scanning - TV *first*, then movies - Hitcher - 2020-09-01 I think it scans based on the order they were originally added to the library. Alternatively you can set up folders that contain movies/TV shows that only need scanning once and then set them to be ignored. RE: Is it now possible to change the order of library scanning - TV *first*, then movies - bossanova808 - 2020-09-01 Pretty sure that is not it, to be honest...I've tried removing and re-adding things, and changing the order in sources.xml, but movies always go first... And unfortunately things aren't _quite_ static enough to ignore folders like that. I suppose I could set some paths to ignore and then just run occasional manual update scans on those...but, the question still remains if it is possible to change the order. I could be wrong - does anyone ever see their TV shows scanning before movies?? RE: Is it now possible to change the order of library scanning - TV *first*, then movies - Hitcher - 2020-09-01 Just tested and you're correct it always scans movies first but I then tested by changing the names of the folders to see if it scans them alphabetically. Movies/TVshows - movies scanned first Z_Movies/TVshows - TV shows scanned first So that seems to be your answer: Rename the folders alphabetically in the order you want them scanned. RE: Is it now possible to change the order of library scanning - TV *first*, then movies - bossanova808 - 2020-09-01 Interesting - I guess Kodi must sort the paths at some point then. Hmm...changing paths is kind of a pain with a big library and lots of things pointing at those paths....but I suppose it if is just the movies it's not super painful. RE: Is it now possible to change the order of library scanning - TV *first*, then movies - Klojum - 2020-09-01 I'd like to have the option to scan them separately. I don't need to always scan my movies whenever I scan my TVshows, and vice versa. RE: Is it now possible to change the order of library scanning - TV *first*, then movies - bossanova808 - 2020-09-01 ^ this - separate scanning would be great. (oh and thanks @Hitcher for working that out!) RE: Is it now possible to change the order of library scanning - TV *first*, then movies - Hitcher - 2020-09-01 (2020-09-01, 10:17)Klojum Wrote: I'd like to have the option to scan them separately. I don't need to always scan my movies whenever I scan my TVshows, and vice versa. You sort of can do this now by using 'Scan for new content' on a folder in files mode. RE: Is it now possible to change the order of library scanning - TV *first*, then movies - bossanova808 - 2020-09-01 hmm...I wonder, is there a python way to call that - could then use an autoexec.py to kick off targeted scans of particular paths instead of using the more general library update feature. That'd be handy... RE: Is it now possible to change the order of library scanning - TV *first*, then movies - Klojum - 2020-09-01 (2020-09-01, 10:31)Hitcher Wrote: You sort of can do this now by using 'Scan for new content' on a folder in files mode. Meh... You shouldn't have to go all the way to the Files section and do that. RE: Is it now possible to change the order of library scanning - TV *first*, then movies - pkscout - 2020-09-01 (2020-09-01, 10:35)bossanova808 Wrote: hmm...I wonder, is there a python way to call that - could then use an autoexec.py to kick off targeted scans of particular paths instead of using the more general library update feature. That'd be handy...You can scan a particular folder (it can even be a folder within a source) via JSON. https://kodi.wiki/view/JSON-RPC_API/v10#VideoLibrary.Scan I use that call in an external Python script that integrates my DVR recordings from NextPVR into my Kodi library. When a new show finishes recording, I tell Kodi to scan just the directory the new show is in. I think the only odd thing I noticed is that the path must end with a slash, otherwise the scan doesn't work. RE: Is it now possible to change the order of library scanning - TV *first*, then movies - bossanova808 - 2020-09-02 @pkscout - great, that should be enough then, in theory...presuming you can give it the whole source, that's super easy. Otherwise I suppose one can loop over the paths that form the source. Shall experiment! I think I'll do it as an addon and just use an autoexec.py to RunScript it...that way I can bind it to a remote key as well. (I can see a useful more general addon in this, really - some sort of custom library scanner you can use to config various scanning options and then call via e.g. remote keys and RunScript etc...will have to see if I have some time!). RE: Is it now possible to change the order of library scanning - TV *first*, then movies - scott967 - 2020-09-02 I think an alternative is to import xbmc and run xbmc.executebuiltin('UpdateLibrary(video,[path])'). Or just add the builtin to a keymap binding. scott s. . RE: Is it now possible to change the order of library scanning - TV *first*, then movies - bossanova808 - 2020-09-03 So been experimenting with this. I can get it to work either way (executebuiltin and via JSON) - and I presume result is the same internally. Thanks @pkscout @scott967 for the tips there. But in practise it's fussy & there are frustrating limits. - You can't just specify a source name to update - like 'TV', a nice pseudonym for a path, it must be an actual path (not surprising I guess given both those things are asking for the path...) - But that's a shame, because specifying a source would make it easy to target multiple paths at once - It also means that I can't easily seem to string together updating multiple paths. Which I need as I have things scattered across quite a few drives etc. (Yes, I know I could pool things, use ZFS, etc etc, but there are reasons...) So, the first update kicks off ok, but because that call returns immediately, I presume that scan is still running when the second command is sent, and that seems to be ignored - there's no queue or whatever, it would seem. I presume to get it going on one would have to write some sort of listener that waits for the current scan to finish (which I presume gets announced) - then kicks of the next path in the list. RE: Is it now possible to change the order of library scanning - TV *first*, then movies - bossanova808 - 2020-09-03 Well, I now have a nice little service addon that can be configured with a simple file full of paths.txt and will kick off an update for each of those paths. Seems to work ok and achieves the desired result of only scanning what I want at login, rather than everything. Need to clean it up (if anyone else is interested?) & maybe add a UI to set the paths etc...not sure if that is worth it. But in all, this means you can create a custom set of paths to be updated when you start Kodi... which is what I was after. Might get it to kick off a background update of the whole library by a timer or something later...but this will mean TV shows are available as quickly as possible really, so that's good. |