* TODO %^{Title} %?########## # import ########## # figure out what import number this is beets-library describe my_import # import tracks (watch out for ~my_seed~) beets-library import -l /opt/music/beets/import.log --set my_import=[n] [--set my_seed=True] /opt/music/to_import ########## # initial processing / data move ########## # move 'featured by' to track title prior to move so move is run only once beets-library ftintitle my_import:[n] # move files to library directory beets-library move my_import:[n] ########## # cleanup jpg files & empty folders ########## find /tank/Music/to_import -type f -iname \*.jpg -delete find /tank/Music/to_import -depth -empty -type d -delete ########## # misc cleanup / bad file check ########## # pre-flight 'junk' move prior to delete mkdir /opt/music/to_import/_delete_me mv /opt/music/to_import/* /opt/music/to_import/_delete_me/ # bad/missing files check beets-library bad my_import:[n] # delete 'junk' files from import zone rm -r /opt/music/to_import/_delete_me ########## # litmus tests (optional) ########## # check for dupes beets-library duplicates | uniq -d # remove dupes from lib and move dupes for verification / follow up as appropriate beets-library duplicates --move /opt/music/dupes # ensure no dangling files in library prior to missing track cleanup beets-library unimported beets-library unimported | xargs -I{} mv {} /opt/music/unimported/ # check for missing tracks beets-library missing # list all ablums with one or more missing tracks beets-library ls -f '$albumartist - $album - $path' -a missing:1.. # does not change filesystem ; removes albums with missing tracks from library beets-library remove -a missing:1.. # verify this looks appropriate and matches the output from missing beets-library unimported # move missing out of library for future follow up beets-library unimported | xargs -I{} mv {} /opt/music/missing/ ########## # main processing ########## # wipe replay gain values & process fresh (essentially: ignore values on incoming tracks) beets-library modify -a my_import:[n] r128_album_gain! rg_album_gain! beets-library modify my_import:[n] r128_album_gain! r128_track_gain! rg_album_gain! rg_track_gain! # pull down last.fm genre stuff beets-library lastgenre my_import:[n] # fetch cover art beets-library fetchart my_import:[n] # chromaprint analysis beets-library fingerprint my_import:[n] # essentia data extraction -- music analysis (long runtime) beets-library xtractor my_import:[n] # replay gain for albums (long runtime, can be resumed if above clear command run first) beets-library ls -a -f '$id' my_import:[n] rg_album_gain::^$ | \ xargs -d "\n" -n1 -o -t -I{} beet --config /opt/music/beets/library.yaml -v replaygain -a id:{} # replay gain for tracks (long runtime, can be resumed if above clear command run first) beets-library ls -f '$id' my_import:[n] rg_track_gain::^$ | \ xargs -d "\n" -n1 -o -t -I{} beet --config /opt/music/beets/library.yaml -v replaygain id:{} ########## # cleanup files & generate files for music server ########## # scrub file tags & write only beets tracked metadata to files beets-library scrub my_import:[n] # run conversion for airsonic alternatives profile -- manage the 'compressed audio library' automagically beets-library alt update airsonic # check for dupes in 'alternatives' area duplicate_alternatives ########## # litmus test ########## # check library data is ok or at least 'looks reasonable plus or minus dupes or bad tracks' beets-library stats