Skip to content

Commit

Permalink
volspotconnect2- update readme - reduce cache size
Browse files Browse the repository at this point in the history
  • Loading branch information
balbuze committed Feb 28, 2017
1 parent 004b608 commit b0a2bbd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 30 deletions.
4 changes: 2 additions & 2 deletions plugins/music_service/volspotconnect2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "volspotconnect2",
"version": "0.2.2",
"version": "0.2.3",
"description": "Plugin for Spotify connect in Volumio2. Requires a Premium account or Family account",
"main": "index.js",
"scripts": {
Expand All @@ -9,7 +9,7 @@
"author": "Balbuze",
"license": "",
"volumio_info": {
"prettyName": "Volumio Spotify Connect2 ver0.2.2",
"prettyName": "Volumio Spotify Connect2 ver0.2.3",
"icon": "fa-spotify",
"plugin_type": "music_service"
},
Expand Down
22 changes: 14 additions & 8 deletions plugins/music_service/volspotconnect2/readme.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
Febuary 27th 2017
Febuary 28th 2017
VOLUMIO SPOTIFY CONNECT 2 PLUGIN

This new version use librespot https://github.com/plietar/librespot
If it works as expected, it will remplace volspotconnect
It is just a prototype, and may not work as expected

Tested on :
RPI 0 not working yet
RPI B not working yet
RPI B+ not working yet
RPI2
SPARKY
PINE64
x86 laptop
- RPI 0 not working yet
- RPI B not working yet
- RPI B+ not working yet
- RPI2 ok
- SPARKY ok
- PINE64 ok
- x86 laptop ok


IMPORTANT

- Requires a Premium or Family account

To install

- You only need to download volspotconnect2.zip. Take care to download the "raw" file, not only html from github...
- From Volumio UI choose "plugins" in setting, then "upload plugin" and select the file you have downloaded
Last changes

Febuary 28th

- update readme
- update remove.sh - chache size is now 64Mo

Febuary 27th

- option to share or no the device
Expand Down
24 changes: 4 additions & 20 deletions plugins/music_service/volspotconnect2/remove.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
# !/bin/bash
# this script removes last file in volspotconnect2 cache when cachesize limit is reached
ucachesize=120 #cache size Mo
#let ucachesize=$cachesize/2
ucachesize=64 #cache size Mo
cfolder=/tmp/files #folder where cache files are stored
#c2folder=/dev/shm/volspotconnect2/cache/c2/files


cd $cfolder
checkedsize=$(du -sm $cfolder)
size=$(echo $checkedsize | cut -d' ' -f1)

while [ $size -gt $ucachesize ]
while [ $size -gt $ucachesize ] # condition to execute the cache purge
do
echo 'cache need to purged'
echo 'cache needs to be purged'
ls -tr1 | head -n 1 | xargs rm -Rf
echo purged
checkedsize=$(du -sm $cfolder)
size=$(echo $checkedsize | cut -d' ' -f1)
echo 'cache uses' $size 'Mo'
done
echo 'cache not full, nothing do'
#cd $c2folder
#checkedsize=$(du -sm $c2folder)
#size=$(echo $checkedsize | cut -d' ' -f1)

#while [ $size -gt $ucachesize ]
# do
# echo 'cache need to purged'
# ls -tr1 | head -n 1 | xargs rm -Rf
# echo purged
# checkedsize=$(du -sm $cfolder)
# size=$(echo $checkedsize | cut -d' ' -f1)
# echo 'cache c2 uses' $size 'Mo'
# done
#echo 'cache C2 not full, nothing to do'

Binary file modified plugins/music_service/volspotconnect2/volspotconnect2.zip
Binary file not shown.

0 comments on commit b0a2bbd

Please sign in to comment.