To rerun the experiment described in the blogpost, follow these steps.
We use a python package called spotify-cli to be able to play, pause, save (/download) music through the Spotify application installed on your device.
Follow the steps according to the spotify-cli README. Important to note is that you need to have your Spotify client up and running to use the interface. Summarized:
- In terminal, run: pip3 install spotify-cli --upgrade
- In terminal, run: spotify auth login
- This runs guides to an online login page, where you need to login to Spotify to be able to use the interface
- For instructions on the possibilities, run spotify --help, this contains all the instructions necessary to use the interface
We use Intel Power Gadget to measure the energy usage on the device. Install this using the instructions on the website.
The script file used for the first run can be found here and the script file used for the second run can be found here. The script file will ask the experimenter to manually execute either a clear of the cache, or a download deletion. This will happen before a stream run, a play of a downloaded song run or the downloading of a song run. After the experimenter has completed the task, the experimenter can press any key and the script will continue to run.
The scripts run according to the logic explained in the blogpost (add link!). The hard/software settings needed to achieve the results can also be found there.