Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 10

Thread: Track metadata

  1. #1
    jvromans@squirrel.nl
    Guest

    Track metadata

    Hi,

    When LMS scans the library directories it retrieves track meta data from
    the tracks it encounters. It uses MP3 tags, APE tags, file/foldername etc..

    My music collection has its own metadata, stored in text files. See
    https://metacpan.org/pod/CDDB::Fake for details.

    I want LMS to use *this data* when scanning the library directories, and
    not bother with file tags etc.. Any idea how to achieve this? Are there
    ready-to-use scanner hooks or can I do this with a plugin? Or do I need to
    patch LMS?

    -- Johan

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    2,996
    Some suggestions but mherger probably will have better ideas.

    I do not think that LMS can be configured to extract that data out of the box.

    However, if you look at the code that handles .cue files you will see things that are done to create track info from a file with metadata that is parallel to the audio.

    The Full Text Search plugin is an example of a plugin that hocks into the scanning process and augments track info - although I think it does it via additional tables.

    The core extraction of track info is in the Audio::Scan library (maintained by AndyG ex of slimdevices) ... having it there is perhaps the best place for it since it might be transparent to much of LMS but I have no idea if he would accept an update that added such a function (but you could ask him - https://metacpan.org/pod/Audio::Scan
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

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

    Track metadata

    In addition to what Paul said: you can register handlers which would be
    called on any new/modified/deleted track. These are called with the
    file's URL (path). This should allow you to create a handler which would
    take the file's path to find the corresponding metadata and update the
    database accordingly. See

    https://github.com/Logitech/slimserv...Scanner/API.pm

    --

    Michael

  4. #4
    jvromans@squirrel.nl
    Guest

    Track metadata

    On Tue, 29 Sep 2020 21:56:02 +0200, Michael Herger <slim (AT) herger (DOT) net> wrote:

    > In addition to what Paul said: you can register handlers which would be
    > called on any new/modified/deleted track.
    >
    > https://github.com/Logitech/slimserv...Scanner/API.pm


    Ah, interesting.

    How do these API callbacks relate to the normal scanning process? Does the
    scanner first establish metadata from filenames and file tags, and then
    call the API callbacks?

    -- Johan


  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,460

    Track metadata

    > How do these API callbacks relate to the normal scanning process? Does the
    > scanner first establish metadata from filenames and file tags, and then
    > call the API callbacks?


    That's my understanding, yes: the file is parsed for metadata, then the
    callback is called. See eg.

    https://github.com/Logitech/slimserv.../Local.pm#L877



    --

    Michael

  6. #6
    jvromans@squirrel.nl
    Guest

    Track metadata

    On Wed, 30 Sep 2020 07:03:01 +0200, Michael Herger <slim (AT) herger (DOT) net> wrote:

    > That's my understanding, yes: the file is parsed for metadata, then the
    > callback is called. See eg.


    Thanks. I'll see what I can achieve.

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    2,996
    I've just had a quick look at your Fake CDDB library and I had a thought ... how about creating .cue files from your .nocddb ?
    Would mean lots of duplication but potentially a much easier task - with the poteential added benefit that changing a .cue file contents may well be picked up by the scanner on a new/changed scan (which I think would not be the case for the API above since it is not looking for your file extension so you would have to do it yourself).
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  8. #8
    jvromans@squirrel.nl
    Guest

    Track metadata

    On Wed, 30 Sep 2020 09:00:39 +0000, Paul Webster
    <Paul.Webster.9q0a5b (AT) no-mx (DOT) forums.slimdevices.com> wrote:

    > I've just had a quick look at your Fake CDDB library and I had a thought
    > ... how about creating .cue files from your .nocddb ?


    There is already a script for that .

    But how are .cue files supposed to work? For example, I have a folder
    somewhere that contains a number of tracks and a .cue file. When I have
    this folder scanned the contents of the .cue file do not seem to have any
    effect on the tracks.

    -- Johan

  9. #9
    Senior Member
    Join Date
    Jun 2017
    Posts
    275
    Quote Originally Posted by jvromans@squirrel.nl View Post
    But how are .cue files supposed to work? For example, I have a folder
    somewhere that contains a number of tracks and a .cue file. When I have
    this folder scanned the contents of the .cue file do not seem to have any
    effect on the tracks.

    -- Johan
    Speaking out of turn here as very much a non-developer, but in my experience, LMS only supports cue sheets that point to a single file. So the number of .cue files needs to equal the number of tracks.
    LMS 8 nightly; 3 Squeezelite players connected by powerline ethernet; 5 wireless players connected via Airplay Bridge; 1 SqueezeAmp player
    no high-end or esoteric audio gear
    1 Squeezebox Radio (upgraded UE Smart Radio) now mostly retired

  10. #10
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    2,996
    Correct.
    LMS supports the cue file having multiple tracks in it but only to split up recordings in a single file.
    I use it for recordings of a show from the radio - single audio file of around 2 hours split into individual tracks via .cue file with timings.

    So - you would need one .cue file for each audio file.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

Posting Permissions

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