Compare commits

...

9 Commits
1.7.0 ... main

Author SHA1 Message Date
talwat
e702c1de00 docs: update feature list and fix some wording 2025-09-25 19:40:19 +02:00
talwat
8f837302c3 docs: update list of flags 2025-09-25 19:25:03 +02:00
talwat
226c674295 style: format code 2025-09-25 19:19:43 +02:00
talwat
66f2243b2c fix: don't crash if bookmarks.txt is missing
this was a one line fix that i just completely forgot about whilst improving the bookmarking system.
i feel very, very stupid.
2025-09-25 19:16:22 +02:00
Dario Griffo
05fe8069ea
docs: fix debian mirror url
Fix mirror url
2025-09-25 18:42:34 +02:00
talwat
9b61dffb12 chore: bump version due to mistake with scraper
yes, i messed up... it's fixed now.
2025-09-25 16:07:32 +02:00
talwat
c2530453fb chore: rescrape and update chillhop list 2025-09-25 16:07:07 +02:00
talwat
e4fd542edf chore: purge a few more songs from scraper 2025-09-25 16:03:32 +02:00
talwat
632b298de2 docs: properly link music.md 2025-09-25 15:50:26 +02:00
7 changed files with 61 additions and 57 deletions

2
Cargo.lock generated
View File

@ -1508,7 +1508,7 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "lowfi"
version = "1.7.0"
version = "1.7.2"
dependencies = [
"arc-swap",
"atomic_float",

View File

@ -1,6 +1,6 @@
[package]
name = "lowfi"
version = "1.7.0"
version = "1.7.2"
edition = "2021"
description = "An extremely simple lofi player."
license = "MIT"

View File

@ -9,19 +9,16 @@ It'll do this as simply as it can: no albums, no ads, just lofi.
As of the 1.7.0 version of lowfi, **all** of the audio files embedded
by default are from [chillhop](https://chillhop.com/). Read
[MUSIC.md] for more information.
[MUSIC.md](MUSIC.md) for more information.
## Why?
I really hate modern music platforms, and I wanted a small, "suckless"
app that would just play random lofi without video.
I really hate modern music platforms, and I wanted a small, simple
app that would just play random ambient music without video and other fluff.
It was also designed to be fairly resilient to inconsistent networks,
Beyond that, it was also designed to be fairly resilient to inconsistent networks,
and as such it buffers 5 whole songs at a time instead of parts of the same song.
See [Scraping](#scraping) if you're interested in downloading the tracks.
Beware, there's a lot of them.
## Installing
> [!NOTE]
@ -79,7 +76,7 @@ zypper install lowfi
```sh
curl -sS https://debian.griffo.io/3B9335DF576D3D58059C6AA50B56A1A69762E9FF.asc | gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/debian.griffo.io.gpg
echo "deb https://debian.griffo.io//apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/debian.griffo.io.list
echo "deb https://debian.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/debian.griffo.io.list
sudo apt install -y lowfi
```
@ -132,7 +129,7 @@ Yeah, that's it.
> Besides its regular controls, lowfi offers compatibility with Media Keys
> and [MPRIS](https://wiki.archlinux.org/title/MPRIS) (with tools like `playerctl`).
>
> MPRIS is currently optional feature in cargo (enabled with `--features mpris`)
> MPRIS is currently an optional feature in cargo (enabled with `--features mpris`)
> due to it being only for Linux, as well as the fact that the main point of
> lowfi is it's unique & minimal interface.
@ -141,24 +138,44 @@ Yeah, that's it.
If you have something you'd like to tweak about lowfi, you use additional flags which
slightly tweak the UI or behaviour of the menu. The flags can be viewed with `lowfi help`.
| Flag | Function |
| ----------------------------------- | ---------------------------------------------- |
| `-a`, `--alternate` | Use an alternate terminal screen |
| `-m`, `--minimalist` | Hide the bottom control bar |
| `-b`, `--borderless` | Exclude borders in UI |
| `-p`, `--paused` | Start lowfi paused |
| `-d`, `--debug` | Include ALSA & other logs |
| `-w`, `--width <WIDTH>` | Width of the player, from 0 to 32 [default: 3] |
| `-t`, `--track-list <TRACK_LIST>` | Use a [custom track list](#custom-track-lists) |
| `-s`, `--buffer-size <BUFFER_SIZE>` | Internal song buffer size [default: 5] |
| Flag | Function |
| ----------------------------------- | --------------------------------------------------- |
| `-a`, `--alternate` | Use an alternate terminal screen |
| `-m`, `--minimalist` | Hide the bottom control bar |
| `-b`, `--borderless` | Exclude borders in UI |
| `-p`, `--paused` | Start lowfi paused |
| `-f`, `--fps` | FPS of the UI [default: 12] |
| `--timeout` | Timeout in seconds for music downloads [default: 3] |
| `-d`, `--debug` | Include ALSA & other logs |
| `-w`, `--width <WIDTH>` | Width of the player, from 0 to 32 [default: 3] |
| `-t`, `--track-list <TRACK_LIST>` | Use a [custom track list](#custom-track-lists) |
| `-s`, `--buffer-size <BUFFER_SIZE>` | Internal song buffer size [default: 5] |
### Scraping
### Extra Features
lowfi also has an optional `scrape` command enabled by the `scrape` feature.
lowfi uses cargo/rust's "feature" system to make certain parts of the program optional,
like those which are only expected to be used by a handful of users.
#### `scrape` - Scraping
This feature provides the `scrape` command.
It's usually not very useful, but is included for transparency's sake.
More information can be found by running `lowfi help scrape`.
#### `mpris` - MPRIS
Enables MPRIS. It's not rocket science.
#### `extra-audio-formats` - Extra Audio Formats
This is only relevant to those using a custom track list, in which case
it allows for more formats than just MP3. Those are FLAC, Vorbis, and WAV.
These should be sufficient for some 99% of music files people might want to play.
If you dealing with the 1% using another audio format which is in
[this list](https://github.com/pdeljanov/Symphonia?tab=readme-ov-file#codecs-decoders), open an issue.
### Custom Track Lists
> [!NOTE]
@ -168,7 +185,7 @@ More information can be found by running `lowfi help scrape`.
>
> Feel free to contribute your own list with a PR.
lowfi also supports custom track lists, although the default one from Lofi Girl
lowfi also supports custom track lists, although the default one from chillhop
is embedded into the binary.
To use a custom list, use the `--track-list` flag. This can either be a path to some file,
@ -192,7 +209,7 @@ All tracks must be in the MP3 format, unless lowfi has been compiled with the
#### The Format
In lists, the first line is what's known as the header, followed by the rest of the tracks.
Each track will be first appended to the header, and then use that to download
Each track will be first appended to the header, and then use the combination to download
the track.
> [!NOTE]
@ -227,8 +244,8 @@ For example, if you had an entry like this:
Then lowfi would download from the first section, and display the second as the track name.
You can also prepend `file://` to the header track name, which will make lowfi treat it as a local file.
This is useful if you want to use a local file as the base URL, such as:
`file://` can be used in front a track/header to make lowfi treat it as a local file.
This is useful if you want to use a local file as the base URL, for example:
```txt
file:///home/user/Music/

View File

@ -30,7 +30,6 @@ https://stream.chillhop.com/mp3/
8943!Wondering
8906!Soundscapes
8421!Wine & Roses
8469!Interlude
8464!Underwater
8221!The Creator
8467!Cloud Steps
@ -223,7 +222,6 @@ https://stream.chillhop.com/mp3/
9372!Love from NGC 7318
8554!Faces
8005!Interstellar
8001!The Dream
7998!Stay.
7994!Don't know why
7991!Chinatown
@ -311,7 +309,6 @@ https://stream.chillhop.com/mp3/
7839!New Light
7837!Lost Love
7834!Foggy Road
7832!Isolated
7830!Wistful
7842!Nimbus
7841!Chiaroscuro
@ -401,7 +398,6 @@ https://stream.chillhop.com/mp3/
8604!Sleepwell
9485!Dusk
9484!Slowdrive
9446!Quietly, Now
8321!Loved
7880!Get Up and Go
9488!Goodmorning
@ -599,14 +595,12 @@ https://stream.chillhop.com/mp3/
8536!Novel (Calm)
9255!Manner (Forms)
9447!Vinho Verde
9396!Upstream Color
8083!You're Asleep So I Gotta Keep It Down Shh
8688!Home Video
8514!Old Friends
9219!Growing Apart
7925!Upset (hold it in)
9222!Keep Going
9217!Feeling Lost
9228!Reflection
9225!Tumbling
9224!Fox
@ -733,7 +727,6 @@ https://stream.chillhop.com/mp3/
10450!Not A Cloud In Sight
10460!Deeper
10454!Creswick
10448!Slim Bobby
9771!Her Eyes
9775!Perspectives
8599!Otherside
@ -1116,7 +1109,6 @@ https://stream.chillhop.com/mp3/
36922!Treecko is a Cool Starter
37133!Penpals Perhaps
37127!Apple Turnover
41956!Making a Way
43908!Memory
43907!Soft Spot
43906!Envy You
@ -1173,7 +1165,6 @@ https://stream.chillhop.com/mp3/
55317!Fly High Newborn
55313!Coffeebreak
55310!Peaceful Dissociation
55372!Once
53592!Let Go
58841!Still Looking
58840!Longest Wait
@ -1315,14 +1306,8 @@ https://stream.chillhop.com/mp3/
64054!I Don't Want Love
64040!One for Florian
75541!Seu Trio
64045!Cut Free
75544!You Bring Me Life
64036!Curtain Call
64038!High Hope
64043!In the Sun
64047!Sleeping Norboo
64050!Autumn Turned Winter
64056!Harp Trees
64045!Cut Free
75547!Last One
75546!That Summer
75545!Hold it Down
@ -1330,6 +1315,12 @@ https://stream.chillhop.com/mp3/
75542!Hope
75540!When All I Heard Was Artifacts
75539!Cantar
64036!Curtain Call
64038!High Hope
64043!In the Sun
64047!Sleeping Norboo
64050!Autumn Turned Winter
64056!Harp Trees
79272!Early June
74856!Light of World
77527!Guitar Shop

View File

@ -75,7 +75,6 @@ enum Commands {
#[cfg(feature = "scrape")]
Scrape {
// The source to scrape from.
#[clap(long, short)]
source: scrapers::Source,
},
}

View File

@ -39,9 +39,12 @@ impl Bookmarks {
Ok(data_dir.join("bookmarks.txt"))
}
/// Loads bookmarks from the `bookmarks.txt` file.
pub async fn load() -> eyre::Result<Self, BookmarkError> {
let text = fs::read_to_string(Self::path().await?).await?;
let text = fs::read_to_string(Self::path().await?)
.await
.unwrap_or_default();
let lines: Vec<String> = text
.trim_start_matches("noheader")

View File

@ -118,18 +118,12 @@ pub async fn scrape() -> eyre::Result<()> {
const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
const TRACK_COUNT: u64 = 1625;
const IGNORED_TRACKS: [u32; 6] = [
74707, // 404
21655, // Lyrics
21773, // Lyrics
8172, // Lyrics
55397, // Lyrics
75135, // Lyrics
24827, // Lyrics
8141, // Lyrics
8157, // Lyrics
64052, // Lyrics
31612, // Lyrics
const IGNORED_TRACKS: [u32; 20] = [
// 404
74707, // Lyrics
21655, 21773, 8172, 55397, 75135, 24827, 8141, 8157, 64052, 31612, 41956, 8001, 9217,
55372, // Abnormal
8469, 7832, 10448, 9446, 9396,
];
const IGNORED_ARTISTS: [&str; 1] = [