feat(bktemp):Add checkAppFileDir template
[BK-2020-03.git] / user / bkmusic
1 #!/bin/bash
2
3 # Date: 2020-04-28T18:31Z
4 # Author: Steven Baltakatei Sandoval
5 # Description: Runs mpv to listen to custom playlist generated by cron_vensagusni_day.sh
6
7 TARGET_PLAYLIST="/home/baltakatei/Music/music_library_playlist.m3u"
8 OUTPUT_LOG_PATH="/home/baltakatei/Sync/kodawkuori-07/2020/archive-PERS/logs/activity/$(date +%Y%m%dT%H%M%S.%N%z)..mpv_history.log"
9 OUTPUT_LOG_DIR="$(dirname $OUTPUT_LOG_PATH)"
10
11 if ! [ -d "$OUTPUT_LOG_DIR" ]; then
12 echo "ERROR: Output log directory not found:""$OUTPUT_LOG_DIR" 1>&2 ; exit 1;
13 fi
14
15 if ! [ -f "$TARGET_PLAYLIST" ]; then
16 echo "ERROR: Playlist file not found:""$TARGET_PLAYLIST" 1>&2 ; exit 1;
17 fi
18
19 mpv "$TARGET_PLAYLIST" --no-video --log-file="$OUTPUT_LOG_PATH" --msg-time;
20
21 exit 0