micro4scopic/fragplay: Download and play music easily - Codeberg.org
Codeberg has changed its Terms of Use. View complete changes.
LLM-generated content is being restricted. View change or read the blog post
Cryptocurrency projects are no longer allowed. View change
Dismiss
This website requires JavaScript.
micro4scopic/fragplay
Watch
Star
Fork
Code
Issues
Pull requests
Activity
Download and play music easily
4 commits
1 branch
0 tags
39 KiB
Python
90.4%
HTML
7.3%
Shell
2.3%
main
Find a file
HTTPS
Download ZIP<br>Download TAR.GZ<br>Download BUNDLE
Open with VS Code
Open with VSCodium
Open with Intellij IDEA
Repository files (latest commit first)
Filename<br>Latest commit message<br>Latest commit date
micro4scopic
8766fee4f8
update readme
2026-08-05 20:47:52 +02:00
.gitignore
fix gitignore
2026-08-05 19:44:39 +01:00
fragplay
add version info
2026-08-05 19:40:00 +01:00
Install.sh
first commit
2026-08-05 19:29:54 +01:00
LICENSE.md
first commit
2026-08-05 19:29:54 +01:00
README.md
update readme
2026-08-05 20:47:52 +02:00
skel.html
first commit
2026-08-05 19:29:54 +01:00
README.md
fragplay
fragplay is a small Python program that manages playlists and downloads and lets you listen to them via a web page.
Currently, flagplay only supports Linux (UNIX-like operating systems may work).
DISCLAIMER: Even after the songs have been downloaded, copyright laws still apply. You can't redistribute or share music you download without the artist's consent; it is only for personal use.
Features
flagplay:
is small (~325 physical SLOC)
hackable
supports multi-threaded downloading
supports logging with debug info
has autoplay support via JavaScript
lets you rank songs in a playlist
Who is this for?
This program was mostly created for my use because I was annoyed on how you can't create private playlists on Invidious and I wanted a small alternative to things like Navidrome; I just wanted one program that can manage and download my playlists and host it on a web page.
If you want a nice way to manage your playlists and listen to them (especially ad-free), then look no further.
How to use
First, you must install yt-dlp and ffmpeg.
Optionally, if you want to install fragplay system-wide, you can run the install script Install.sh with root permissions.
You can start by creating a playlist by using a music's YouTube video ID (usually after the watch?v=) and assigning it a name. Here is an example:
# fragplay --ids NjgwyC2043I EaM3BcJITis wb4WbQC2nTE --name Puzzle<br>This also works if the playlist already exists, it just appends the latest IDs:
# fragplay --ids Uz1-E9ZLcj8 --name Puzzle<br>If you need to rank an ID in an entry, for example if an old ID is dead and you want a new ID to replace it in the same spot, you can use:
# fragplay --rank 2 --ids wb4WbQC2nTE --name Puzzle<br>This will rank ID wb4WbQC2nTE as spot number 2, and the ID being overwritten (EaM3BcJITis) will be ranked the spot below, and that ID being overwritten will be ranked the spot below, and so on.
Then, host the web server:
# fragplay --host<br>The above command will download your music if needed, generate the web page and output a loopback IP address that you can then go to.
More arguments can be found in fragplay --help.
Web pages are static
Every time you add a new playlist, the web server must be refreshed by running the above command. This is because every time you host the web server, it generates a new static page, meaning it doesn't<br>read your download folder, playlist config, etc. for any information it can get about your playlists. Everything is embedded in your index.html file. This design is good because some browsers don't support Javascript, and since the only Javascript part is the autoplay means you'll still be able to play music.
Miscellaneous
fragplay is young, and there may be certain bugs or edge cases.
If fragplay gets popular, we may add these:
rank whole playlists
custom skel.html (as a command line option)
Windows support
... but for now, fragplay is just a small hobby project, and I don't see the need yet of those features.
License
fragplay is licensed under the GPLv3.
This program is free software: you can redistribute it and/or modify<br>it under the terms of the GNU General Public License as published by<br>the Free Software Foundation, either version 3 of the License, or<br>(at your option) any later version.
This program is distributed in the hope that it will be useful,<br>but WITHOUT ANY WARRANTY; without even the implied warranty of<br>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>GNU General Public License for more details.
You should have received a copy of the GNU General Public License<br>along with this program. If not, see https://www.gnu.org/licenses/.