parent
ab611227cc
commit
ae6e57e2d1
Binary file not shown.
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if correct number of arguments is provided
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 /path/to/font.ttf"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FONT_FILE="$1"
|
||||
|
||||
# Check if the font file exists
|
||||
if [ ! -f "$FONT_FILE" ]; then
|
||||
echo "Error: Font file not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find and process all .mkv files
|
||||
find . -type f -name "*.mkv" | while read -r mkv_file; do
|
||||
echo "Processing: $mkv_file"
|
||||
|
||||
mkvpropedit "$mkv_file" \
|
||||
--attachment-name "$(basename "$FONT_FILE")" \
|
||||
--attachment-mime-type application/x-truetype-font \
|
||||
--add-attachment "$FONT_FILE"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Successfully added font to: $mkv_file"
|
||||
else
|
||||
echo "Failed to add font to: $mkv_file"
|
||||
fi
|
||||
done
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
rclone sync --bwlimit=8.5M /mnt/media/Music gabrielhfarrell-drive:MediaLibrary/Music
|
||||
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
for i in *.mkv; do
|
||||
if [ -f "${i%.*}".eng.srt ] && [ ! -e "${i%.*}"-sub.mkv ]; then
|
||||
mkvmerge -o "${i%.*}"-sub.mkv "$i" --default-track 0 --language 0:eng "${i%.*}".eng.srt
|
||||
fi
|
||||
done
|
||||
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# usage: import_music.sh [opts]
|
||||
|
||||
# This script will:
|
||||
# - find unimported music in $IMPORT_DIR
|
||||
# - use metaflac to add replay gain to all files
|
||||
# - (optional w/ --musicbrainz) use MusicBrainz data to tag the files
|
||||
# - match the artist with a known list of romanized japanese artists, and
|
||||
# replace the artist tag with the native japanese artist name
|
||||
# note: the album will still be placed under the romanized name folder
|
||||
# - copy (or move with --move) the music to $MUSIC_DIR/Artist/Album
|
||||
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Sets Artist and AlbumArtist tags to arg for all .flac in . recursively.
|
||||
|
||||
artist=$1
|
||||
|
||||
# Ensure metaflac is installed
|
||||
if ! command -v metaflac &> /dev/null; then
|
||||
echo "metaflac is required but not installed. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find and update all .flac files recursively
|
||||
find . -type f -iname "*.flac" | while IFS= read -r flac; do
|
||||
echo "Updating tags in '$flac'..."
|
||||
metaflac --remove-tag=ALBUMARTIST --remove-tag="ALBUM ARTIST" --remove-tag="ALBUM_ARTIST" "$flac"
|
||||
metaflac --set-tag="ALBUMARTIST=$artist" "$flac"
|
||||
metaflac --remove-tag=ARTIST "$flac"
|
||||
metaflac --set-tag="ARTIST=$artist" "$flac"
|
||||
done
|
||||
|
||||
echo "All matching FLAC files updated."
|
||||
Loading…
Reference in new issue