Open joaquinlpereyra opened 8 years ago
Here is the screenshot, for easier navigation:
Thanks for reporting! Looks like a bug indeed.
Can you please post what mutagen-inspect
says about first track of each album?
Sure. Here you go. This information is about the albums showed on the screenshot, although the problem happens also with other artists.
~/.music ❯❯❯ mutagen-inspect Variations\ on\ a\ Theme/01\ On\ the\ Mountain\ at\ Dawn.mp3
-- Variations on a Theme/01 On the Mountain at Dawn.mp3
- MPEG 1 layer 3, 320000 bps (CBR?), 44100 Hz, 2 chn, 1278.45 seconds (audio/mp3)
APIC= (image/jpeg, 158927 bytes)
COMM=iTunNORM=eng= 00001604 00001604 0000370B 0000370B 00000000 00000000 00008000 00008000 00000000 00000000
MCDI=[unrepresentable data]
PRIV=AverageLevel='{!\x00\x00'
PRIV=PeakValue='!}\x00\x00'
PRIV=WM/MediaClassPrimaryID='\xbc}`\xd1#\xe3\xe2K\x86\xa1H\xa4*(D\x1e'
PRIV=WM/MediaClassSecondaryID='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
PRIV=WM/Provider='A\x00M\x00G\x00\x00\x00'
PRIV=WM/UniqueFileIdentifier='A\x00M\x00G\x00a\x00_\x00i\x00d\x00=\x00R\x00 \x00 \x00 \x007\x002\x006\x002\x008\x005\x00;\x00A\x00M\x00G\x00p\x00_\x00i\x00d\x00=\x00P\x00 \x00 \x00 \x006\x009\x007\x000\x000\x009\x00;\x00A\x00M\x00G\x00t\x00_\x00i\x00d\x00=\x00T\x00 \x00 \x007\x004\x007\x006\x006\x007\x005\x00\x00\x00'
PRIV=WM/WMCollectionGroupID='\xe8 \x91d@\xfe\xd6J\x9b\xf9=\xf3\x98fk\xcc'
PRIV=WM/WMCollectionID='\xe8 \x91d@\xfe\xd6J\x9b\xf9=\xf3\x98fk\xcc'
PRIV=WM/WMContentID='D\x9e\xb8\xa1\xb9\x85\x0bJ\xb1S\xd5\xdbj\xfds\xd4'
TALB=Variations on a Theme
TBPM=0
TCMP=0
TCON=Psychedelic/ Experimental Rock
TDOR=2005-02
TDRC=2005-02-15
TIT2=On the Mountain at Dawn
TLAN=eng
TLEN=1278000
TMED=CD
TPE1=Om
TPE2=Om
TPOS=1/1
TPUB=Holy Mountain
TRCK=1/3
TSOP=Om
TXXX=ALBUMARTISTSORT=Om
TXXX=ASIN=B00070Q87W
TXXX=Album Artist Credit=Om
TXXX=Artist Credit=Om
TXXX=CATALOGNUMBER=77525
TXXX=MusicBrainz Album Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Album Id=7f7bce4f-00b2-4284-8fff-50fc71c9cfe9
TXXX=MusicBrainz Album Release Country=US
TXXX=MusicBrainz Album Status=Official
TXXX=MusicBrainz Album Type=album
TXXX=MusicBrainz Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Release Group Id=99cc4789-b12d-354d-adf5-1dc8e9130f6d
TXXX=REPLAYGAIN_TRACK_GAIN=-7.51 dB
TXXX=REPLAYGAIN_TRACK_PEAK=1.000000
TXXX=Script=Latn
UFID=http://musicbrainz.org='25e42efc-5c2a-4803-852d-3c8ef973c80d'
USLT=[unrepresentable data]
~/.music ❯❯❯ mutagen-inspect Conference\ of\ the\ Birds/01\ At\ Giza.mp3
-- Conference of the Birds/01 At Giza.mp3
- MPEG 1 layer 3, 320000 bps (CBR?), 44100 Hz, 2 chn, 956.58 seconds (audio/mp3)
APIC= (image/jpeg, 6635 bytes)
COMM=iTunNORM=eng= 0000068F 0000068F 00001065 00001065 00000000 00000000 00008000 00008000 00000000 00000000
TALB=Conference of the Birds
TBPM=0
TCMP=0
TCON=Stoner/Doom
TDOR=2006-02
TDRC=2006-02-24
TIT2=At Giza
TLAN=eng
TMED=CD
TPE1=Om
TPE2=Om
TPOS=1/1
TPUB=Holy Mountain
TRCK=1/2
TSOP=Om
TXXX=ALBUMARTISTSORT=Om
TXXX=ASIN=B000EQ5QI6
TXXX=Album Artist Credit=Om
TXXX=Artist Credit=Om
TXXX=CATALOGNUMBER=5QXF3
TXXX=MusicBrainz Album Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Album Id=9be388a8-425f-46d6-b7aa-b6cafb45d655
TXXX=MusicBrainz Album Release Country=US
TXXX=MusicBrainz Album Status=Official
TXXX=MusicBrainz Album Type=album
TXXX=MusicBrainz Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Release Group Id=fa40eee0-5e14-35e5-9454-47bfb6377320
TXXX=REPLAYGAIN_TRACK_GAIN=-2.25 dB
TXXX=REPLAYGAIN_TRACK_PEAK=1.000000
TXXX=Script=Latn
UFID=http://musicbrainz.org='4436fcff-df0f-4c86-b627-19dc012e4b62'
USLT=[unrepresentable data]
~/.music ❯❯❯ mutagen-inspect Pilgrimage/01\ Pilgrimage.mp3
-- Pilgrimage/01 Pilgrimage.mp3
- MPEG 1 layer 3, 320000 bps (CBR?), 44100 Hz, 2 chn, 633.16 seconds (audio/mp3)
COMM==eng=http://buriedintheavenue.blogspot.com
TALB=Pilgrimage
TBPM=0
TCMP=0
TCOM=Om
TCON=Stoner/Doom
TDOR=2007-09
TDRC=2014-08-21
TIT2=Pilgrimage
TLAN=eng
TMED=Digital Media
TPE1=Om
TPE2=Om
TPOS=1/1
TPUB=Southern Lord
TRCK=1/4
TSOP=Om
TXXX=ALBUMARTISTSORT=Om
TXXX=Album Artist Credit=Om
TXXX=Artist Credit=Om
TXXX=MusicBrainz Album Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Album Id=1e78fbad-b12a-4747-8586-c9517b4f7946
TXXX=MusicBrainz Album Release Country=XW
TXXX=MusicBrainz Album Status=Official
TXXX=MusicBrainz Album Type=album
TXXX=MusicBrainz Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Release Group Id=39a209a5-9690-3f41-ba44-101c1f6191db
TXXX=Script=Latn
UFID=http://musicbrainz.org='f9636410-09f7-46c8-ac54-63cccfd5fa49'
USLT=[unrepresentable data]
~/.music ❯❯❯ mutagen-inspect God\ Is\ Good/01\ Thebes.mp3
-- God Is Good/01 Thebes.mp3
- MPEG 1 layer 3, 320000 bps (CBR?), 44100 Hz, 2 chn, 1147.99 seconds (audio/mp3)
MCDI=[unrepresentable data]
PRIV=AverageLevel='{\x1c\x00\x00'
PRIV=PeakValue='\xa1~\x00\x00'
PRIV=WM/MediaClassPrimaryID='\xbc}`\xd1#\xe3\xe2K\x86\xa1H\xa4*(D\x1e'
PRIV=WM/MediaClassSecondaryID='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
PRIV=WM/UniqueFileIdentifier=';\x00\x00\x00'
TALB=God Is Good
TBPM=0
TCMP=0
TCON=Kaballah Doom
TDOR=2009-09
TDRC=2009-09-29
TIT2=Thebes
TLAN=eng
TLEN=1148973
TMED=12" Vinyl
TPE1=Om
TPE2=Om
TPOS=1/1
TPUB=Drag City
TRCK=1/4
TSOP=Om
TXXX=ALBUMARTISTSORT=Om
TXXX=ASIN=B002HMCEP8
TXXX=Album Artist Credit=Om
TXXX=Artist Credit=Om
TXXX=CATALOGNUMBER=DC404
TXXX=MusicBrainz Album Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Album Id=4d62e8fb-5371-33b0-aac7-c5ab0d956329
TXXX=MusicBrainz Album Release Country=US
TXXX=MusicBrainz Album Status=Official
TXXX=MusicBrainz Album Type=album
TXXX=MusicBrainz Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Release Group Id=d071460e-9d22-4b71-b01c-41a99879795d
TXXX=Script=Latn
UFID=http://musicbrainz.org='d6d70d24-7bbf-4813-8fb8-e7cf20e6d3ff'
USLT=[unrepresentable data]
~/.music ❯❯❯ mutagen-inspect Advaitic\ Songs/01\ Addis.mp3
-- Advaitic Songs/01 Addis.mp3
- MPEG 1 layer 3, 320056 bps (CBR, LAME 3.98.1+), 44100 Hz, 2 chn, 332.51 seconds (audio/mp3)
COMM==eng=www.NewAlbumReleases.net
TALB=Advaitic Songs
TBPM=0
TCMP=0
TCON=Metal
TDOR=2012-07
TDRC=2012-07-24
TIT2=Addis
TLAN=eng
TMED=CD
TPE1=Om
TPE2=Om
TPOS=1/1
TPUB=Drag City
TRCK=1/5
TSOP=Om
TXXX=ALBUMARTISTSORT=Om
TXXX=ASIN=B0083GJ1M6
TXXX=Album Artist Credit=Om
TXXX=Artist Credit=Om
TXXX=CATALOGNUMBER=DC438CD
TXXX=MusicBrainz Album Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Album Id=b2ca4660-6230-4504-8d31-0b64da5e7cfe
TXXX=MusicBrainz Album Release Country=US
TXXX=MusicBrainz Album Status=Official
TXXX=MusicBrainz Album Type=album
TXXX=MusicBrainz Artist Id=d7a3a832-05bf-4aae-a3f7-572e298ce88d
TXXX=MusicBrainz Release Group Id=10e734e7-2b6b-4bea-bc37-a47c521e173b
TXXX=Script=Latn
UFID=http://musicbrainz.org='87bcc102-815b-4abc-be99-333adcba8d37'
USLT=[unrepresentable data]
I think here is the culprit:
~/.music ❯❯❯ mutagen-inspect Pilgrimage/01\ Pilgrimage.mp3
TDOR=2007-09
TDRC=2014-08-21
cmus uses originaldate
(TDOR
) for sorting in the tree view, and only falls back to date
(TDRC
) if it is not found. In the right pane, however, %y
(= %{date}
) format is used for dates by default, ignoring originaldate
.
It probably makes sense to use more complex format string by default, which properly mirrors the sorting criteria.
If you can give me hint of where this problem may be arising I'd love to give it a go :). As it is, the code is massive and can't really follow it not having studied it a lot.
Formatting options defaults are specified here: https://github.com/cmus/cmus/blob/master/options.c#L216
As you can see, format_statusline
is quite complex, and utilizes conditional expressions, while everything else is simple (and uses %y
directly). format_trackwin
is the one responsible for this bug (all formatting options are described in man cmus
).
I'll give it a go today. Can't promise anything, my C foo isn't strong, but I'll try!
OK, so setting the view to use %{originaldate} instead of %y didn't work. For some weird reason, cmus doesn't seem to notice any difference between the two, and all of the years stay the same.
I did notice though that settings %{maxdate} works perfectly. I haven't seem to find anything regarding what %{maxdate} actually is. The name would indicate that is the maximun date between date and original date, but there are some albums which have a lower %{maxdate} than {%originaldate} or %y, which is weird if you ask me.
I'm sending a pull request with the silly fix that worked for me, but I'm not convinced at all by this %{maxdate} issue.
If anyone else is annoyed by this, just go to cmus and type the following.
:set format_trackwin=%3n. %t%= %{maxdate} %d
fa7cb42cc4ba9f4a981636950f10ded772c9df85 should make %{originaldate}
work as intended.
1)
uname -a
:2)
cmus --version
:3)
cmus --plugins
:According to the documentation, the Tree View should sort the albums by year. This is not happening. There's a screenshot attached where you can see the problem. I've tried checking if the actual tags displayed as 'Year' on cmus are the ones on the files, and indeed they were.
Screenshot: http://i.imgur.com/dx55E98.png