Database view is fully translatable and entries can be voiced.

* All tagnavi.config entries pulled into language files
 * Database viewer looks up LANG_IDs from the entries
 * If we find a match, we can translate and voice these entries
 * Add (disabled) mechanism to allow voicing database metadata

Original patch by Paul Sauro
Modifications by William Wingus
Further modifications by Solomon Peachy

Todo/Problems:

 * Current Tagnavi headers are rather awkward in English
 * Can't voice the "By first letter" alphabetic entries
 * No mechanism for generating talk clips for DB metadata

Change-Id: Ic276ccda1bd8aae550d38be852bae4c6f697cd47
This commit is contained in:
Paul Sauro 2024-09-17 16:43:56 +02:00 committed by William Wilgus
parent 3b850e0c6f
commit fa5d2f3edf
5 changed files with 996 additions and 42 deletions

View file

@ -8,6 +8,9 @@
# If you only want to add menus and don't need to modify the default
# ones, you can edit "/.rockbox/tagnavi_custom.config" instead, which
# is included by this file and will not be overwritten automatically.
#
# Please note that modifying any menu labels/titles may result in them
# not being translated or voiced.
# Basic format declarations
%format "fmt_title" "%s - %02d:%02d (%s)" basename Lm Ls filename ? title == "[Untagged]"
@ -26,20 +29,20 @@
%include "/.rockbox/tagnavi_custom.config"
#
# === Begin of "A to Z" sub menus
# === Begin of "First Letter" sub menus
#
# Define the A to Z Artist sub menu
%byfirstletter "custom_artist" "Artist A to Z" "canonicalartist"
# Define the A to Z album sub menu
%byfirstletter "custom_album" "Album A to Z" "album"
# Define the A to Z track sub menu
%byfirstletter "custom_track" "Track A to Z" "title"
# Define the First Letter Artist sub menu
%byfirstletter "custom_artist" "Artists by First Letter" "canonicalartist"
# Define the First Letter album sub menu
%byfirstletter "custom_album" "Albums by First Letter" "album"
# Define the First Letter track sub menu
%byfirstletter "custom_track" "Tracks by First Letter" "title"
# ^ An empy line ends the menu
# Define the A to Z sub menu
%menu_start "a2z" "A to Z..."
# Define the First Letter sub menu
%menu_start "a2z" "By First Letter..."
"Artists" ==> "custom_artist"
"Albums" ==> "custom_album"
"Tracks" ==> "custom_track"
@ -54,24 +57,24 @@
"Album Artist" -> albumartist ? albumartist ~ "" -> album -> title = "fmt_title"
"Album" -> album ? album ~ "" -> title = "fmt_title"
"Title" -> title = "fmt_title" ? title ~ ""
"Album by year" -> album ? year = "" -> title = "fmt_title"
"Artist between years" -> canonicalartist ? year >= "" & year <= "" -> album -> title = "fmt_title"
"Album between years" -> album ? year >= "" & year <= "" -> title = "fmt_title"
"Albums by Year" -> album ? year = "" -> title = "fmt_title"
"Albums between Years" -> album ? year >= "" & year <= "" -> title = "fmt_title"
"Artists between Years" -> canonicalartist ? year >= "" & year <= "" -> album -> title = "fmt_title"
"Filename" -> filename ? filename ~ ""
"Score" -> title = "fmt_score" ? autoscore > ""
"User Rating" -> title = "fmt_rating" ? rating > ""
"Comment" -> album ? comment ~ "" -> title = "fmt_title"
# Define the "same as current" sub menu
%menu_start "same" "Same as current"
# Define the "Same as currently played track" sub menu
%menu_start "same" "Same as currently played track"
"Directory" -> title ? filename ^ "#directory#"
"Title" -> title = "fmt_title" ? title = "#title#"
"Artist" -> album ? artist = "#artist#" | artist = "#albumartist#" | albumartist = "#artist#" | albumartist = "#albumartist#" -> title = "fmt_title"
"Artist" -> album ? artist = "#artist#" | artist = "#albumartist#" | albumartist = "#artist#" | albumartist = "#albumartist#" -> title = "fmt_title"
"Album" -> title = "fmt_title" ? album = "#album#"
"Composer" -> title = "fmt_title" ? composer = "#composer#"
# Define the runtime sub menu
%menu_start "runtime" "Play history"
%menu_start "runtime" "Playback History"
"Most played (Plays|Score)" -> title = "fmt_mostplayed" ? playcount > "0"
"Recently played tracks" -> title = "fmt_lastplayed" ? playcount > "0"
"Never played tracks" -> canonicalartist ? playcount == "0" -> album -> title = "fmt_title"
@ -85,7 +88,7 @@
%menu_start "track" "Tracks by"
"Filename" -> basename
"Title" -> title
"Title mm:ss" -> title = "fmt_alphanum_title"
"Title (with track duration)" -> title = "fmt_alphanum_title"
#
# === Begin of main menu
@ -99,15 +102,15 @@
"Genre" -> genre -> canonicalartist -> album -> title = "fmt_title"
"Year" -> year ? year > "0" -> canonicalartist -> album -> title = "fmt_title"
"Composer" -> composer -> album -> title = "fmt_title"
"A to Z" ==> "a2z"
"Track" ==> "track"
"First Letter" ==> "a2z"
"Tracks by" ==> "track"
"Shuffle Songs" ~> title = "fmt_title"
"Search" ==> "search"
"User Rating" -> rating -> title = "fmt_title"
"Recently Added" -> album ? entryage < "4" & commitid > "0" -> title = "fmt_title"
"History" ==> "runtime"
"Same as current" ==> "same"
"Custom view" ==> "custom"
"Playback History" ==> "runtime"
"Same as currently played track" ==> "same"
"Custom menu" ==> "custom"
# And finally set main menu as our root menu
%root_menu "main"