8. Challenge: MP3 Class

8.1 Prep

Create a github repo called glblcd_MP3, initialise a local repo at ~/glblcd_MP3, and setup your github repo as a remote.

8.2 Core challenge

The aim of this challenge is to implement a Class in Python to maintain an MP3 Playlist. This class could be used when developing the software for a music App on a smartphone or an mp3 player.

This MP3 playlist will be stored as a queue of MP3 tracks. When new tracks are being added to the playlist, they are enqueued at the end of the playlist.

The key features that we will implement within this class are the ability to:

  • Load a playlist from a text file
  • Display all the tracks from the playlist
  • Enqueue (Add) an MP3 to the playlist

8.3 Make your repo public

Make your repository public so that we can look it up on GitHub.

8.4 Further work

Additionally implement the following features within the Playlist class:

  • Remove an MP3 from the playlist
  • Save a playlist on a text file
  • Shuffle all the songs in the playlist
  • Count the number of tracks in the playlist
  • Calculate the total duration of the playlist
  • Clear/Reset the playlist
  • Check if the playlist is empty