mirror of
https://github.com/Dummi26/musicdb.git
synced 2025-12-14 11:56:16 +01:00
tags can now be used
filldb: Year and Genre will be read from MP3/ID3 tags and added as Tags.
client: Tags can (and will) be displayed in the status bar.
client: StatusBar text can be configured via ~/.config/musicdb-client/config_gui.toml
client: Added a proper default config file at src/config_gui.toml
(note: this is in src/ so that include_bytes! can use a path without /, so it will compile on windows)
client: users will need to add the new `[text]` section to their gui_config.toml!
This commit is contained in:
Binary file not shown.
@@ -58,6 +58,13 @@ fn main() {
|
||||
eprintln!("searching for artists...");
|
||||
let mut artists = HashMap::new();
|
||||
for song in songs {
|
||||
let mut general = GeneralData::default();
|
||||
if let Some(year) = song.1.year() {
|
||||
general.tags.push(format!("Year={year}"));
|
||||
}
|
||||
if let Some(genre) = song.1.genre_parsed() {
|
||||
general.tags.push(format!("Genre={genre}"));
|
||||
}
|
||||
let (artist_id, album_id) = if let Some(artist) = song
|
||||
.1
|
||||
.album_artist()
|
||||
@@ -135,7 +142,7 @@ fn main() {
|
||||
artist: artist_id,
|
||||
more_artists: vec![],
|
||||
cover: None,
|
||||
general: GeneralData::default(),
|
||||
general,
|
||||
cached_data: Arc::new(Mutex::new(None)),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user