repo: music action: commit revision: path_from: revision_from: bfbfc1994353c02fa1b055b8d0df7f9e90ebbab3: path_to: revision_to:
commit bfbfc1994353c02fa1b055b8d0df7f9e90ebbab3 Author: epochDate: Thu Sep 3 23:17:52 2020 -0500 id3sort now works for id3v1 and id3v2 tags. was broken for v1. also, now id3sort is in the makefile install target diff --git a/Makefile b/Makefile
--- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ clean: icy-metadata: icy-metadata.c install: all + install id3sort $(PREFIX)/bin/ install qargs $(PREFIX)/bin/ install music-player $(PREFIX)/bin/ install music-playpause $(PREFIX)/bin/ diff --git a/id3sort b/id3sort
--- a/id3sort +++ b/id3sort @@ -1,8 +1,10 @@ -#!/bin/sh -id3v2 -R "$@" \ - | egrep '^File|TRCK' \ - | cut '-d ' -f2- \ +#!/bin/bash +### this is done this way so it works with both v1 and v2 +id3v2 -l "$@" \ + | egrep '^id3v2 tag info for |^Comment:|^/' \ + | sed 's/^.* Track: //g' \ + | sed 's|id3v2 tag info for \(.*\):$|\1|g' \ + | sed 's/: No ID3v2 tag$//g' \ | paste - - \ - | tr '\t' ':' \ - | sort -t: -n -k2 \ - | cut -d: -f1 + | sort -t$'\t' -n -k1 \ + | cut -f2
-----END OF PAGE-----