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

Hybrid View

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    3

    Configure LMS to choose FLAC over MP3 when encountering duplicates?

    Is there any way to configure LMS to choose the FLAC format over MP3 format when you have duplicates in your library (which implies that it would ignore the MP3 version of an album, if the FLAC version exists)?

    The basic gist of my setup is that I have a FLAC library and an MP3 library. I don't want to mix the folders as I still need the MP3 versions for other functions, but would like LMS to use the FLACs when they're available without listing them twice on my SB Touch controller / browser. Is there a way of doing so?

  2. #2
    Senior Member
    Join Date
    Jun 2007
    Posts
    675
    One of erlands' plugins may be able to do this, 'Multi Library' probably, I don't remember exactly if that is the one; but you have to pay for it (got myself a lifetime license for all his plugins).

  3. #3
    Senior Member aubuti's Avatar
    Join Date
    Oct 2005
    Posts
    8,353
    For the OP's sake I hope that one of Erland's plugins will meet the needs, but I don't think any of them have that functionality.

    The way I handle the OP's situation is to have three places (main folders) for my music:

    1) /music/flac [contains all my FLAC files, organized in folders by artist/album]

    2) /music/mp3 [exact copy of the FLAC folder, but transcoded to MP3 for use on portable players]

    3) /music/common_mp3 [music that I have _only_ in MP3]

    Then I put symbolic links (or shortcuts if using Windows) from (1) to (3) and from (2) to (3). I point LMS at (1) and it sees all of my music in the best format I have (ie, (1) and (3)). I point software for portable devices at (2), and it sees all of my music in the most portable format I have (ie, (2) and (3)). No duplicate listings whatsoever in either LMS or the software for my portable players.

    It may take the OP some manual effort to separate out which MP3 files are only in MP3 and which are MP3 copies of FLAC, but it's a one-shot investment of time, after which it is easy to maintain with standard file management tools.

  4. #4
    Senior Member
    Join Date
    May 2008
    Location
    United States
    Posts
    8,154
    Quote Originally Posted by aubuti View Post
    For the OP's sake I hope that one of Erland's plugins will meet the needs, but I don't think any of them have that functionality.

    The way I handle the OP's situation is to have three places (main folders) for my music:

    1) /music/flac [contains all my FLAC files, organized in folders by artist/album]

    2) /music/mp3 [exact copy of the FLAC folder, but transcoded to MP3 for use on portable players]

    3) /music/common_mp3 [music that I have _only_ in MP3]

    Then I put symbolic links (or shortcuts if using Windows) from (1) to (3) and from (2) to (3). I point LMS at (1) and it sees all of my music in the best format I have (ie, (1) and (3)). I point software for portable devices at (2), and it sees all of my music in the most portable format I have (ie, (2) and (3)). No duplicate listings whatsoever in either LMS or the software for my portable players.

    It may take the OP some manual effort to separate out which MP3 files are only in MP3 and which are MP3 copies of FLAC, but it's a one-shot investment of time, after which it is easy to maintain with standard file management tools.
    agree. OP should see this thread too (same point, slightly different approach, same outcome....separate FLAC and mp3 files)
    http://forums.slimdevices.com/showth...l=1#post708100
    Location 1: VortexBox Appliance 6TB (2.2) > LMS 7.7.2 > Transporter, Touch, Boom, Radio w/Battery (all ethernet)
    Location 2: VBA 3TB (2.2) > LMS 7.7.2 > Touch > Benchmark DAC I, Boom, Radio w/Battery (all ethernet except Radio)
    Office: Win7(64) > LMS 7.7.2 > SqueezePlay
    Spares: VBA 4TB, SB3, Touch (3), Radio (3), CONTROLLER
    Controllers: iPhone4S (iPeng), iPad2 (iPengHD & SqueezePad), CONTROLLER, or SqueezePlay 7.7 on Win7(64) laptop
    Ripping (FLAC) - dbpoweramp, Tagging - mp3tag, Spotify

  5. #5
    Senior Member
    Join Date
    Dec 2007
    Location
    Boston area (NE USA)
    Posts
    647
    Seems like the only time there's an issue is at scan, so before a scan run as script that
    - cascades through directories
    - for every directory
    - for every mp3 file
    - if there's an exact matching flac (or whatever) file rename that mp3 file to something else (e.g. *.mp3x)

    run lms scan

    run as script that
    - cascades through directories
    - for every directory
    - for every mp3x (or whatever) file, renames it back to *.mp3

    --------------------------------------
    Yep, cumbrous as all get-out. For speed, you'd probably want to iterate through just the directories that both contain flac and mp3 (e.g. iterate through a list of top level directories) or have some kind of magic stop-iterating file (e.g. stop.xyzx).
    You'd have to do this before/after every scan.

    I don't think there are 'hooks' in the scanner process to run something in the OS before/after scans. If there are, it would just make for a bit slower scan rather then something manual.

    If you wanted to accommodate variation in the name-matching between flac and mp3 files you could incorporate regex pattern matching, and make the matching pattern something an end user could easily modify (assuming they're good enough at regex for it to be easy).

    Without regex, this is completely do-able in windows cmd/bat. Linux shell scripting is 'way more capable than that. Dunno about Mac, but I'd expect a bourne shell or suchlike at some level, given its heritage.

    Done in Python or Perl, it could work across platforms.

    That thought-through, it looks loads easier to just maintain a separate (set of) file tree(s).

  6. #6
    Senior Member
    Join Date
    Jan 2009
    Location
    Sorø, Denmark
    Posts
    254
    Quote Originally Posted by -Axle- View Post
    Is there any way to configure LMS to choose the FLAC format over MP3 format when you have duplicates in your library (which implies that it would ignore the MP3 version of an album, if the FLAC version exists)?

    The basic gist of my setup is that I have a FLAC library and an MP3 library. I don't want to mix the folders as I still need the MP3 versions for other functions, but would like LMS to use the FLACs when they're available without listing them twice on my SB Touch controller / browser. Is there a way of doing so?
    If you use Erlans trackstat plugin, you could give your MP3 version of a track a lower rating than the FLAC version, and then use minimum rating in your mix.
    I know this is not perfect but it is a work arround.
    Callesoroe
    Living room: Transporter, Tact RCS 2.2X digital preamp, Martin Logan Vista speakers, AMPS(Icepower): Acoustic Reality Ear Enigma PLUS(PANELS), Acoustic Reality Ear TWO MKII(Bas)
    Kitchen: SB-duet, Beresford TC7510 DAC, Prodipe Pro 5 active bi-amp speakers.

  7. #7
    Junior Member
    Join Date
    Sep 2010
    Posts
    3
    Thank you all for taking the time to respond with such detailed replies.

    @signor_rossi, I took a look at erland's plugins but from what I've read it doesn't look like MultiLibrary would do the trick in this case. It would still maintain both libraries and list duplicates when viewed as a whole. My objective is to continue to see the library as a whole, but with duplicates removed (only in the LMS listing)

    @garym, @aubuti, Novel idea. It took me a while to wrap my head around what needed to be done. I wasn't aware that LMS would recognize Windows shortcuts to files, that's a good tidbit to know. However, by the time I'd run through the whole exercise, I'd feel like I would be better served to just duplicate my entire library specifically for LMS and eliminate the duplicates rather than doing the inverse.

    @bobkoure, Another novel idea, but man, what a PITA. This would definitely do the trick but requires some good knowledge to write the script (I have some knowledge) and I'd have to make sure the script runs before any and every rescan, and as you mentioned, I'm not so sure there's a hook to leverage off of before every scan. Wish someone already had a plugin for this script. My FLACs and MP3s (when duplicated) carry the exact same ID tags, and if they didn't, a quick Tag Copy-Paste would do the trick in Mp3tag.

    @callesoroe, this one seems simple enough but relies on playlists which I don't use. I typically just go to the folder (or find the album) I'm looking to play and select a song, so I'd be effectively bypassing the Trackstat filter.

    Once again, thank you all for your detailed responses. Looks like I'm stuck either maintaining file trees, babysitting a script, or duplicating my library to be LMS specific. Sigh. Hopefully a future iteration of LMS takes this into consideration (I know, not holding my breath, but one can hope, no?)

Posting Permissions

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