Coder Social home page Coder Social logo

Comments (13)

KarlStraussberger avatar KarlStraussberger commented on June 9, 2024

It depends on the upnp_class. Sorting is by upnp_class the by name to have generic containers at the top. If you use the same class everywhere, it should be fine.

from gerbera.

nobanzai avatar nobanzai commented on June 9, 2024

Did the behaviour change in gerbera 2.0? Because I didn't change anything in my addAudio script and the config file regarding upnp-classes. Before everything was sorted alphabetically.

from gerbera.

KarlStraussberger avatar KarlStraussberger commented on June 9, 2024

Yes, there was a change to take class into account.

from gerbera.

nobanzai avatar nobanzai commented on June 9, 2024

I use

audio: { title: 'Audio', objectType: OBJECT_TYPE_CONTAINER, upnpclass: UPNP_CLASS_CONTAINER, metaData: [] },
artist: { title: artist[0], objectType: OBJECT_TYPE_CONTAINER, upnpclass: UPNP_CLASS_CONTAINER_MUSIC_ARTIST, metaData: [], res: obj.res, aux: obj.aux, refID: obj.id },
allArtists: { title: '01 - Artists (all)', objectType: OBJECT_TYPE_CONTAINER, upnpclass: UPNP_CLASS_CONTAINER },
albumartist: { title: albumartist, objectType: OBJECT_TYPE_CONTAINER, upnpclass: UPNP_CLASS_CONTAINER_MUSIC_ARTIST, metaData: [], res: obj.res, aux: obj.aux, refID: obj.id },
allAlbumArtists: { title: '02 - Album Artists (all)', objectType: OBJECT_TYPE_CONTAINER, upnpclass: UPNP_CLASS_CONTAINER },

What should I use instead?

from gerbera.

nobanzai avatar nobanzai commented on June 9, 2024

Ok, got it - using upnpclass: UPNP_CLASS_CONTAINER for all containers gives the desired results.
Is there a description for the existing upnp container classes, i.e. UPNP_CLASS_CONTAINER_MUSIC_ARTIST et al?

from gerbera.

KarlStraussberger avatar KarlStraussberger commented on June 9, 2024

https://docs.gerbera.io/en/stable/scripting.html#constants

from gerbera.

nobanzai avatar nobanzai commented on June 9, 2024

Thx, but then I don't understand the sort behaviour for UPNP_CLASS_CONTAINER_MUSIC_ARTIST mixed with UPNP_CLASS_CONTAINER containers - there is no special treatment for both classes, but containers of these classes aren't sorted alphabetically among each other? Instead all UPNP_CLASS_CONTAINER containers are sorted alphabetically and then all UPNP_CLASS_CONTAINER_MUSIC_ARTIST containers?
Looks like this:

image

from gerbera.

KarlStraussberger avatar KarlStraussberger commented on June 9, 2024

As said, the sorting is upnp_class, title which means that all UPNP_CLASS_CONTAINER are forming a group and all item in this group are sorted by title. The same with UPNP_CLASS_CONTAINER_MUSIC_ARTIST.

The group object.container is put before object.container.person.musicArtist. Try to add these in some spreadsheet and sort by the two columns.

from gerbera.

nobanzai avatar nobanzai commented on June 9, 2024

Ah, no I didn't really understand that before, but of course then this sort order is absolutly clear.
One more question: Do I have any advantage using these classes besides the sort order?

from gerbera.

KarlStraussberger avatar KarlStraussberger commented on June 9, 2024

Support for container and file types is depending on the client, that's why we try to be exact. upnp:class is a more sophisticated concept than file extensions from desktop systems.

from gerbera.

nobanzai avatar nobanzai commented on June 9, 2024

Not sure, if I understand, why upnp:class is more sophisticated, and what I can do with this sophistication. Can you elaborate, please?

from gerbera.

KarlStraussberger avatar KarlStraussberger commented on June 9, 2024

File systems typically distinguish files and folders. UPnP defines multiple subtypes and clients may support these.

  • album folders show cover art and release date
  • genre/artist folders show up in genre/artist search
  • video files are not shown on audio players
    And so on...

from gerbera.

nobanzai avatar nobanzai commented on June 9, 2024

Thx again!

from gerbera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.