New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Audio and Subtitle Track Count to Smart Playlist selections #8333
Conversation
Hmm. I'm now discovering that the database isn't always pre-populated with the stream details -- I had to browse into SOME of my TV shows using the standard "TV Shows" view, and the log then indicated it was checking stream details. Other shows had been fully populated. Not sure why some where and others weren't... Is that typical behavior? Or is it because I ran this compiled fork onto an existing Isengard database? |
It is typical behaviour. |
Looks good to me. While at it mind adding the same for subtitle count? Video doesn't make much sense here i guess. Thanks. |
@mkortstiege : Done. I also corrected the word case (I had capitalized the words in the string (Audio Track Count) but the convention appears to be capitalizing only the first word (Audio track count). All: Is there a CONSTANT that should be used instead of explicitly giving an integer for iStreamType in the database query? If those values change due to some other PR, this query will break -- I don't know how to look through all the constants to see if there's a C++ constant to put in place there. In other words, instead of
should it be
|
Humm. That's outta this novice's wheelhouse. How does Kodi conventions dictate typecasting that integer into a string? I'd probably use std::to_string() but I don't see that used anywhere else in the code. I appreciate y'all's patience and advice. |
Will that work? (I mean, it does do what's intended, but is it "legal"?) |
std::to_string() doesn't work in android |
…strings Changed select type to use constants already defined instead of literal integers; also added data validation to limit to positive integers. More consistent query string formatting
e168a50
to
db9d5ca
Compare
Squashed some and integrated @phate89 suggestion |
@phil65 , is there a way to trigger the system to pull the details into the database? This modification I'm proposing loses its appeal if the required data isn't in the database without the user having to trigger the scan for each series... |
Not possible right now, as far as I know. Only happens when you browse the media. |
Just noticed that some playlist selection criteria that have existed "forever" such as audio language or subtitle language are similarly limited even though the Wiki doesn't mention it so it seems a precedent is already set... So, I'm hoping this can be merged. I've been compiling this same change into Isengard on Pi and Linux and am quite enjoying it. |
We'll merge it when the next merge windows for K****** opens up, but that might take some days. |
jenkins build and merge |
This adds a new Smart Playlist Rule field named "audiocount" which can be used to locate video files that have a specific number of audio tracks.
I'm a big fan of commentary tracks, and using the existing GUI to locate movies or TV show episodes that have commentaries is almost impossible -- one must be using a skin that supports that info and displays it in navigation. And even then, one must scroll through the library to locate the files.
This addition makes it simple -- just make a playlist for Movies or Episodes that contain more than 1 audio tracks. Such as: