Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracks are always in random order #156

Closed
chrisisbd opened this issue Dec 18, 2023 · 7 comments
Closed

Tracks are always in random order #156

chrisisbd opened this issue Dec 18, 2023 · 7 comments
Labels
enhancement New feature or request translation Issue implies translations update

Comments

@chrisisbd
Copy link

I'm running version 1.12 on an xubuntu system. When I use files/media to browse albums (one per directory) on my system the tracks always appear in random order. Is there any way to get them sorted so I can then play them in track number order?

The tracks' filenames all have the track number as the first two characters, e.g.:-

01 - Drink that Mash and Talk that Trash.flac
02 - Daddy Sang Bass.flac
03 - Yonder Stands Little Maggie.flac
04 - Micking Banjo.flac
05 - Down the Road.flac
06 - I'd Like to Have Papa Show me Around.flac
07 - The Sunny Side of the Mountain.flac
08 - Roll in my Sweet Baby's Arms.flac
09 - Flatland Two Step.flac
10 - We'll Meet Again Sweetheart.flac
11 - I'm Gonna Sleep with One Eye Open.flac

@orontee
Copy link
Owner

orontee commented Dec 18, 2023

Thanks @chrisisbd for this feedback. I am a heavy user of Mopidy-Local, not Mopidy-Files; So I am not surprised that such problems exist. It should not be difficult to fix.

(...) on my system the tracks always appear in random order.

Do you mean that the order change each time you visit a given folder? Or the order change between two start of Argos? Or the order changes between two start of Mopidy?

Or the order for the tracks of a given folder is always the same but not the order you expect?

Analysis

From what I see:

  • Tracks are ordered by track name, the track number is not taken into account

  • Tracks order is the same between multiple starts of Argos and Mopidy

Here is a screenshot:

image

After a check in the implementation, tracks being ordered by name, and track number not being taken into account is what is expected: Cf. https://github.com/orontee/argos/blob/main/argos/model/model.py#L186.

Proposal

  • A button is added to toggle between multiple sort methods (by name, by track number)

  • This button is not added to the album view, since an album can have multiple discs and there are separators between discs tracks, etc.

  • This button is not added to playlist view since reordering tracks is not useful in this context.

  • ⚠️ Note that when a folder contains all tracks from a multi-disc album, whatever the sort method, tracks won't be organized by disc!

  • Note that it's not a good idea to sort by track number by default because there's no reason to expect users to organize the files handled by Mopidy-Files with one directory per album, etc.

@orontee orontee added the enhancement New feature or request label Dec 18, 2023
@orontee orontee added this to the Winter release milestone Dec 18, 2023
@orontee orontee added the translation Issue implies translations update label Dec 18, 2023
@orontee
Copy link
Owner

orontee commented Dec 18, 2023

image

orontee added a commit that referenced this issue Dec 18, 2023
@orontee
Copy link
Owner

orontee commented Dec 18, 2023

@chrisisbd At first sight current implementation is ok. Let's see with time...

Will be in next release, hopefully before next year 😃

@orontee orontee closed this as completed Dec 18, 2023
@orontee
Copy link
Owner

orontee commented Dec 19, 2023

@chrisisbd In case you want to test it, it's available as a pre-release https://github.com/orontee/argos/releases/tag/v1.13.0-rc0

Beware that I didn't updated the application version, so it will still advertise 1.12.0...

@chrisisbd
Copy link
Author

chrisisbd commented Dec 19, 2023 via email

@chrisisbd
Copy link
Author

Yes, excellent, just what I want. Thank you very much. :-)

If you need any more testing etc. I'd be very happy to help. I run a mix of xubuntusystems (laptop and desktop) and sundry Raspberry Pis and Beaglebone Blacks. I'm a retired software engineer, mostly assembler and C (I started in the early 1970s). Most of my coding is in Python now though for hobby applications on the BBB and Pi.

@orontee
Copy link
Owner

orontee commented Dec 19, 2023

@chrisisbd I was born in the 70s! I don't have identified important new feature to implement in Argos, and it is really stable right now, but there'll be maintenance to perform, and help is welcome for this! I've changed of job at the beginning of the month, and I guess I'll have less time left for hacking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request translation Issue implies translations update
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants