New path format function %ifeq{leftarg,rightarg,trueval, falseval}

42 views
Skip to first unread message

Peter Schnebel

unread,
Feb 28, 2013, 5:41:28 AM2/28/13
to beets...@googlegroups.com
Hi.

How do you feel about adding a new path format function to compare two values.

Use case:  I want to put files for releases with multiple discs in different subfolders.  e.g.

Cure, The/Kiss Me Kiss Me Kiss Me/Disc01/
Cure, The/Kiss Me Kiss Me Kiss Me/Disc02/

But for single discs I don't want a subfolder. e.g.

Cure, The/Wild Mood Swings/

For testing I added a template ifeq to beets/library.py.  Now adding this:

  %ifeq{$disctotal,01,,/Disc$disc}

to my path format does what I want.  Should I go ahead and commit my changes or is this not desired?

Peter

Peter Schnebel

unread,
Feb 28, 2013, 10:07:14 AM2/28/13
to beets...@googlegroups.com
Hi.

Ok, I just found the inline plugin which seems to solve both my problems.  So I guess none of this is required :)

Peter



Peter

--
You received this message because you are subscribed to the Google Groups "beets" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beets-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Adrian Sampson

unread,
Feb 28, 2013, 12:56:00 PM2/28/13
to beets...@googlegroups.com
Cool; glad you found the inline plugin.

But, in case anyone else is interested, I'm not opposed to adding more built-in functions so that more complex things can be done without the inline plugin. For this one in particular, though, I might prefer adding a set of conditions (%eq, %greater, etc.) that produce a boolean to be used with %if.
Reply all
Reply to author
Forward
0 new messages