Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,524

    Genres, moods, themes and styles

    > In Custom Scan I used a database structure based on key/value pairs.
    > This makes the storage very generic, you can basically store attribute
    > in it. However, the issue is that browsing tends to get less optimized
    > from a performance perspective since all genres/tags are stored in a
    > single database table, especially when you want to filter based on
    > multiple type of genres/tags in a single query (browsing
    > moods->themes->albums for example). The alternative is to instead create


    If you could live with a single intermediary (mood or theme or whatever)
    you could create a library view based on whatever value you want, then
    create a custom browse item limited to this library?

    > lauret wrote:
    >> I guess the main question is if this functionality would be considered
    >> as part of LMS core.
    >>

    > My feeling is that someone need to prove the concept as a plugin first,
    > when it has been proved that it can be done without adding too much
    > complexity it can be considered for pull requests and inclusion in LMS.


    A plugin would be great. Whether it be a POC, or actually an optional
    feature can be debated. As you said: most users probably wouldn't want
    to add the overhead for this additional complexity.

    But then there's definitely a use case for the online library
    integration, too, as you don't have control over their metadata. Many
    eg. don't offer any genre information at all.

    Some kind of post-scan importer manipulating metadata in the tables
    might be very welcome. I added some primitive way to set genres based on
    album titles or group names to the online library integration. But
    that's rather simplistic.

    > Having said that, almost no plugin functionality made by non core
    > developers have historically been included in LMS core as it is. There


    There actually were quite a few. And that taught us a lesson or two,
    too. Eg. at some point there were lots of different skins. But their
    original authors left, and nobody really cared about those any more.
    Which means we were left with semi functional skins nobody wanted to
    take care of. MusicIP integration started as a 3rd party contribution,
    too. But you're right: more code needs more maintenance. As long as
    there aren't too many contributors dedicated to maintaining LMS around,
    it'll be hard to convince me to include major changes for a small group
    of users...

    --

    Michael

  2. #12
    Senior Member
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    122
    Quote Originally Posted by mherger View Post
    If you could live with a single intermediary (mood or theme or whatever)
    you could create a library view based on whatever value you want, then
    create a custom browse item limited to this library?
    But this wouldn't work if the mood of the track is stored inside the mood tag, right? These tags are not stored inside the library database. If it would be possible, this idea is by far the most simple.

    Quote Originally Posted by mherger View Post
    A plugin would be great. Whether it be a POC, or actually an optional
    feature can be debated. As you said: most users probably wouldn't want
    to add the overhead for this additional complexity.
    I will try to fit my ideas into a plugin and then we'll see from there.

    Quote Originally Posted by mherger View Post
    But then there's definitely a use case for the online library
    integration, too, as you don't have control over their metadata. Many
    eg. don't offer any genre information at all.

    Some kind of post-scan importer manipulating metadata in the tables
    might be very welcome. I added some primitive way to set genres based on
    album titles or group names to the online library integration. But
    that's rather simplistic.
    I can see the value in this concept. This idea would be complementary to the possibility to add a custom key (such as mood) to store a certain mood for a track, especially as metadata providers nowadays do not only provide a genre, but also styles etc.

  3. #13
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,524

    Genres, moods, themes and styles

    >> If you could live with a single intermediary (mood or theme or whatever)
    >> you could create a library view based on whatever value you want, then
    >> create a custom browse item limited to this library?

    >
    > But this wouldn't work if the mood of the track is stored inside the
    > mood tag, right? These tags are not stored inside the library database.
    > If it would be possible, this idea is by far the most simple.


    If you provided code to read that tag and store it, then sure you could.

    --

    Michael

  4. #14
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,245
    Quote Originally Posted by mherger View Post
    > In Custom Scan I used a database structure based on key/value pairs.
    > This makes the storage very generic, you can basically store attribute
    > in it. However, the issue is that browsing tends to get less optimized
    > from a performance perspective since all genres/tags are stored in a
    > single database table, especially when you want to filter based on
    > multiple type of genres/tags in a single query (browsing
    > moods->themes->albums for example). The alternative is to instead create


    If you could live with a single intermediary (mood or theme or whatever)
    you could create a library view based on whatever value you want, then
    create a custom browse item limited to this library?
    Do you mean creating a virtual library for each individual Mood value ?
    So you would get a Happy library, a Sad library, a Tired library if you have these three Mood values in you tags ?

    Thats probably a good start for a POC plugin since implementing full browse support in a plugin is going to be a bit of work and such implementation would be able to ignore browsing since its already implemented in the core for virtual libraries.

    Would the library_track table be filled by the plugin during scanning or is it handled some other way ?
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  5. #15
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,245
    Quote Originally Posted by mherger View Post
    But then there's definitely a use case for the online library
    integration, too, as you don't have control over their metadata. Many
    eg. don't offer any genre information at all.

    Some kind of post-scan importer manipulating metadata in the tables
    might be very welcome. I added some primitive way to set genres based on
    album titles or group names to the online library integration. But
    that's rather simplistic.
    I totally agree with you regarding supporting online music also now when its more integrated with local library.

    One question here is where to store genres for online music. If someone have spent time categorizing their online music they definitely doesnt want to loose the information, it would be like deleting all your genre tags in your local music files. We have the persist db but I sometimes get the feeling that people look at it as something that could be discarded and it isnt easily transferred if you setup a new LMS server. This is one of the reasons why TrackStat plugin implements backup/restore functionality to export ratings to xml files every night.

    Another question is what the stable identity for an online track is. Does identities change over time or does a Spotify track always have the same identity ? An alternative is to use artist+album+track name as key but I suspect thats even less stable since online services so times tends to add post fixes after names or correct spelling. If my memory is correct I think there was one online service that forwarded you to the new identity of a track if you accessed the identity using an old identifier.

    Only supporting imported genres for online music is also an alternative but then it might not match the genres you use for local music and you need to find a reliable source to import them from.

    Starting to implement something that works for local music and reads the information from tags is probably a good idea and let online music wait until a future version.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  6. #16
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,524

    Genres, moods, themes and styles

    > Do you mean creating a virtual library for each individual Mood value ?
    > So you would get a “Happy” library, a “Sad” library, a “Tired” library
    > if you have these three Mood values in you tags ?


    Correct.

    > Would the library_track table be filled by the plugin during scanning or
    > is it handled some other way ?


    Up to the dev. But a scanner module seems like a logical choice. In its
    simplest form a virtual library can be an SQL statement which would
    automatically be executed by the virtual library handler. But it can
    also be code called from it. Or its entirely independant code which
    stores library -> track ID tuples.

    --

    Michael

  7. #17
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,524

    Genres, moods, themes and styles

    > One question here is where to store genres for online music. If someone

    That's totally up to the plugin author. It could be a simple replacement
    like I did for the OMLI plugin, stored in the prefs.

    I have no idea about Roland's or lauret's plans. But as I understood his
    posting there would be some "magic" going on in the background which
    would set values based on big data and what not. In that case nothing
    would need to be saved locally.

    > tags in your local music files. We have the persist db but I sometimes
    > get the feeling that people look at it as something that could be
    > discarded and it isn’t easily transferred if you setup a new LMS server.


    Yeah, it's unfortunate that it's stored in the cache folder. Hmm...
    should probably take a note and change that.

    > Another question is what the stable identity for an online track is.
    > Does identities change over time or does a Spotify track always have the
    > same identity ?


    Unfortunately they do indeed change. But in my experience that would not
    even be reflected in my collection: I had an album which suddenly still
    was shown in Spotty, but not the Spotify app. Turns out that album was
    no longer available under that ID, but the API still reported it as in
    my collection.

    I'd say IDs are stable, but they can disappear from the catalog. Some
    services (Spotify) would provide alternative IDs for some items on some
    endpoints. But I've only looked into this for tracks.

    > correct I think there was one online service that forwarded you to the
    > new identity of a track if you accessed the identity using an old
    > identifier.


    Exactly.

    --
    --

    Michael

  8. #18
    Senior Member
    Join Date
    May 2008
    Location
    The Netherlands
    Posts
    122
    Quote Originally Posted by mherger View Post
    I have no idea about Roland's or lauret's plans. But as I understood his
    posting there would be some "magic" going on in the background which
    would set values based on big data and what not. In that case nothing
    would need to be saved locally.
    My plans right now is to extend the possibility to store tags from local files and make them browseable. A lot of files in my collection have mood tags, some files have as much as 10 moods stored, so your solution to create a library per mood seems unfeasible.

    What I am trying to do now is to stick as closely as possible to the tag handling for genres, but then for the tag mood. A stretch goal would be to making it configurable, so you can also choose to select other tags to store and browse.

    Roland is indeed working on automatic genre recognition and storing it subsequently in the database.

  9. #19
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,245
    Quote Originally Posted by lauret View Post
    A lot of files in my collection have mood tags, some files have as much as 10 moods stored, so your solution to create a library per mood seems unfeasible.
    Michael, not sure if anything has changed since I last looked at browsing (in Custom Browse plugin I think). One issue I had back then if I remember correctly is that I more or less had to duplicate the logic in Slim/Menu/BrowseLibrary to be able to show an artist or album menu that were additionally filtered by information known by my plugin. When looking at the BrowseLibrary code I noticed that you had to modify it when you added the Virtual Library functionality so lauret will probably get the same problem as I had. Not sure if its possible but I think it would be very useful if is was possible to somehow hook in your own filtering criterias in the BrowseLibrary functions for at least artists, albums and songs. That way plugins that add new browse behavior could become more consistent with the standard browse menus. There is a lot of functionality in BrowseLibrary which you likely want to have even if the lists are filtered so fewer items are shown.
    If you dont have the time/interest to look at it yourself maybe this would be suitable for a pull request if laurent finds a good solution for it ?
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  10. #20
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,245
    Quote Originally Posted by lauret View Post
    A lot of files in my collection have mood tags, some files have as much as 10 moods stored, so your solution to create a library per mood seems unfeasible.
    I wonder if it would be possible to adjust the browsing logic in the core so you for each library optionally can specify a parent menu which the library should be placed inside ?
    That way you would be able to specify that your libraries should be placed inside a Moods menu and that would maybe make the virtual libraries approach a bit more feasible since you mood libraries wouldnt be showed together with all other virtual libraries.

    As mentioned in my previous post I suspect you are going to end up duplicating a lot of code from the core in your plugin to make the artists/albums/songs menus under a specific mood to work the same way as they do beneath a genre in the standard menus. So unless Ive missed something I think you should try to find a way to do some minimal pull requests to the core to make it a bit more reusable.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •