Merge pull request #691 from RastislavTuranyi/add_search_by_tags
Add ability to search by #TAGS
This commit is contained in:
2 files changed
+14
-1
No files matched your search
@@ -155,7 +155,7 @@
|
||||
<string name="TR_SCREENSONG_NUMSONG">(%v song)</string>
|
||||
<string name="TR_SCREENSONG_ARTIST_TITLE">%a - %t</string>
|
||||
<string name="TR_SCREENSONG_HELPMESSAGE">A-Z = Jump to the letter • F3 = Search • CTRL+R = Random selection • CTRL+S = Start medley • CTRL+# = Change song sorting • CTRL+T = Enable/Disable category view • Space = Open song options • ESC = Back to main menu</string>
|
||||
<string name="TR_SCREENSONG_HELPMESSAGESEARCH">A-Z = Search artist and title, prefixes for the search → a: = artist • t: = title • c: = creator • e: = edition • g: = genre • y: = year (e.g. 1999 or 1980-1989) • l: = language • al: = album • fi: = file name • fo: = folder name</string>
|
||||
<string name="TR_SCREENSONG_HELPMESSAGESEARCH">A-Z = Search artist and title, prefixes for the search → a: = artist • t: = title • c: = creator • e: = edition • g: = genre • y: = year (e.g. 1999 or 1980-1989) • l: = language • al: = album • fi: = file name • fo: = folder name • #: = tags</string>
|
||||
<string name="TR_SCREENSONG_HELPMESSAGEPARTY">1-6 = Press your team number to use a random song joker</string>
|
||||
<string name="TR_SCREENSONG_SORTING">Sorting: %s</string>
|
||||
<string name="TR_SCREENSONG_NOMEDLEY">No Medley for this song!</string>
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace Vocaluxe.Base
|
||||
String searchForLanguage = null; // l:
|
||||
String searchForCreator = null; // c:
|
||||
String searchForEdition = null; // e:
|
||||
String searchForTags = null; // #:
|
||||
String searchForAlbum = null; // al:
|
||||
String searchForFileName = null; // fi:
|
||||
String searchForFolderName = null; // fo:
|
||||
@@ -138,6 +139,9 @@ namespace Vocaluxe.Base
|
||||
case "E:":
|
||||
searchForEdition = searchToken.Substring(2);
|
||||
break;
|
||||
case "#:":
|
||||
searchForTags = searchToken.Substring(2);
|
||||
break;
|
||||
default:
|
||||
foundIt = false;
|
||||
break;
|
||||
@@ -231,6 +235,15 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
}
|
||||
|
||||
if (searchForTags != null)
|
||||
{
|
||||
foreach (String tag in song.Tags)
|
||||
{
|
||||
if (tag.ToUpper().Contains(searchForTags))
|
||||
_FilteredSongs.Add(song);
|
||||
}
|
||||
}
|
||||
|
||||
if (searchForYear != null)
|
||||
{
|
||||
int pos = searchForYear.IndexOf("-");
|
||||
|
||||
Reference in new issue
Block a user