Fixed track autoselect to not be so prejudiced against MP3
This commit is contained in:
parent
42eca60cfc
commit
74e433e298
1 changed files with 12 additions and 14 deletions
|
@ -248,14 +248,14 @@ namespace Mist{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found){
|
}
|
||||||
for (std::map<unsigned int,DTSC::Track>::iterator trit = myMeta.tracks.begin(); trit != myMeta.tracks.end(); trit++){
|
if (!found){
|
||||||
|
jsonForEach(*itb, itc){
|
||||||
|
for (std::map<unsigned int, DTSC::Track>::iterator trit = myMeta.tracks.begin(); trit != myMeta.tracks.end(); trit++){
|
||||||
if (trit->second.codec == (*itc).asStringRef() || (*itc).asStringRef() == "*"){
|
if (trit->second.codec == (*itc).asStringRef() || (*itc).asStringRef() == "*"){
|
||||||
genCounter++;
|
genCounter++;
|
||||||
found = true;
|
found = true;
|
||||||
if ((*itc).asStringRef() != "*"){
|
if ((*itc).asStringRef() != "*"){break;}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ namespace Mist{
|
||||||
if (selCounter + genCounter > bestSoFarCount){
|
if (selCounter + genCounter > bestSoFarCount){
|
||||||
bestSoFarCount = selCounter + genCounter;
|
bestSoFarCount = selCounter + genCounter;
|
||||||
bestSoFar = index;
|
bestSoFar = index;
|
||||||
HIGH_MSG("Match (%u/%u): %s", selCounter, selCounter+genCounter, (*it).toString().c_str());
|
HIGH_MSG("Match (%u/%u): %s", selCounter, selCounter + genCounter, (*it).toString().c_str());
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
VERYHIGH_MSG("Not a match for currently selected tracks: %s", (*it).toString().c_str());
|
VERYHIGH_MSG("Not a match for currently selected tracks: %s", (*it).toString().c_str());
|
||||||
|
@ -282,23 +282,21 @@ namespace Mist{
|
||||||
if ((*itb).size() && myMeta.tracks.size()){
|
if ((*itb).size() && myMeta.tracks.size()){
|
||||||
bool found = false;
|
bool found = false;
|
||||||
jsonForEach((*itb), itc){
|
jsonForEach((*itb), itc){
|
||||||
if (found){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
for (std::set<unsigned long>::iterator itd = selectedTracks.begin(); itd != selectedTracks.end(); itd++){
|
for (std::set<unsigned long>::iterator itd = selectedTracks.begin(); itd != selectedTracks.end(); itd++){
|
||||||
if (myMeta.tracks[*itd].codec == (*itc).asStringRef()){
|
if (myMeta.tracks[*itd].codec == (*itc).asStringRef()){
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found){
|
}
|
||||||
for (std::map<unsigned int,DTSC::Track>::iterator trit = myMeta.tracks.begin(); trit != myMeta.tracks.end(); trit++){
|
if (!found){
|
||||||
|
jsonForEach((*itb), itc){
|
||||||
|
if (found){break;}
|
||||||
|
for (std::map<unsigned int, DTSC::Track>::iterator trit = myMeta.tracks.begin(); trit != myMeta.tracks.end(); trit++){
|
||||||
if (trit->second.codec == (*itc).asStringRef() || (*itc).asStringRef() == "*"){
|
if (trit->second.codec == (*itc).asStringRef() || (*itc).asStringRef() == "*"){
|
||||||
selectedTracks.insert(trit->first);
|
selectedTracks.insert(trit->first);
|
||||||
found = true;
|
found = true;
|
||||||
if ((*itc).asStringRef() != "*"){
|
if ((*itc).asStringRef() != "*"){break;}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue