2 # Copyright (C) 2019 Ian Kelling
3 # SPDX-License-Identifier: AGPL-3.0-or-later
4 if [[ -s ~
/.bashrc
]];then . ~
/.bashrc
;fi
6 # find -type f -name '*.flac' | while read -r f; do
7 # mkdir -p "../flacs/$(dirname "$f")"
8 # mv -T "$f" ../flacs/"$f"
13 # todo, add settings from /etc/default/nfs-{common,kernel-server}
14 # todo: do mysql setup. kodi install. mysql backup.
16 # in kodi, music, add files, named source, add network share,
17 # server address: iank.life
25 find -type f \
( -name '*.flac' -or -name '*.mp3' -or -name '*.m4a' \
) |
while read -r f
; do
26 rating
=$
(kid3-cli
-c "get RATING" "$f")
27 if [[ ! $rating ]]; then
40 d
=${d#./}/ # use exact dir format that is in database
41 cat >>/a
/tmp
/y.sql
<<EOF
43 inner join path on song.idPath = path.idPath
44 set song.userrating = $rating
45 where song.strFileName = '${f##*/}' and path.strPath = 'nfs://iank.life/k/music/$d';