lots of fixes, new music stuff
[distro-setup] / music-tag-sync
diff --git a/music-tag-sync b/music-tag-sync
deleted file mode 100644 (file)
index 06248e0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-# Copyright (C) 2019 Ian Kelling
-# SPDX-License-Identifier: AGPL-3.0-or-later
-if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
-# cd /k/music
-# find -type f -name '*.flac' | while read -r f; do
-#     mkdir -p "../flacs/$(dirname "$f")"
-#     mv -T "$f" ../flacs/"$f"
-# done
-
-
-
-# todo, add settings from /etc/default/nfs-{common,kernel-server}
-# todo: do mysql setup. kodi install. mysql backup.
-
-# in kodi, music, add files, named source, add network share,
-# server address: iank.life
-# path: k/music
-
-
-
-rm -f /a/tmp/y.sql
-
-cd /k/music
-find -type f \( -name '*.flac' -or -name '*.mp3' -or -name '*.m4a' \) | while read -r f; do
-    rating=$(kid3-cli -c "get RATING" "$f")
-    if [[ ! $rating ]]; then
-           echo $f
-           continue
-    fi
-    rating=$((rating*2))
-
-    ## begin sql escaping
-    f="${f//\"/\\\"}"
-    f="${f//\'/\\\'}"
-    f="${f//_/\\_}"
-    f="${f//%/\\%}"
-    ## end sql escaping
-    d=${f%/*}
-    d=${d#./}/ # use exact dir format that is in database
-    cat >>/a/tmp/y.sql <<EOF
-update song
-inner join path on song.idPath = path.idPath
-set song.userrating = $rating
-where song.strFileName = '${f##*/}' and path.strPath = 'nfs://iank.life/k/music/$d';
-EOF
-done