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

Alphanumeric sort for Music-Library & Database #421

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hasezoey
Copy link
Contributor

This PR changes the sort for the Music-Library (file explorer) and the Database views (Criteria and Tracks) to be Alphanumerically sorted instead of Lexicographical.

Example current master (lexicographical):
lex

Example with this PR (alphanumeric):
alphanum

fixes #417
re #138


@Sporarum could you test this PR?

@Sporarum
Copy link

I wasn't able to build locally

I can look at it more tomorrow, here's how far I went (NixOS):

> nix shell nixpkgs#gnumake nixpkgs#cargo nixpkgs#rustfmt // starts a development shell with the given packages
> make
[Bunch of Downloaded/Compiling/Checking messages]
error: linker `cc` not found

In other words, I still need to find the package that gives me a cc in scope

@Sporarum
Copy link

Sporarum commented Jan 28, 2025

@hasezoey I confirm that it does work on my original example !
It was only with latin text without even diacritics however (and the heart character).
And I do not currently have music which uses a more diverse character set, so someone else would have to test that

For future reference, here is the nix shell I used:

nix-shell -p gnumake cargo rustfmt gcc pkg-config openssl.dev alsa-lib.dev glib.dev gst_all_1.gstreamer protobuf rustPlatform.bindgenHook clippy

(There's probably a shorter one that would work)

It "fails" at the end with

cp -f target/release/termusic "/home/qube/.local/share/cargo/bin"
cp: cannot create regular file '/home/qube/.local/share/cargo/bin': No such file or directory
make: *** [Makefile:62: post] Error 1

This is a good thing actually, it means it won't install the version it just build (which would be imperative, i.e. opposed to the nix way of doing things)
To test that it did work, run

target/release/termusic

@hasezoey
Copy link
Contributor Author

This is a good thing actually, it means it won't install the version it just build (which would be imperative, i.e. opposed to the nix way of doing things)

For reference, you can also just do a raw cargo build && ./target/debug/termusic command (you could also do cargo run, but that would only build one binary, but server & tui are required)

And I do not currently have music which uses a more diverse character set, so someone else would have to test that

I also do not have such music (or at least not any that needs special sorting), so i just chose alphanumeric over something more complex.

Thanks for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort and play songs numerically, as opposed to alphabetically
2 participants