-
-
Save adejones/4eb1e6b9e39fbdd3f07fc1eca354a543 to your computer and use it in GitHub Desktop.
Flac2Alac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ffmpeg -i “$1″ -acodec alac “`basename “$1″ .flac`.m4a” \ | |
-metadata title=\”"$(metaflac –show-tag=TITLE “$1″ | sed ‘s/title=//g’)”\” \ | |
-metadata author=\”"$(metaflac –show-tag=ARTIST “$1″ | sed ‘s/artist=//g’)”\” \ | |
-metadata album=\”"$(metaflac –show-tag=ALBUM “$1″ | sed ‘s/album=//g’)”\” \ | |
-metadata year=\”"$(metaflac –show-tag=DATE “$1″ | sed ‘s/date=//g’)”\” \ | |
-metadata track=\”"$(metaflac –show-tag=TRACKNUMBER “$1″ | sed ‘s/tracknumber=//g’)”\” \ | |
-metadata genre=\”"$(metaflac –show-tag=GENRE “$1″ | sed ‘s/genre=//g’)”\” |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/sh | |
cd “$1″ | |
find “$1″ -type f | grep .flac | sed -e “s,[^.],\’&,” -e “s,\$,\’,” | xargs -I {} sh /root/SABScripts/flac2alac.sh {} | |
find “$1″ -type f | grep .m4a | sed -e “s,[^.],\’&,” -e “s,\$,\’,” | xargs -I {} mv {} “/mnt/Media/iTunes/Automatically Add to iTunes” | |
cd - | |
rm -rf “$1″ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment