Compare commits

..
3 Commits
Author SHA1 Message Date
Sweetbread 58701a7242 Take cover art from YT if possible 2026-01-14 23:59:41 +03:00
Sweetbread 947f68399f Rename confusing var 2026-01-14 18:11:57 +03:00
Sweetbread 09d937d154 Replace Playing status with Listening 2026-01-14 18:11:57 +03:00
2 changed files with 7 additions and 10 deletions
Generated
+6 -6
View File
@@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1705309234,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1768395095, "lastModified": 1707711327,
"narHash": "sha256-ZhuYJbwbZT32QA95tSkXd9zXHcdZj90EzHpEXBMabaw=", "narHash": "sha256-JaiR0Er0Bx80CT5POOYR1I1tLM7VvC2/ny6mOmkoRQw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "13868c071cc73a5e9f610c47d7bb08e5da64fdd5", "rev": "01737456dfe4907fb5bdc8af39ac8c6d6b1fb551",
"type": "github" "type": "github"
}, },
"original": { "original": {
+1 -4
View File
@@ -59,10 +59,7 @@ fn main() -> Result<(), Box<dyn Error>> {
} else { } else {
let youtube_cover_url = metadata.additional_info.as_ref() let youtube_cover_url = metadata.additional_info.as_ref()
.and_then(|info| info.music_service_name.as_ref()) .and_then(|info| info.music_service_name.as_ref())
.filter( .filter(|service| *service == "YouTube Music")
|service|
["YouTube", "YouTube Music"].contains(&service.as_str())
)
.and_then(|_| metadata.additional_info.as_ref()) .and_then(|_| metadata.additional_info.as_ref())
.and_then(|info| info.origin_url.as_ref()) .and_then(|info| info.origin_url.as_ref())
.and_then(|url| extract_youtube_video_id(url)) .and_then(|url| extract_youtube_video_id(url))