Compare commits

..

2 Commits

Author SHA1 Message Date
coolneng 668dc6d0af
Fix font color problem in waybar 2022-10-30 13:32:09 +01:00
coolneng a03ee37cb2
Improve torrent name parsing of peerflix 2022-10-28 11:10:33 +02:00
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ player=mpv
data_file=$HOME/Documents/IT/peerflix-db.csv
parse_csv() {
show_name=$(echo "$1" | cut -d "=" -f 3 | awk -F "S[0-9]|[S|s]eason" '{print $1}' | tr -d "[:digit:]%" | tr +. " " | sed -e 's/[[:space:]]*$//')
show_name=$(echo "$1" | cut -d "=" -f 3 | awk -F "S[0-9]|[S|s]eason" '{print $1}' | tr -d "[:digit:]%" | tr +. " " | tr -d "[:space:]")
episode=$(awk -F ',' -v var="$show_name" '$1 ~ var {print $2}' "$data_file")
line_number=$(awk -F ',' -v var="$show_name" '$1 ~ var {print NR}' "$data_file")
}