repo: music action: commit revision: path_from: revision_from: e31af2771e634def61aa17bdf7992d0eff0747be: path_to: revision_to:
commit e31af2771e634def61aa17bdf7992d0eff0747be Author: epochDate: Thu Jul 30 07:25:37 2020 -0500 added ogg support. will need "vorbiscomment" program diff --git a/music-fileinfo b/music-fileinfo
--- a/music-fileinfo +++ b/music-fileinfo @@ -14,6 +14,12 @@ if [ "$ext" = "flac" ];then album="$(metaflac --show-tag=album "$1" | cut -d= -f2-)" year="$(metaflac --show-tag=date "$1" | cut -d= -f2-)" fi +if [ "$ext" = "ogg" ];then + artist="$(vorbiscomment "$1" | grep "^ARTIST=" | cut -d= -f2-)" + title="$(vorbiscomment "$1" | grep "^TITLE=" | cut -d= -f2-)" + album="$(vorbiscomment "$1" | grep "^ALBUM=" | cut -d= -f2-)" + year="$(vorbiscomment "$1" | grep "^DATE=" | cut -d= -f2-)" +fi if [ "$artist" -a "$title" -a "$album" -a "$year" ];then printf '"%s" by %s on %s (%s)\n' "$title" "$artist" "$album" "$year" else diff --git a/music-init b/music-init
--- a/music-init +++ b/music-init @@ -1,2 +1,3 @@ -#!/bin/sh +#!/bin/bash +set -o pipefail while true;do find -H ~/Music/ | egrep -i '\.m4a$|\.mp3$|\.flac$' | shuf;done | music-playlist
-----END OF PAGE-----