repo: music
action: commit
revision: 
path_from: 
revision_from: e31af2771e634def61aa17bdf7992d0eff0747be:
path_to: 
revision_to: 
git.thebackupbox.net
music
git clone git://git.thebackupbox.net/music
commit e31af2771e634def61aa17bdf7992d0eff0747be
Author: epoch 
Date:   Thu Jul 30 07:25:37 2020 -0500

    added ogg support. will need "vorbiscomment" program

diff --git a/music-fileinfo b/music-fileinfo
index 65493a0a81920645ad7c6ba5ee5244c66bcb0ffc..
index ..1fe1fa417b0c5f7123e98f5152b76b70f832ca57 100755
--- 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
index 1c409dbdc561b4f38c60a393574ea8a0dc51ad88..
index ..650e36bb379e759463fdb4dce91c66c594d5a563 100755
--- 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-----