2015-10-31, 23:37
Hey, guys -- I've twiddled around in the SmartPlayList code to see about adding a rule where one could select videos that have multiple audio tracks.
I find this idea useful because I'm a big fan of commentaries -- and finding them with most skins is very difficult (only a few skins show the audio / subtitle info in navigation screens).
At any rate, I'm NOT a C++ programmer, and GIT is a wilderness to me. I was lucky to pull the clone and work from there and figure out how to compile it ...
At any rate, here's what I modified -- does this look useful? If so, can someone perhaps guide me through the Git wilderness, or just claim this code for themselves and put it into the
This DOES seem to work OK -- it works for movies and TV shows. Of course, it adds a new variable to the rules so the wiki's would need updating, and I'm not sure if I violated any rules about where the string got added in strings.po or anything.
I'm willing to learn, but I find this addition to be VERY useful. If I could figure out how to get this back into Gotham (which is what I'm using on my chromeboxes) -- I'd do it in a heartbeat.
xbmc/addons/resource.language.en_gb/resources/strings.po
xbmc/utils/DatabaseUtils.h
xbmc/playlists/SmartPlayList.cpp
I find this idea useful because I'm a big fan of commentaries -- and finding them with most skins is very difficult (only a few skins show the audio / subtitle info in navigation screens).
At any rate, I'm NOT a C++ programmer, and GIT is a wilderness to me. I was lucky to pull the clone and work from there and figure out how to compile it ...
At any rate, here's what I modified -- does this look useful? If so, can someone perhaps guide me through the Git wilderness, or just claim this code for themselves and put it into the
This DOES seem to work OK -- it works for movies and TV shows. Of course, it adds a new variable to the rules so the wiki's would need updating, and I'm not sure if I violated any rules about where the string got added in strings.po or anything.
I'm willing to learn, but I find this addition to be VERY useful. If I could figure out how to get this back into Gotham (which is what I'm using on my chromeboxes) -- I'd do it in a heartbeat.
xbmc/addons/resource.language.en_gb/resources/strings.po
Code:
12601c12601,12606
< #empty strings from id 21481 to 21601
---
> #: xbmc/playlist/SmartPlayList.cpp
> msgctxt "#21481"
> msgid "Audio Track Count"
> msgstr ""
>
> #empty strings from id 21482 to 21601
xbmc/utils/DatabaseUtils.h
Code:
61a62
> FieldAudioCount,
xbmc/playlists/SmartPlayList.cpp
Code:
105a106
> { "audiocount", FieldAudioCount, CDatabaseQueryRule::NUMERIC_FIELD, NULL, false, 21481 },
432a434
> fields.push_back(FieldAudioCount);
852a855,856
> else if (m_field == FieldAudioCount)
> query = negate + " EXISTS (SELECT 1 FROM streamdetails WHERE streamdetails.idFile = " + table + ".idFile AND streamdetails.iStreamType=1 GROUP BY streamdetails.idFile HAVING COUNT(streamdetails.iStreamType) " + parameter + ")";