Manually adding tracks to albums

Jared list-tellico at legroom.net
Sat Apr 9 03:03:47 BST 2022


Just ran into a 19-disc, 432 track soundtrack today that wasn't in 
discogs.  Manually adding all of those tracks the way I described 
previously just wasn't going to happen.  :-)

Since tellico stores it's data in a zipped XML file, I came up with a 
better idea - write a script to generate the output in the proper 
format, then copy/paste that into the XML.  That ended up working out well.

If anyone's interested, here's the quick and dirty script I used. Pass 
it -t to output in tellico format (by default it outputs in the format 
for vgmdb.net import).  Tack on a -v if you have a various artists album 
with tracks named "XX-Artist Name - Track Name.flac"


#!/bin/bash

# Setup environment
VA=0
[ "$1" == "-v" -o "$2" == "-v" ] && VA=1
TELLICO=0
[ "$1" == "-t" -o "$2" == "-t" ] && TELLICO=1

for i in *.flac; do
     NOEXT="${i%.*}"
     NUM=${NOEXT%%[^0-9]*}
     TITLE=${NOEXT/${NUM}-}
     LENGTH=$(ffprobe "${i}" 2>&1 | sed -ne 's/^.*Duration: 
\([^,]*\).*$/\1/p' | sed -e 's/^00://g')
     if [ $VA -eq 1 ]; then
         ARTIST="${TITLE%% - *}"
         TITLE="${TITLE#* - }"
     else
         ARTIST=$(basename "$(readlink -f ..)")
     fi
     if [ $TELLICO -eq 1 ]; then
         echo "    <track>
      <column>${ARTIST}</column>
      <column>${TITLE}</column>
      <column>${LENGTH}</column>
     </track>"
     else
         echo "${NUM} ${TITLE} ${LENGTH}"
     fi
done


-- 
Jared


On 4/4/22 21:02, Jared wrote:
> Is there a faster or more efficient way to add tracks not included in 
> a source like discogs than fiddling with each cell manually? Right now 
> I have to right-click and add a new row for each track beyond 5, then 
> copy/paste the title in each title cell one row at a time, then repeat 
> for artist one row at a time, then repeat for length one row at a time.
>
> Is there some way to paste in multiple tracks at once in some way?  or 
> dragon and drop in some way I'm not seeing?  or maybe import a 
> tracklist from a text file or CSV?
>
> Not that big a deal, but I'm adding a lot of game soundtracks not in 
> discogs, and they tend to have a lot of tracks crammed on one disc.  
> It takes several minutes with this process even for relatively short 
> track lists.
>
> Importing from file metadata kind of does what I'm looking for, but it 
> screws with my collection fields, adding a bunch of fields I don't want.
>
> -- 
> Jared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/tellico-users/attachments/20220408/13dc728c/attachment.htm>


More information about the tellico-users mailing list