Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34
  1. #1
    Senior Member
    Join Date
    Sep 2009
    Location
    Waihi Beach, New Zealand
    Posts
    215

    List on Windows PC Albums and Artists in LMS library

    Every now and then I search the forums to see if there is a simple, single-click way to output a list of all the Albums I've got, sorted by Artist (must have) and Album Title (a nice bonus) and one album per row. I had not come across one but since starting this thread three options have appeared - many thanks to the contributors. I'm updating this first post to bring together in one place links to the options. These options are (easiest first):

    • (Windows only) The executable LMS Documenter (created by pkfox)– just run the .exe file, choose your options and go. Output as either HTML or PDF. Very easy to use, several configuration options, output sorted in order of artist, including leading words like ‘The’. Listing all tracks with album art can create a large file.
    • (Anything Python runs on) Python script (created by Roland0) – takes a bit of setting up the first time, but then is a single click and fast (a few seconds!). Output in HTML. A little familiarity with entering command line instructions would be useful but is not essential. Output can be in artist order with or without leading words like ‘The’.
    • (Windows only) A sequence of apps to install and use (my clunky effort). Output in HTML can be configured in lots of different ways. Can give a more compact output file than the other two methods but needs the user to follow several steps.

    The attachments will guide you through the steps to list the albums in your collection, one guide for each method. Links to the sources are in each guide, with screen shots of the results.

    I'm no expert and will appreciate all feedback. I hope this helps others who've been on the hunt for that elusive quick, one-click path to a little list of Albums in the LMS collection. I'm hoping this will take the pain out of missing a bargain CD that I wrongly thought I had, or coming home with yet another copy of one I'd forgotten I'd already bought.
    Attached Images Attached Images
    Last edited by Viragored; 2020-07-23 at 00:19. Reason: Major update - bring together results of following discussion
    Digital: Raspberry Pi 3B; piCorePlayer 6 + LMS 8; HifiBerry DAC+DSP > Yamaha RX-V2700 > Jamo speakers
    Analogue: HifiBerry DAC+DSP > Speakercraft MZC-66 > whole house
    Library: External USB drive
    Android: Squeezer app

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    2,932
    LMS Documenter offers another way
    https://forums.slimdevices.com/showt...menter-Part-II
    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
    Senior Member
    Join Date
    Sep 2009
    Location
    Waihi Beach, New Zealand
    Posts
    215
    Quote Originally Posted by Paul Webster View Post
    That doesn't offer one album per line of output, and the author says changing the logic to exclude all the tracks would be too much of a mission. It's a neat app though, and is easy to use.

    Edit: my output pdf file from Documenter was >10 MB without artwork; >350MB with artwork, and 3.6k pages long. Nice to have, but not usable for what I want.
    Last edited by Viragored; 2020-07-15 at 03:19.
    Digital: Raspberry Pi 3B; piCorePlayer 6 + LMS 8; HifiBerry DAC+DSP > Yamaha RX-V2700 > Jamo speakers
    Analogue: HifiBerry DAC+DSP > Speakercraft MZC-66 > whole house
    Library: External USB drive
    Android: Squeezer app

  4. #4
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,005
    Quote Originally Posted by Viragored View Post
    Every now and then I search the forums to see if there is a simple, single-click way to output a list of all the Albums I've got, sorted by Artist (must have) and Album Title (a nice bonus) and one album per row. I've not come across one so spent some lockdown hours ploughing through things that Google led me to, to see if I could come up with a way to get the list I would like. I eventually got there, and have written out the steps I took to do it.

    And of course, if anyone can point me to an existing single-click way of outputting a simple list, I'd be delighted. And all suggestions for improving the way this works would be appreciated, too.

    My steps are a bit clunky, bit I'm pleased with the output I've got. My HTML file is small enough (250KB) to put on my phone, and rapidly scroll through or search with the web browser when I'm looking at CDs in a music shop.

    This method is for Windows PC. I have no idea if similar products would work on other systems than Windows 10. Here's a little clip of the top of my list of >3k albums

    Attachment 31049
    Nice set of instructions.
    Never come across AsctoTab before but frequently use db browser to look at the libary.db

    Just one point - you should really make sure that LMS is NOT running when you copy library.db - for safety sake
    VB2.4 storage QNAP TS419p (NFS)
    Living Room - Joggler & SB3 -> Onkyo TS606 -> Celestion F20s
    Office - Pi3+Sreen -> Sony TAFE320 -> Celestion F10s / Pi2+DAC & SB3 -> Onkyo CRN755 -> Wharfedale Modus Cubes
    Dining Room -> SB Boom
    Kitchen -> UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) - Pi2+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) - SB Touch ->Sherwood AVR ->Mordaunt Short M10s
    Everything controlled by iPeng

  5. #5
    Senior Member
    Join Date
    Sep 2009
    Location
    Waihi Beach, New Zealand
    Posts
    215
    Quote Originally Posted by d6jg View Post
    Nice set of instructions.
    Never come across AsctoTab before but frequently use db browser to look at the libary.db

    Just one point - you should really make sure that LMS is NOT running when you copy library.db - for safety sake
    Thanks, that's helpful. I'll amend the instructions (and then discover if it's possible to update the uploaded file)
    Digital: Raspberry Pi 3B; piCorePlayer 6 + LMS 8; HifiBerry DAC+DSP > Yamaha RX-V2700 > Jamo speakers
    Analogue: HifiBerry DAC+DSP > Speakercraft MZC-66 > whole house
    Library: External USB drive
    Android: Squeezer app

  6. #6
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,065
    Here's a Python script which fetches the information directly from LMS and writes it to a local file: download
    Usage:
    Code:
    python3 lms_getalbums.py lmsserver:port filename
    Example:
    Code:
    e.g.python3 lms_getalbums.py odroidhc2:9000 lmsalbums.html
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

  7. #7
    Wow, that works quickly. Looks like I have some duplicates in there - I presume that's the Spotify duplicates?

    Robert
    Home: Raspberry Pi 3/piCoreplayer/LMS8.0.0/Material with files on QNAP TS-251A
    Touch > DacMagic 100 > Naim Audio Nait 3 > Mission 752 (plus Rega Planar 3 > Rega Fono Mini; Naim CD3)
    2 x Squeezebox Radios, 1 X Squeezebox 3 (retired), spare Pi2/piCorePlayer
    Office: LMS8.0.0 running on Raspberry Pi3; Raspberry Pi 3 player with touchscreen/piCorePlayer/IQaudIO DAC and Amp
    SqueezePad, iPeng as controllers

    last.fm/user/GrumpyBob

  8. #8
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    2,932
    Some quick suggestions for changes to Roland0 Python script:
    This makes the :9000 optional so only needs to be included if using non-standard port
    Index at top of page (first letter of artist name - simplistic and foolable)
    and --singleartist to enable hiding of duplicate artist names which I think makes it a bit easier to scan quickly by eye

    near the top ...
    Code:
    parser = ArgumentParser(description="LMS Album Lister", formatter_class=RawDescriptionHelpFormatter)
    parser.add_argument('lmshost', action='store', help='LMS host name (with optional port, e.g. lmssrv:9000)')
    parser.add_argument('outfile', action='store', help='output file')
    parser.add_argument('--singleartist', action='store_true', help='Do not print repeated artist name')
    args = parser.parse_args()
    
    parsedlmshost = args.lmshost.partition(':')
    
    if parsedlmshost[2] == '':
    	args.lmshost = parsedlmshost[0] + ':9000'
    url = "http://{}/jsonrpc.js".format( args.lmshost)
    further down and to the end ... from the line after
    albums_flat = []
    Code:
    		lastArtist = ''
    		lastIndex = ''
    		indexLine = ''
    		for row in albums:
    			thisArtist = row['artist']
    			if thisArtist != '':
    				thisIndex = thisArtist[0]
    			if args.singleartist:
    				if thisArtist == lastArtist:
    					thisArtist = ''
    				else:
    					lastArtist = thisArtist
    					
    			if t$hisIndex != '' and thisIndex != lastIndex:
    				lastIndex = thisIndex
    				if thisIndex.islower():
    					thisIndex = 'lower' + thisIndex
    				thisArtist = '<a name="index' + thisIndex + '"></a>' + thisArtist
    				indexLine = indexLine + '<a href="#index' + thisIndex + '">' + lastIndex + '</a> '
    			albums_flat.append( table_tmpl.format( thisArtist, row['album'], row['year']))
    		with open( args.outfile, 'w', encoding='utf-8') as fp:
    			fp.write( '<html><body>Index: {}\n<table border=1>\n<tr><th>Artist</th><th>Album</th><th>Year</th></tr>\n{}\n</table></body></html>\n'.format( indexLine, '\n'.join( albums_flat)))
    Last edited by Paul Webster; 2020-07-16 at 02:20. Reason: Edited to add artist index
    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

  9. #9
    Senior Member pkfox's Avatar
    Join Date
    May 2006
    Location
    Surrey, UK
    Posts
    569
    Quote Originally Posted by Viragored View Post
    That doesn't offer one album per line of output, and the author says changing the logic to exclude all the tracks would be too much of a mission. It's a neat app though, and is easy to use.

    Edit: my output pdf file from Documenter was >10 MB without artwork; >350MB with artwork, and 3.6k pages long. Nice to have, but not usable for what I want.
    Hi there, my app does offer one album per line but in a pdf - I'll have a look at knocking it up in HTML
    We can't stop here this is bat country. RIP Hunter S Thompson.

    Friendlyarm Nanopi M4 V1 NVME M2 SSD 1TB -> Chord Qutest DAC -> Meridian 551 -> Monitor Audio Gold -> Me

  10. #10
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    1,065
    Quote Originally Posted by Paul Webster View Post
    Some quick suggestions for changes to Roland0 Python script:
    Index at top of page (first letter of artist name - simplistic and foolable)
    and --singleartist to enable hiding of duplicate artist names which I think makes it a bit easier to scan quickly by eye
    I probably should have mentioned that I've uploaded an updated version yesterday which already includes this.
    Various SW: Web Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | LMSlib2go | ...
    Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

Tags for this Thread

Posting Permissions

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