Support and General Use > Theming and Appearance Customization
Submenus in 'New Podcasts' section?
pdedecker:
--- Quote ---You can either: (...)
--- End quote ---
I want "New podcasts" and "Archived podcasts" appear in the main menu. Is that possible?
--- Quote ---On second reading, I think you may mean that the code you posted is your whole tagnavi.config code?
--- End quote ---
No, I didn't touch tagnavi.config. The file I posted was tagnavi_custom.config.
[Edit] I changed the file based on what I've read on that page. I don't see the menus I added on my iPod so what did I do wrong this time? These are the contents of tagnavi.config. I emptied tagnavi_custom.config for now.
--- Quote ---#! rockbox/tagbrowser/2.0
# ^ Version header must be the first line of every file
# Tag Browser configuration file, do not edit as changes will be lost!
# Instead, you can modify "/.rockbox/tagnavi_custom.config" which will never
# get overwritten automatically.
# Basic format declarations
%format "fmt_title" "%02d. %s" tracknum title ? tracknum > "0"
%format "fmt_title" "%s" title
%format "fmt_mostplayed" "(%3d) %s - %s" playcount artist title %sort = "inverse" %limit = "100"
%format "fmt_lastplayed" "%06d%s - %s" lastplayed artist title %sort = "inverse" %limit = "99" %strip = "6"
%format "fmt_best_tracks" "%02d. %s (%3d)" tracknum title autoscore
%format "fmt_played" "(%3d/%d) %s" autoscore playcount title
%format "fmt_score" "(%3d) %s" autoscore title
# MANUALLY ADDED FORMATTING FOR PODCASTS
%format "fmt_podcast" "%08d%s (%s)" length title filename %strip = "8"
%format "fmt_podcast_old" "%06d%s (%s)" lastplayed title filename %sort = "inverse" %strip = "6"
# END OF EDIT
# Include our custom menu
%include "/.rockbox/tagnavi_custom.config"
#
# === Begin of "Search by..." sub menu
#
# Define the search sub menu
%menu_start "search" "Search by..."
"Artist" -> artist ? artist ~ "" -> album -> title = "fmt_title"
"Album" -> album ? album ~ "" -> title = "fmt_title"
"Title" -> title ? title ~ ""
"Filename" -> filename ? filename ~ ""
"Score" -> title = "fmt_score" ? autoscore > ""
# ^ An empy line ends the menu
#
# === Begin of main menu
#
# Define the title of the main menu
%menu_start "main" "Browse by..."
"Artist" -> artist -> album -> title = "fmt_title"
"Album" -> album -> title = "fmt_title"
"Genre" -> genre -> artist -> album -> title = "fmt_title"
"Composer" -> composer -> album -> title = "fmt_title"
"Track" -> title
"Year" -> year ? year > "1000" & year < "2008" -> artist -> album -> title = "fmt_title"
"Search..." ==> "search"
"New podcasts" ==> "newPods"
"Archived podcasts" ==> "oldPods"
"Most played tracks" -> title = "fmt_mostplayed" ? playcount > "0"
"Last played tracks" -> title = "fmt_lastplayed" ? playcount > "0"
"Never played tracks" -> artist ? playcount == "0" -> album -> title = "fmt_title"
"Best tracks" -> artist ? playcount > "1" & autoscore > "85" -> album -> title = "fmt_best_tracks"
"List played tracks" -> title = "fmt_played" ? playcount > "0"
"Custom view..." ==> "custom"
# START OF EDIT
%menu_start "newPods" "New podcasts"
"Comedy Package" -> album ? filename ~ "/Podcasts/- Comedy Package - A PodShow Channel" & playcount == "0" -> title = "fmt_podcast"
"Technology Package" -> album ? filename ~ "/Podcasts/- Technology Package - A PodShow Channel" & playcount == "0" -> title = "fmt_podcast"
"Music Package" -> album ? filename ~ "/Podcasts/- Music Package - A PodShow Channel" & playcount == "0" -> title = "fmt_podcast"
%menu_start "oldPods" "Archived podcasts"
"Comedy Package" -> album ? filename ~ "/Podcasts/- Comedy Package - A PodShow Channel" & playcount != "0" -> title = "fmt_podcast_old"
"Technology Package" -> album ? filename ~ "/Podcasts/- Technology Package - A PodShow Channel" & playcount != "0" -> title = "fmt_podcast_old"
"Music Package" -> album ? filename ~ "/Podcasts/- Music Package - A PodShow Channel" & playcount != "0" -> title = "fmt_podcast_old"
# END OF EDIT
# And finally set main menu as our root menu
%root_menu "main"
--- End quote ---
bascule:
It's because the sub-menus are after the main menu in the file...
--- Quote from: http://www.rockbox.org/twiki/bin/view/Main/WebHome?topic=DataBase ---The order of the different sections in the file is crucial because the file is interpreted whilst loading in the order in which it is written. The order should generally follow the list below. The important point is that for a line to display, all of it's contents should have previously been defined. E.g., if a main menu item points to a sub-menu, then the sub-menu must be defined in the file prior to the main menu.
--- End quote ---
pdedecker:
I changed it:
--- Quote ---#! rockbox/tagbrowser/2.0
# ^ Version header must be the first line of every file
# Tag Browser configuration file, do not edit as changes will be lost!
# Instead, you can modify "/.rockbox/tagnavi_custom.config" which will never
# get overwritten automatically.
# Basic format declarations
%format "fmt_title" "%02d. %s" tracknum title ? tracknum > "0"
%format "fmt_title" "%s" title
%format "fmt_mostplayed" "(%3d) %s - %s" playcount artist title %sort = "inverse" %limit = "100"
%format "fmt_lastplayed" "%06d%s - %s" lastplayed artist title %sort = "inverse" %limit = "99" %strip = "6"
%format "fmt_best_tracks" "%02d. %s (%3d)" tracknum title autoscore
%format "fmt_played" "(%3d/%d) %s" autoscore playcount title
%format "fmt_score" "(%3d) %s" autoscore title
# Include our custom menu
%include "/.rockbox/tagnavi_custom.config"
#
# === Begin of "Search by..." sub menu
#
# Define the search sub menu
%menu_start "search" "Search by..."
"Artist" -> artist ? artist ~ "" & filename !~ "/Podcasts/" & filename !~ "/Other/" -> album -> title = "fmt_title"
"Album" -> album ? album ~ "" & filename !~ "/Podcasts/" -> title = "fmt_title"
"Title" -> title ? title ~ "" & filename !~ "/Podcasts/"
"Filename" -> filename ? filename ~ "" & filename !~ "/Podcasts/"
"Score" -> title = "fmt_score" ? autoscore > "" & filename !~ "/Podcasts/"
# START OF EXTRA MENUS
%menu_start "newPods" "New podcasts"
"Comedy Package" -> album ? filename ~ "/Podcasts/- Comedy Package - A PodShow Channel" & playcount == "0" -> title = "fmt_podcast"
"Technology Package" -> album ? filename ~ "/Podcasts/- Technology Package - A PodShow Channel" & playcount == "0" -> title = "fmt_podcast"
"Music Package" -> album ? filename ~ "/Podcasts/- Music Package - A PodShow Channel" & playcount == "0" -> title = "fmt_podcast"
%menu_start "oldPods" "Archived podcasts"
"Comedy Package" -> album ? filename ~ "/Podcasts/- Comedy Package - A PodShow Channel" & playcount != "0" -> title = "fmt_podcast_old"
"Technology Package" -> album ? filename ~ "/Podcasts/- Technology Package - A PodShow Channel" & playcount != "0" -> title = "fmt_podcast_old"
"Music Package" -> album ? filename ~ "/Podcasts/- Music Package - A PodShow Channel" & playcount != "0" -> title = "fmt_podcast_old"
# END OF EXTRA MENUS
# ^ An empy line ends the menu
#
# === Begin of main menu
#
# Define the title of the main menu
%menu_start "main" "Rockbox Database"
"Artist" -> artist ? filename !~ "/Podcasts/" & filename !~ "/Other/" -> album -> title = "fmt_title"
"Album" -> album ? filename !~ "/Podcasts/" & filename !~ "/Other/" -> title = "fmt_title"
"Genre" -> genre ? filename !~ "/Podcasts/" & filename !~ "/Other/" -> artist -> album -> title = "fmt_title"
"Composer" -> composer ? filename !~ "/Podcasts/" & filename !~ "/Other/" -> album -> title = "fmt_title"
"Track" -> title ? filename !~ "/Podcasts/" & filename !~ "/Other/"
"Year" -> year ? year > "1000" & year < "2008" & filename !~ "/Podcasts/" & filename !~ "/Other/" -> artist -> album -> title = "fmt_title"
"Search..." ==> "search"
"Most played tracks" -> title = "fmt_mostplayed" ? playcount > "0" & filename !~ "/Podcasts/" & filename !~ "/Other/"
"Last played" -> title = "fmt_lastplayed" ? playcount > "0"
"Never played tracks" -> artist ? playcount == "0" & filename !~ "/Podcasts/" & filename !~ "/Other/" -> album -> title = "fmt_title"
"Best tracks" -> artist ? playcount > "1" & autoscore > "85" & filename !~ "/Podcasts/" & filename !~ "/Other/" -> album -> title = "fmt_best_tracks"
"List played" -> title = "fmt_played" ? playcount > "0"
"Last added tracks" -> artist ? entryage == "0" & filename !~ "/Podcasts/" & filename !~ "/Other/" -> album -> title = "fmt_title"
"Custom view..." ==> "custom"
# And finally set main menu as our root menu
%root_menu "main"
--- End quote ---
It still doesn't work. Why? :)
bascule:
You have not actually placed a call to the new menus in the Main menu. You will need the following lines added:
--- Quote ---"Album" -> album ? filename !~ "/Podcasts/" & filename !~ "/Other/" -> title = "fmt_title"
"New podcasts" ==> "newPods"
"Archived podcasts" ==> "oldPods"
"Genre" -> genre ? filename !~ "/Podcasts/" & filename !~ "/Other/" -> artist -> album -> title = "fmt_title"
--- End quote ---
You also haven't defined your podcast display format strings:
"fmt_podcast" and "fmt_podcast_old" appear, but are not described in the formatting section at the beginning of the file.
I know this is design decision you have made, but it really would be easier to leave the tagnavi.config alone and just put it all in the tagnavi_custom.config. What you are doing will work, but it makes it more confusing and you are at risk of losing it all if you upgrade your build without taking a copy of the .config file.
pdedecker:
--- Quote from: bascule on March 15, 2007, 04:45:58 AM ---You have not actually placed a call to the new menus in the Main menu.
--- End quote ---
Crap, I'm such an idiot. Now, I see the menus and they work as desired, but the playcounts don't update. That of course causes the "Archived podcasts" menu to stay empty (I can see the categories though). It's exactly the same with my music since my "Last played" playlist is empty. Did I, perhaps, forget to enable some option?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version