A modern, simple desktop music player built with Python, PyQt6, and VLC
Play your local MP3 files with a responsive interface, Hebrew support, search, shuffle, repeat, favorites, playlists, and keyboard shortcuts.
- 🎵 Play all your local
.mp3files from thesongsfolder - 🖥️ Modern, responsive interface with dark theme
- 🔎 Search bar for instant filtering of songs
- 🔂 Repeat modes: none, repeat one, repeat all
- 🔀 Shuffle mode
- ⭐ Mark and view favorite songs
- ⏩ Seek bar: click or drag to jump to any point in the song
- 🗂️ Create, delete, and manage playlists (add/remove songs)
- ⌨️ Rich keyboard shortcuts (see below)
- 🏷️ Hebrew and English support
- 🗂️ Remembers your favorites and playlists between sessions
- 🖱️ Double-click to play, click buttons for controls
- Python 3.8 or newer
- VLC Media Player (must be installed on your system)
- Python packages:
PyQt6,python-vlc
git clone https://github.com/yourusername/Music-Player-App-1.git
cd Music-Player-App-1python -m venv venvActivate the environment:
- Windows:
.\venv\Scripts\activate
- Linux:
source venv/bin/activate
pip install PyQt6 python-vlc- Download and install from https://www.videolan.org/vlc/
- Make sure VLC is accessible from your system (usually automatic).
- Place your
.mp3files in thesongsfolder inside the project directory. - If the folder does not exist, create it manually.
python main.py- All
.mp3files in thesongsfolder will appear in the song list. - Double-click a song to play it.
- Use the control buttons for play/pause, next, previous, repeat, shuffle, and theme.
- Click or drag on the seek bar to jump to any point in the song.
- Use the search bar to filter songs by name.
- Mark songs as favorites with the ⭐ button and view only your favorites.
- Create, delete, and manage playlists (add/remove songs to playlists).
- The interface supports both Hebrew and English.
| Action | Shortcut |
|---|---|
| Play/Pause | Space / S |
| Next Song | → / D |
| Previous Song | ← / A |
| Repeat Mode | ↑ / W |
| Shuffle Mode | ↓ |
| Focus Search Bar | F |
| Show Shortcuts Help | H |
Music-Player-App-1/
├── main.py # Main application file
├── README.md
├── favorites.txt # User favorites (JSON)
├── playlists.json # User playlists (JSON)
├── songs/ # Place your MP3 files here
│ └── (your mp3 files)
├── core/ # Core logic (no UI)
│ ├── favorites_manager.py
│ ├── playlists_manager.py
│ ├── utils.py
│ └── vlc_controller.py
├── widgets/ # All UI components
│ ├── controls.py # Control buttons (play, pause, etc.)
│ ├── sidebar.py # Sidebar (song list, search, playlist toggling)
│ ├── slider.py # ClickableSlider widget
│ └── player/ # Main player logic and UI
│ ├── main_player.py # MusicPlayer class (main logic/UI)
│ ├── events.py # Event handling (if used)
│ ├── state.py # State management (if used)
│ └── ui.py # UI helpers (if used)
- All UI code is under
widgets/(modularized by component). - All core logic (VLC, favorites, playlists, utils) is under
core/. - The main player logic is in
widgets/player/main_player.py. - Place your
.mp3files in thesongs/folder at the project root.
-
No songs appear:
Make sure your.mp3files are in thesongsfolder and have the correct extension. -
VLC not found:
Ensure VLC is installed and accessible. On Windows, the installer usually adds VLC to your PATH automatically. -
Other issues:
Make sure all dependencies are installed and you are using a supported Python version.
-
Install Python 3 and pip (if not already installed):
sudo apt update sudo apt install python3 python3-pip
-
Install VLC:
sudo apt install vlc
-
Install Python dependencies:
pip3 install PyQt6 python-vlc
-
Run the app:
python3 main.py
To create a desktop shortcut (icon) for the app:
- Create a file named
MusicPlayer.desktopon your desktop:nano ~/Desktop/MusicPlayer.desktop - Paste the following content (update the paths if needed):
[Desktop Entry] Version=1.0 Type=Application Name=Music Player Exec=python3 /home/youruser/Music/Music-Player-App-1/main.py Icon=audio-x-generic Terminal=false - Save and exit (
Ctrl+O,Enter,Ctrl+X). - Make it executable:
chmod +x ~/Desktop/MusicPlayer.desktop - Double-click the icon to launch the app.
To create a desktop shortcut (icon) that launches the app:
- Install the required package:
pip install pywin32
- Save the following script as
create_shortcut.pyin your project folder:import os import sys from win32com.client import Dispatch def create_shortcut(): desktop = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop') shortcut_path = os.path.join(desktop, "Music Player.lnk") python_path = sys.executable script_path = r"c:\\...\\Music-Player-App-1\\main.py" shell = Dispatch('WScript.Shell') shortcut = shell.CreateShortCut(shortcut_path) shortcut.Targetpath = python_path shortcut.Arguments = f'"{script_path}"' shortcut.WorkingDirectory = os.path.dirname(script_path) shortcut.IconLocation = python_path shortcut.save() print("Shortcut created on Desktop!") if __name__ == "__main__": create_shortcut()
- Run the script:
python create_shortcut.py
- A "Music Player" icon will appear on your desktop. Double-click to launch the app.
This project is licensed under the MIT License.
See LICENSE for details.