From c10c81127ebb36cc2708c0e3e9c183c8001f7ab1 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Thu, 20 Feb 2020 20:34:57 +0000 Subject: [PATCH] Fix errors thrown on missing album (soundcloud) --- src/device.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/device.rs b/src/device.rs index 97afacb..a81bb29 100644 --- a/src/device.rs +++ a/src/device.rs @@ -593,9 +593,7 @@ artist: element_to_string(metadata .get_child("creator") .chain_err(|| ErrorKind::ParseError)?), - album: element_to_string(metadata - .get_child("album") - .chain_err(|| ErrorKind::ParseError)?), + album: metadata.get_child("album").map(element_to_string).unwrap_or_else(|| String::from("Unknown")), queue_position: element_to_string(resp.get_child("Track").chain_err(|| ErrorKind::ParseError)?) .parse::() .chain_err(|| ErrorKind::ParseError)?, -- rgit 0.1.3