How to create subdirectories for each disc for multi-disc albums? #229
-
Kinda following from #226 I am trying to create a subdirectory for each disc for multi-disc albums but I am not sure how to do this. Using an f-string in So I tried writing a plugin to do this (https://github.com/ali-ramadhan/moe-plugins/blob/d4df04ec438b763829a1cf588f0fbf1ff62d44c1/disc_and_track.py) which returns strings like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Hmm, I think I see the issue more clearly now. So our current process for evaluating path templates is:
You want a way to introduce new path parts on step 2. The functionality you're asking for is not currently supported, but it is something I would like to support and I think is a reasonable request, I just need to figure out the best way to do so. One option that comes to mind would be to create a hook that allows plugins to edit the path template prior to it being split into parts. This hook would then return an f-string with programmatically placed Does that seem like it would work for you? Or do you have any other suggestions? I'm open to changing the process entirely if it makes sense to do so. |
Beta Was this translation helpful? Give feedback.
-
Going back to your original question, does something like this do what you want? def format_disc_dir(track, album):
if album.disc_total == 1:
return ""
elif album.disc_total <= 9:
return "Disc {track.disc:1d}"
elif album.disc_total <= 99:
return "Disc {track.disc:02}"
elif album.disc_total <= 999:
return "Disc {track.disc:03d}" then your track path configuration would be: If not, I'm a bit confused what you want, because the default path already splits tracks into separate disc directories. |
Beta Was this translation helpful? Give feedback.
Going back to your original question, does something like this do what you want?
then your track path configuration would be:
"{disc_and_track(track, album)}/{track.title}"
If not, I'm a bit confused what you want, because the default path already splits tracks into separate disc directories.