Score:1

File Organization in Rhythmbox: Disc Number in front of Track Number

cn flag

I recently installed the File Organizer Plugin for Rhythmbox music player and organizer for GNOME.

Now when I try to setup the organization of my music under Preferences > Music > Library Structure I get the following settings for File name and Folder hierarchy

enter image description here

which is precisely what I would like except that if I have albums made up by more than one disc I would like the File Organizer to prepend the disc number to the name, like

../Help!/01-07 - Ticket To Ride.m4a 

Weirdly I can insert the disc number to the music file metadata

enter image description here

But I can't set it as a parameter in Library Structure

enter image description here

I don't like the solution someone proposd to change the Album name so that it includes the disc number, since it is a meta information one should be able to use it as file name formatter. If there is a workaround by editing python codes or some guides that could help me anything is welcome. Thanks for your time.

More infos:

$ rhythmbox --version
rhythmbox 3.4.4
$ lsb_release -a
Description:    Ubuntu 20.04.3 LTS
Codename:   focal
Score:0
cn flag

I found a "so-so" solution (meaning it is not completely satisfying). Using the dconf-editor tool, inspired by this discussion I managed to find the layout-filename setting (under /org/gnome/rhythmbox/library/layout-filename) and changed from the default value

%tN - %tt

to

%aN-%tN - %tt

which gives somehow what I wanted, since the format specifier %aN stands for the

%aN -- album disc number, zero padded

key, sadly this prepends to albums with no disc number the awful looking "00" disc number

Ok behavior

enter image description here

Non ok behavior

enter image description here

I think at this point the only needed feature is to conditionally prepend the %aN formatte only if the number is not 00.

vanadium avatar
cn flag
That would make for a valid issue request to the developpers. An alternative workaround - which actually makes sense in the digital world where there is no CD 1 and CD 2, would be to number your tracks incrementally for subsequent disk.
BeastOfCaerbannog avatar
ca flag
After renaming the files in your library using the File Organizer Plugin, you could perhaps run a script to remove `00-` from the files in your library that use it. You could use for example something like this with `find` and Perl `rename` from within your library: `find . -type f -name "00-*" -exec rename -n 's/00-//' {} \;` (`-n` is used to preview the changes; remove it to apply them).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.