Skip to content

A Raspberry Pi interface to display Spotify listening data

Notifications You must be signed in to change notification settings

brandoncalia/PiTunes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PiTunes 🎷

PiTunes is Raspberry Pi interface to display data on your Spotify listening.

The software displays your top three artists and top three songs of the last week, refreshing weekly. The data is then stored in a MySQL database (of your configuration) to store listening statistics over time. LastFM and Spotify APIs are used in tandem to retrieve the necessary info.

🔆 Images

Implementation

interface interface

Interface

interface

🌀 Requirements

The following are needed to set up the project as shown:

  • Raspberry Pi
  • 1024x600 screen
    • GUI is only fit for the 1024x600 screen I have with my Raspberry Pi. However, this resolution is fairly standard for aftermarket RPi displays.
  • Spotify web API keys
  • LastFM web API keys
  • (OPTIONAL): MySQL installation with a database created to store weekly data in
    • If you wish to store your weekly data in a MySQL database, the code is implemented
    • Otherwise, it can be commented out

Once you have these, you will need to enter your unique keys / account passwords in the corresponding variables in the code. These are clearly labelled.

🐍 Setup

The project is two scripts (Tkinter windows) that run simultaneously. This is so that when the GUI closes to refresh weekly, the refresh screen will already be running and displayed in the window underneath. There is most definitely a better way to do this, but I couldn't get it to work the way I wanted.

  1. Enter your keys/passwords/database info into the code
  2. Ensure your file path is correctly setup - PiTunes.py and refresh.py should be contained within the main folder, along with an 'assets' folder containing the necessary images
  3. Install all the necessary packages
  4. Open a terminal from the folder and run:
    • python refresh.py
  5. Tab out and open a separate terminal to run:
    • python PiTunes.py
  6. Tab the windows such that gui is laid over the refresh window

🚀 Future improvements

Some things I'd like to add to what I have so far:

  • Compatability with different resolutions
  • A more interactive interface
    • A button to see statistics over time
    • Scrolling text / an updating feed
  • A better way to deal with the refresh screen
  • Different ways of storing data over time
  • Need to implement better error catching, if connection errors occur
  • UPDATE: there is an error with song names that contain certain special characters. This won't take long to fix, I just have to add some special cases

About

A Raspberry Pi interface to display Spotify listening data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages