29 lines
396 B
Bash
Executable File
29 lines
396 B
Bash
Executable File
#!/bin/sh
|
|
|
|
subsonic() {
|
|
subsonic-cli -c /home/sdk/.subsonic-cli.conf $@
|
|
}
|
|
|
|
next=1
|
|
offset=0
|
|
until [ $next -eq 0 ]
|
|
do
|
|
_someAlbums=$(subsonic \
|
|
-p type alphabeticalByArtist \
|
|
-p size 500 -p offset $offset getAlbumList2 \
|
|
| jq .albumList2.album[])
|
|
offset=$(( offset + 500 ))
|
|
_fullAlbums="\
|
|
$_fullAlbums
|
|
$_someAlbums
|
|
"
|
|
if [ -z "$_someAlbums" ]
|
|
then
|
|
next=0
|
|
fi
|
|
done
|
|
|
|
|
|
|
|
echo $_fullAlbums | jq
|