Showing 2 changed files with 6 additions and 7 deletions
+4 -4
get_cover
... ...
@@ -47,7 +47,7 @@ covered () {
47 47
 
48 48
 get_image () {
49 49
     install_image () {
50
-        mv -f /dev/shm/$2 ${album#*:}/$cover_img.${2##*.} \
50
+        mv -f /dev/shm/$1 ${album#*:}/$cover_img.${1##*.} \
51 51
         && OK \
52 52
         || ERROR "échec en écriture"
53 53
     }
... ...
@@ -61,13 +61,13 @@ get_image () {
61 61
                 display /dev/shm/$2
62 62
                 read -p "on garde ? "
63 63
                 if [[ "$REPLY" =~ [OoYy] ]]; then
64
-                    install_image
64
+                    install_image $2
65 65
                 else
66 66
                     rm /dev/shm/$2
67 67
                     WARNING "vignette rejetée"
68 68
                 fi
69 69
             else
70
-                install_image
70
+                install_image $2
71 71
             fi
72 72
         else
73 73
             WARNING "${album%%:*} type $mime_type"
... ...
@@ -141,7 +141,7 @@ fi
141 141
 
142 142
 if test ${#albums[@]} -eq 0; then
143 143
     albums=($(sql_request 'select printf("%s:'${medias%/}'/%s/%s", mbz_album_id, artist, name)
144
-             from album where cover_art_path = ""
144
+             from album where image_files = ""
145 145
              and name != "[Unknown Album]"'))
146 146
 fi
147 147
 
+2 -3
get_cover.conf
... ...
@@ -13,8 +13,7 @@ pre_get_cover () {
13 13
             || albums[${#albums[@]}]=":$d"
14 14
         done
15 15
         rm $nouveautes
16
-    fi
17
-    if test ${SCAN:-3} -eq 1 -o ${SCAN:-3} -gt 3; then
16
+    elif test ${SCAN:-3} -eq 1 -o ${SCAN:-3} -gt 3; then
18 17
         echo sync
19 18
         sync
20 19
         if test ${SCAN:-3} -gt 3; then
... ...
@@ -37,7 +36,6 @@ pre_get_cover () {
37 36
         else
38 37
             echo scan simple
39 38
         fi
40
-        sudo -u navidrome ~navidrome/navidrome -c $navidrome/navidrome.toml --datafolder $navidrome/ -n --musicfolder $medias scan $full
41 39
     fi
42 40
     if test ${SCAN:-3} -gt 4; then
43 41
         _eta=$(( $(date +%s) - $_eta ))
... ...
@@ -49,6 +47,7 @@ pre_get_cover () {
49 47
         sudo mount -o remount,ro $medias
50 48
         exit
51 49
     fi
50
+    sudo -u navidrome ~navidrome/navidrome -c $navidrome/navidrome.toml --datafolder $navidrome/ -n --musicfolder $medias scan $full
52 51
     sudo mount -o remount,rw $medias
53 52
 }
54 53
 post_get_cover () {