Sab's Music Player is a comprehensive music application built with Python. It features a user-friendly interface for managing playlists, favorites, and albums, along with seamless playback functionality. This app leverages Tkinter for the UI and SQLite for database management, offering a robust solution for music lovers.
- Overview
- Features
- Technologies Used
- Panels
- Database Structure
- Setup and Installation
- Future Enhancements
- Contributing
Sab's Music Player is designed to provide a smooth experience for managing and playing your favorite songs. With intuitive controls and database-backed functionality, the app ensures your music library and preferences are always accessible.
- User authentication with Login and Registration.
- Playlist Management: Load songs from directories or the database.
- Favorites: Save and manage favorite songs.
- Album Covers: Dynamic display of album covers or a default image.
- Seamless Playback: Play, pause, skip, and rewind tracks.
- SQLite Database Integration: Manage users, songs, and favorites efficiently.
- Python
- Tkinter: GUI development.
- Pygame: Music playback.
- SQLite3: Database integration.
- Pillow: Image handling for album covers.
- The entry point to the application.
- Features:
- Login Form: Users can log in with their credentials.
- Registration Form: New users can create an account.
- Database interaction ensures secure storage and validation of user credentials.
- The central hub of the application.
- Features:
- Playlist: Displays the loaded songs with titles.
- Control Buttons:
- Play: Start playing the selected song.
- Pause: Pause the current song.
- Next: Skip to the next track.
- Previous: Return to the previous track.
- Favorite: Save the current song to favorites.
- Menu Bar:
- Local Actions: Load songs from a directory.
- Database Actions: Add songs, load songs, or view favorites from the database.
- Manage your favorite songs.
- Features:
- Displays all saved favorite songs for the logged-in user.
- Allows playing directly from the favorites list.
Here is UserID = 1's favorite songs:
- Located on the right side of the main panel.
- Dynamically displays:
- The album cover from the song's folder (
cover.jpg). - A default image if no album cover is found.
- The album cover from the song's folder (
I used SQLite3 for database integration. Here is my tables:
-
Users Table:
- Stores user credentials.
- Fields:
UserID,Username,Password.
-
Songs Table:
- Tracks information about songs.
- Fields:
SongID,Title,Path,AlbumID.
-
Albums Table:
- Contains album details.
- Fields:
AlbumID,AlbumName,Path,Cover.
-
Favorites Table:
- Manages user favorites.
- Fields:
ID,UserID,SongID.
git clone https://github.com/sabvillainy/music-player.git
cd music-playerpip install pygame pillowNote: You need to login first to run the app. So firstly, you need to run login.py and login with a user information that exists in the database. Although, you can register with the "Register from here" button on the panel. And then, you'll be directed to the main app.
- Add advanced playlist management features.
- Improve UI/UX with a modern framework like PyQt5.
- Expand the database functionality for better analytics.
- Integrate with online music libraries or APIs (e.g., Spotify API).
Contributions are welcome! Please fork the repository and create a pull request with your changes.





