Skip to content

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

Closed
hufman wants to merge 1 commit into
impliedchaos:masterfrom
hufman:more_sorted_end
Closed

Put the More (discover/collection) item at the end#20
hufman wants to merge 1 commit into
impliedchaos:masterfrom
hufman:more_sorted_end

Conversation

@hufman

@hufman hufman commented Dec 9, 2023

Copy link
Copy Markdown
Contributor

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

orontee commented Dec 10, 2023

Copy link
Copy Markdown
Collaborator

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

hufman commented Dec 10, 2023

Copy link
Copy Markdown
Contributor Author

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

orontee commented Dec 10, 2023

Copy link
Copy Markdown
Collaborator

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

hufman commented Dec 15, 2023

Copy link
Copy Markdown
Contributor Author

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