pytagsfs doesn't perform variable substitution in else clauses of format strings
Bug #259928 reported by
Forest Bond
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytagsfs |
Fix Released
|
Undecided
|
Forest Bond |
Bug Description
for example, let's try to mount directory which contains files without "title" tag.
$ pytagsfs -o format=
$ ls foo
%(filename)s
$ file foo/%\(filename\)s
foo/%(filename)s: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 10880940 samples
this is not expected behaviour.
im just wanna see original file names, if no title tag present.
maybe im doing something wrong?
To post a comment you must log in.
I have re-written the substitution string code, and will have this resolved soon, I hope. The complication is that allowing variable expansion in else clauses opens up the possibility of ambiguous results from splitting paths. For instance, with a format string like:
%?%{artist} %:%{composer} %?
If we rename a file from "foo" to "bar", should that affect the artist or composer tag?
Here are the options:
* Always affect the tag in the "if" clause.
* Always affect the tag in the "else" clause.
* Change the one that is currently being used. I.e., if the artist is "foo" and rename the file to "bar", set the artist tag to "bar". However, if the artist tag is not set but the composer is "foo", set the composer tag to "bar". This is obviously a little more difficult.
* Set neither and throw back an error (Invalid argument, I guess).
I'm still contemplating which option is best. Input is always appreciated.