Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,255

    1) A flexible browse menu 2) Additional User tags

    I have been wondering whether it might be possible to develop a flexible menu system. The idea would be that the user could configure a list of the tags he/she would like to use dynamically. Whatever fixed menus are available, thereís always some other combination of tags one might quite like to be able to select on, including technical information.

    A new menu entry would be created, ĎBrowse Musicí (or some such name), to access the music library using these tags in any order.

    On selecting the new menu all the specified tag names are displayed. On selecting one, a list of all tag values is displayed, maybe with an initial Alphabetical (A, B, CÖ) selection when there are over 100 or so items. On selecting one, a list containing the following is displayed:

    ē Number of matching Albums
    ◦ selecting this lists matching albums and thence to tracks - showing all Albums and/or tracks that match the current criteria
    ē Number of matching tracks
    ◦ selecting this lists tracks that match the current criteria
    ē A list of all tags for which multiple values are available, thus if Artist was chosen first, no Artist tag would be displayed at this level unless there are tracks matching the selected one which have additional Artists - if that Artist only performs on tracks for one Composer, the Composer tag is not displayed
    ◦ selecting a tag repeats the process so far at the next level down

    Erlandís Custom Browse and Custom Scan had something similar to this (see https://wiki.slimdevices.com/index.p..._music_by_tags for how it can be used for Classical Music, but it applies quite generally). His code is available for inspection, but he no longer maintains the code so these plugins may well, in time, become defunct.

    The Minimserver application provides a very similar menu structure to this.

    My own list of tags that I might want to include might be something like:

    Artist
    Album Artist
    Conductor
    Composer
    Band
    TrackArtist
    (the above 6 presumably subject to the usual LMS artist combination configuration rules - I have never quite understood the difference between Artist and TrackArtist)
    Genre
    Year
    Content_type
    Channels
    Samplesize
    Samplerate (or a range)
    Bitrate (or a range)
    Rating (or a range)

    Library Views might not be needed to be taken into account, given the flexible nature of the menu.


    All I could to help would be to test anything that was under development. I used to be a programmer, but my skills are far too old and creaky. I also know nothing of the internals of LMS except the database structure.


    I do have to admit to having an ulterior motive. If the above was possible, practical and was produced it might be great for loads of people.

    Given this type of menu it might also then be feasible for someone to develop an additional project (plugin) adding a new database table with non-standard tags. In effect a limited form of Custom Scan. If these tags could be included in the above selection this would be of enormous benefit to some classical (and maybe other) music lovers. There is an irresolvable debate about which tags to include, so a flexible but limited set of tags might be implemented.

    I would add up to 5 tags. One more artist-type tag (plus sort-form), one date-type tag, 2 text tags (possible some with sort-forms) and a numeric tag. Iím not sure it matters what they are called. In fact flexible naming might be the solution to the debates amongs classical enthusiasts. If the tags could be defined by the user, col1 - tag ďxyzĒ, col2 - tag ďabcĒ and so on (in a separate table just mapping user tag names to table column names) and the usersí tag names then made available for inclusion in the dynamic menu, no special extra menus would be needed for other types of music. The dynamic menu would provide access to each usersí preferred tags.

    For me, I would add ĎWORKí (and WORKSORT), ĎMOVEMENTí, WORKARTIST (an Artist-type plus WORKARTISTSORT), CREATED (the date the tag was initially created which for me is the date acquired) and RECORDING (containing information about the recording itself according to the userís preferences). I also include a RATING tag (0 to 99) in my flacs. The extra ARTIST type would ideally be added to the contributors table (if not already present), with an extra role value in contributor_track and contributor_album (Iím not sure if the latter would be needed).

    The new tables would then be something like:

    UserTags - rebuilt after every system rescan, each row containing:

    id
    track (key to tracks table)
    col1 - value of 1st user tag - text
    col2 - value of 2nd user tag - text
    col3 - value of 3rd user tag - date form
    col4 - value of 4th user tag - number
    col5 - value of 5th user tag - text, possibly Ďartistí format for contributors table
    Col1s - value of 1st user tag sorted
    Col2s - value of 2nd user tag sorted
    Col5s - value of 5th user tag sorted

    UserTagNames, one row, six columns (or 5 if no primary key id is needed)

    id
    col1 - user tag name 1 (append SORT for sort form)
    col2 - user tag name 2 (append SORT for sort form)
    col3 - user tag name 3
    col4 - user tag name 4
    col5 - user tag name 5 (append SORT for sort form)


    You probably think Iím mad. Many people do.

    Is anyone out there interested?
    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

  2. #2
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,293
    Quote Originally Posted by PasTim View Post
    Erlandís Custom Browse and Custom Scan had something similar to this (see https://wiki.slimdevices.com/index.p..._music_by_tags for how it can be used for Classical Music, but it applies quite generally). His code is available for inspection, but he no longer maintains the code so these plugins may well, in time, become defunct.
    Happy to help with describing or answer questions regarding the design of Custom Scan and the Dynamic Tags menu it provides if anyone is interested to do something regarding this. The scanning part of Custom Scan should be done very different compared to my code since there are new API hooks in LMS scanner available these days.

    I personally think the plugin should provide a default configuration for all commonly used tags so the only thing the user have to do is to activate the ones to be used, this way the configuration can be a lot simpler than Custom Scan and the plugin can have logic that really understands the content of all different tags.

    It would likely be preferred if tags were stored in similar database table structures as the rest of LMS. Custom Scan stores all tags in a single menu and I believe that gigantic table is one of the things that affect its performance in a negative way.

    I think lauret at least had a plan to do something regarding scanning part according to this post: https://forums.slimdevices.com/showt...l=1#post994190
    Not sure it is as generic as you like but if itís done the right way there should be collaboration/reusing possibilities with the plugin you are asking for.
    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 )

  3. #3
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,255
    Quote Originally Posted by erland View Post
    Happy to help with describing or answer questions regarding the design of Custom Scan and the Dynamic Tags menu it provides if anyone is interested to do something regarding this. The scanning part of Custom Scan should be done very different compared to my code since there are new API hooks in LMS scanner available these days.

    I personally think the plugin should provide a default configuration for all commonly used tags so the only thing the user have to do is to activate the ones to be used, this way the configuration can be a lot simpler than Custom Scan and the plugin can have logic that really understands the content of all different tags.

    It would likely be preferred if tags were stored in similar database table structures as the rest of LMS. Custom Scan stores all tags in a single menu and I believe that gigantic table is one of the things that affect its performance in a negative way.

    I think lauret at least had a plan to do something regarding scanning part according to this post: https://forums.slimdevices.com/showt...l=1#post994190
    Not sure it is as generic as you like but if itís done the right way there should be collaboration/reusing possibilities with the plugin you are asking for.
    Thanks. My suggestion for the main new table was effectively to have an extension of the columns tracks table, rather than a custom-scan type table. All the new tags for a track would be in one row.

    The main reason for suggesting naming flexibility was to avoid getting bogged down in specific tag arguments. I fear no one will ever quite agree on what to include or exclude, especially if they already have thousands of tracks which might need re-tagging.

    By only employing one potential menu, I was also hoping that the meanings of each tag would be almost irrelevant (except possibly the WORKARTIST which would often be a duplicate name in contributors), they would just be displayed as tags and selectable. I wouldn't ask for the playing queue or now playing information to change at all.

    Does that make any sense?
    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

  4. #4
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,293
    Quote Originally Posted by PasTim View Post
    Thanks. My suggestion for the main new table was effectively to have an extension of the columns tracks table, rather than a custom-scan type table. All the new tags for a track would be in one row.

    The main reason for suggesting naming flexibility was to avoid getting bogged down in specific tag arguments. I fear no one will ever quite agree on what to include or exclude, especially if they already have thousands of tracks which might need re-tagging.

    By only employing one potential menu, I was also hoping that the meanings of each tag would be almost irrelevant (except possibly the WORKARTIST which would often be a duplicate name in contributors), they would just be displayed as tags and selectable. I wouldn't ask for the playing queue or now playing information to change at all.

    Does that make any sense?
    Letís wait and see if anyone is interested in doing something before we dive into discussions regarding how to best implement it. I can explain more about the problems Iíve seen when someone has volunteered to try to do something. Itís pointless to discuss implementation details before someone actually is developing something.
    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. #5
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,255
    Quote Originally Posted by erland View Post
    Letís wait and see if anyone is interested in doing something before we dive into discussions regarding how to best implement it. I can explain more about the problems Iíve seen when someone has volunteered to try to do something. Itís pointless to discuss implementation details before someone actually is developing something.
    Thanks - agreed. I assumed that this was a better section of the forum to start a discussion than the more general section.

    I have looked at some of your code, and a) there's a heck of a lot of it, and b) I don't understand perl well enough to make much sense of it. I suspect I'd need to go on a course
    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

  6. #6
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,293
    Quote Originally Posted by PasTim View Post
    I assumed that this was a better section of the forum to start a discussion than the more general section.
    It is

    Quote Originally Posted by PasTim View Post
    I have looked at some of your code, and a) there's a heck of a lot of it
    There are new APIs available in LMS now that makes a lot of my code unnecessary. My code was written before a concept of third party scanner modules and additional third party browse menus existed in LMS.

    I think what we are talking about here is still going to be significant amount of code but it should a lot smaller than Custom Browse and Custom Scan current code base. Custom Scan is large because itís really a scanner framework rather than a plugin to be able to scan a few extra tags. Custom Browse is large because itís a browse menu creation framework to make static menus for people that refuse to write Perl code. So anyone that wants to do something shouldnít get overwhelmed by looking at the Custom Browse/Custom Scan code, I can help to point out relevant sections and design choices when there is anyone that wants do do something and is interested to reuse my experience. I think itís important to try to do something new and not just try to replace the existing plugins. If you purely try to replace existing plugins or parts of them it will be hard to start small because people wonít use it before you have most or better features than the existing plugins.

    Quote Originally Posted by PasTim View Post
    I don't understand perl well enough to make much sense of it. I suspect I'd need to go on a course
    I hadnít written a line of Perl code when I got my first Squeezebox in beginning of 2006, about a month later I released first version of TrackStat and SQL Playlist plugins. They were of course nowhere near the feature packed plugins they are today but the trick is to start small and then grow into it and add more functionality step by step. I neither went to a Perl course nor read a book, I just looked at LMS and other plugin code and asked questions here. When releasing the plugins I got a lot of positive feedback and suggestions of things that could be added and thatís the primary reason why Iím still in this community 15 years later.
    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 )

  7. #7
    Senior Member
    Join Date
    Nov 2010
    Location
    Hertfordshire, UK
    Posts
    3,255
    Quote Originally Posted by erland View Post
    It is
    Thanks for all your advice, and the plugins of course!
    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

Posting Permissions

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