Stable: 2.5.2
Development: 2.6-alpha3
mocp version: 2.6-alpha3
What I did:
[tt]mocp -S[/tt]
[tt]echo -e "cccc.mp3\nbbbb.mp3\ndddd.mp3\naaaa.mp3" >tempfile.m3u[/tt]
[tt]mocp --clear --append tempfile.m3u[/tt]
What I expected:
if I summon the client, I should see in the playlist the same files as [tt]cat tempfile.m3u[/tt]] in the same order. [tt]mocp --play[/tt] should play the music file on the first line of tempfile.m3u: cccc.mp3
What I saw instead:
The playlist sorted the lines of tempfile.m3u before adding them: the order is now aaaa.mp3, bbbb.mp3, cccc.mp3, dddd.mp3. [tt]mocp --play[/tt] starts aaaa.mp3.
Other information:
If I leave the playlist empty, start [tt]mocp[/tt] and navigate to tempfile.m3u and hit 'enter' to add it to the playlist, the lines are not sorted.
Mozai
Wed, 2025-07-23 16:07
Permalink
derp
Derp, I assumed [tt] was a valid BBCode tag. Should've used [code]
Mozai
Wed, 2025-07-23 16:18
Permalink
Workaround
Workaround
But this is really slow, like 1 second per twenty items, which may not seem like much when the media files are 120-240 seconds in duration each, but it doesn't have to be this way: --append could just append the m3u contents without mutating it first.
tomaszg
Wed, 2025-07-23 21:55
Permalink
It seems it is a known
It seems it is a known problem: 481 with no solution short of making a trivial change in code and recompiling. I agree that in principle MOC probably shouldn't sort the playlist. There should be, on the other hand, a possibility to sort it inside MOC by some criterium. You can do it manually but that would be annoying in the long run.