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

Put the More (discover/collection) item at the end #20

Closed
wants to merge 1 commit into from

Conversation

hufman
Copy link
Contributor

@hufman hufman commented Dec 9, 2023

It seems the Mopidy-Iris frontend sorts by the name of the entry so this adds a whitespace character to make the More entry sort at the end of the list.

It seems the Mopidy-Iris frontend sorts by the name of the entry
so this adds a whitespace character to make the More entry
sort at the end of the list.
@orontee
Copy link

orontee commented Dec 10, 2023

Please don't do that! There are other frontends: Don't introduce Iris specific tweaks in backends!

AFAICS Argos handles this properly (by the way I don't remember writing any specific code for this):

image

@hufman As you can see below, "More..." is a directory ref, not an album ref. Argos just but albums before directories in the store used to display the library view...

# Browse Bandcamp directory
POST http://argos.local/mopidy/rpc
Content-Type: application/json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "core.library.browse",
  "params": {
    "uri": "bandcamp:genre:electronic"
  }
}

...
    {
      "__model__": "Ref",
      "uri": "bandcamp:album:1455861166-950420894",
      "name": "Amaliah - Manifold EP (Album)",
      "type": "album"
    },
    {
      "__model__": "Ref",
      "uri": "bandcamp:genre:electronic:1",
      "name": "More...",
      "type": "directory"
    }
  ]
}

@hufman
Copy link
Contributor Author

hufman commented Dec 10, 2023

Very interesting! I don't see Argos packaged in Nixos, I'll work to add it, it looks slick!
From what I could tell, it looks like Argos is filtering the items into separate lists to sort them separately. It would make sense to add this logic to Iris too, though my Javascript skills aren't nearly as good as my Python skills :)
I'm new to Mopidy, is this filtering already found in all of the frontends?

@orontee
Copy link

orontee commented Dec 10, 2023

Very interesting! I don't see Argos packaged in Nixos, I'll work to add it, it looks slick!

Thanks! Feel free to open an issue on Argos repository if you need help or have questions.

From what I could tell, it looks like Argos is filtering the items into separate lists to sort them separately.

Exactly.

It would make sense to add this logic to Iris too, though my Javascript skills aren't nearly as good as my Python skills :) I'm new to Mopidy, is this filtering already found in all of the frontends?

Why not open an issue in Iris repository? For other frontends I've no idea. While developing Argos I wanted to have something as generic as possible, thus I had to face such problems of possibly heterogeneous response while browsing library. Nothing wrong for others to focus on different things.

@hufman
Copy link
Contributor Author

hufman commented Dec 15, 2023

Hopefully they accept: jaedb/Iris#936

@hufman hufman closed this Dec 15, 2023
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.

2 participants