Merge pull request #1517 from 1hitsong/sortByRandom

Add Random sorting to supported libraries
This commit is contained in:
1hitsong 2023-12-29 09:08:31 -05:00 committed by GitHub
commit 7e3a23467f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 3 deletions

View File

@ -256,7 +256,8 @@ sub setMoviesOptions(options)
{ "Title": tr("OFFICIAL_RATING"), "Name": "OfficialRating" }, { "Title": tr("OFFICIAL_RATING"), "Name": "OfficialRating" },
{ "Title": tr("PLAY_COUNT"), "Name": "PlayCount" }, { "Title": tr("PLAY_COUNT"), "Name": "PlayCount" },
{ "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" }, { "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" },
{ "Title": tr("RUNTIME"), "Name": "Runtime" } { "Title": tr("RUNTIME"), "Name": "Runtime" },
{ "Title": tr("Random"), "Name": "Random" },
] ]
options.filter = [ options.filter = [
{ "Title": tr("All"), "Name": "All" }, { "Title": tr("All"), "Name": "All" },
@ -275,6 +276,7 @@ sub setBoxsetsOptions(options)
{ "Title": tr("DATE_ADDED"), "Name": "DateCreated" }, { "Title": tr("DATE_ADDED"), "Name": "DateCreated" },
{ "Title": tr("DATE_PLAYED"), "Name": "DatePlayed" }, { "Title": tr("DATE_PLAYED"), "Name": "DatePlayed" },
{ "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" }, { "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" },
{ "Title": tr("Random"), "Name": "Random" },
] ]
options.filter = [ options.filter = [
{ "Title": tr("All"), "Name": "All" }, { "Title": tr("All"), "Name": "All" },
@ -299,6 +301,7 @@ sub setTvShowsOptions(options)
{ "Title": tr("DATE_PLAYED"), "Name": "DatePlayed" }, { "Title": tr("DATE_PLAYED"), "Name": "DatePlayed" },
{ "Title": tr("OFFICIAL_RATING"), "Name": "OfficialRating" }, { "Title": tr("OFFICIAL_RATING"), "Name": "OfficialRating" },
{ "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" }, { "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" },
{ "Title": tr("Random"), "Name": "Random" },
] ]
options.filter = [ options.filter = [
{ "Title": tr("All"), "Name": "All" }, { "Title": tr("All"), "Name": "All" },
@ -345,6 +348,7 @@ sub setMusicOptions(options)
{ "Title": tr("DATE_ADDED"), "Name": "DateCreated" }, { "Title": tr("DATE_ADDED"), "Name": "DateCreated" },
{ "Title": tr("DATE_PLAYED"), "Name": "DatePlayed" }, { "Title": tr("DATE_PLAYED"), "Name": "DatePlayed" },
{ "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" }, { "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" },
{ "Title": tr("Random"), "Name": "Random" },
] ]
options.filter = [ options.filter = [
{ "Title": tr("All"), "Name": "All" }, { "Title": tr("All"), "Name": "All" },

View File

@ -253,7 +253,8 @@ sub setMoviesOptions(options)
{ "Title": tr("OFFICIAL_RATING"), "Name": "OfficialRating" }, { "Title": tr("OFFICIAL_RATING"), "Name": "OfficialRating" },
{ "Title": tr("PLAY_COUNT"), "Name": "PlayCount" }, { "Title": tr("PLAY_COUNT"), "Name": "PlayCount" },
{ "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" }, { "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" },
{ "Title": tr("RUNTIME"), "Name": "Runtime" } { "Title": tr("RUNTIME"), "Name": "Runtime" },
{ "Title": tr("Random"), "Name": "Random" },
] ]
options.filter = [ options.filter = [
@ -272,7 +273,7 @@ sub setMoviesOptions(options)
if m.options.view = "Studios" or m.view = "Studios" if m.options.view = "Studios" or m.view = "Studios"
options.sort = [ options.sort = [
{ "Title": tr("TITLE"), "Name": "SortName" }, { "Title": tr("TITLE"), "Name": "SortName" },
{ "Title": tr("DATE_ADDED"), "Name": "DateCreated" }, { "Title": tr("DATE_ADDED"), "Name": "DateCreated" }
] ]
options.filter = [ options.filter = [
{ "Title": tr("All"), "Name": "All" }, { "Title": tr("All"), "Name": "All" },

View File

@ -228,6 +228,7 @@ sub setMusicOptions(options)
{ "Title": tr("DATE_ADDED"), "Name": "DateCreated" }, { "Title": tr("DATE_ADDED"), "Name": "DateCreated" },
{ "Title": tr("DATE_PLAYED"), "Name": "DatePlayed" }, { "Title": tr("DATE_PLAYED"), "Name": "DatePlayed" },
{ "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" }, { "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" },
{ "Title": tr("Random"), "Name": "Random" },
] ]
options.filter = [ options.filter = [
@ -238,6 +239,7 @@ sub setMusicOptions(options)
if LCase(m.options.view) = "genres" or LCase(m.view) = "genres" if LCase(m.options.view) = "genres" or LCase(m.view) = "genres"
options.sort = [ options.sort = [
{ "Title": tr("TITLE"), "Name": "SortName" }, { "Title": tr("TITLE"), "Name": "SortName" },
{ "Title": tr("Random"), "Name": "Random" },
] ]
options.filter = [] options.filter = []
end if end if
@ -246,6 +248,7 @@ sub setMusicOptions(options)
options.sort = [ options.sort = [
{ "Title": tr("TITLE"), "Name": "SortName" }, { "Title": tr("TITLE"), "Name": "SortName" },
{ "Title": tr("DATE_ADDED"), "Name": "DateCreated" }, { "Title": tr("DATE_ADDED"), "Name": "DateCreated" },
{ "Title": tr("Random"), "Name": "Random" },
] ]
end if end if
end sub end sub

View File

@ -1246,5 +1246,10 @@
<translation>What's New?</translation> <translation>What's New?</translation>
<extracomment>Popup title - Popup displays all the major changes to the app since the last version</extracomment> <extracomment>Popup title - Popup displays all the major changes to the app since the last version</extracomment>
</message> </message>
<message>
<source>Random</source>
<translation>Random</translation>
<extracomment>General use word when we want to randomize data</extracomment>
</message>
</context> </context>
</TS> </TS>