Ticket #3253: MusicSearch.patch
File MusicSearch.patch, 1.8 KB (added by , 17 years ago) |
---|
-
mythmusic/mythmusic/search.cpp
80 80 bool substringSearch = true; 81 81 bool isNumber = false; 82 82 searchText.toULongLong(&isNumber); 83 83 QString searchLimit = gContext->GetSetting("MaxSearchResults"); 84 84 searchText.replace("'", "''"); 85 85 86 86 if (!isNumber) … … 146 146 147 147 queryString += whereClause; 148 148 queryString += " ORDER BY music_artists.artist_name, album_name, name, song_id, filename "; 149 149 queryString += "LIMIT "; 150 queryString += searchLimit; 150 151 query.prepare(queryString); 151 152 152 153 bool has_entries = true; -
mythmusic/mythmusic/globalsettings.cpp
286 286 return gc; 287 287 }; 288 288 289 static HostSpinBox *SetSearchMaxResultsReturned() 290 { 291 HostSpinBox *gc = new HostSpinBox("MaxSearchResults", 0, 20000, 100); 292 gc->setLabel(QObject::tr("Maximum Search Results")); 293 gc->setValue(300); 294 gc->setHelpText(QObject::tr("Used to limit the number of results " 295 "returned when using the search feature.")); 296 return gc; 297 }; 298 289 299 static HostCheckBox *UseShowRatings() 290 300 { 291 301 HostCheckBox *gc = new HostCheckBox("MusicShowRatings"); … … 551 561 playersettings->addChild(SetPlayCountWeight()); 552 562 playersettings->addChild(SetLastPlayWeight()); 553 563 playersettings->addChild(SetRandomWeight()); 564 playersettings->addChild(SetSearchMaxResultsReturned()); 554 565 playersettings->addChild(UseShowRatings()); 555 566 playersettings->addChild(UseShowWholeTree()); 556 567 playersettings->addChild(UseListShuffled());