config/music: Update music path

This commit is contained in:
xerus2000 2020-09-04 12:05:10 +02:00
parent dd2ddfc9d1
commit 9383c9b8de
2 changed files with 17 additions and 3 deletions

View File

@ -1,11 +1,23 @@
MUSIC="/home/janek/daten/musik"
MUSIC="/home/janek/daten/music"
AUDIO="/home/janek/daten/audio"
MUSIC_RAW="$audio_folder/songs/_raw"
edpl() {
$EDITOR $(find $MUSIC/Playlists -iname "$1\.*" | grep . || find $MUSIC/Playlists -iname "$1*")
}
makePl() { echo ${2:-empty} >$1.m3u8 }
makePls() {
i=1; while test $i -le ${1:-9}; do makePl "${2:-Ω}$i" "empty$i"; ((i++)); done
}
fixPl() {
sed -i 's/\/storage\/AAAA-AAAA\/musik/../g' *
}
plCd() {
dir=${2:-cd}
mkdir $dir
cat $1 | python -c "import sys, urllib as ul; [sys.stdout.write(ul.unquote_plus(l)) for l in sys.stdin]" | sed '=' | sed -r 's/^[0-9]$/0\0/' | sed -r "N; s/(.*)\n(.*\/[0-9 ]*(.*))/'\2'\n'$dir\/\1 \3'/" | xargs -L 2 cp
}
findsongs() {
find -regextype posix-extended -maxdepth 1 -type f -regex "${1:-.*\.(mp3|flac|wav|m4a)}" -printf "%P\n"

View File

@ -1,4 +1,6 @@
#!/bin/sh
playlistPath="$HOME/daten/music/Playlists"
vlc $(find $playlistPath -iname "Focus$1.m3u8" | grep . || find $playlistPath -iname "$1.m3u8") >/dev/null 2>&1 &
MUSIC="$HOME/daten/music"
playlistPath="$MUSIC/Playlists"
result="$(test "$1" && (find $playlistPath -iname "focus-$1.m3u8" | grep . || find $playlistPath -iname "$1.m3u*" | grep . || find $MUSIC -iname "*$1*") || echo "$playlistPath/focus.m3u8" )"
killall -q vlc; sleep 1; vlc --qt-start-minimized --loop --random "$result" >/dev/null 2>&1 &