This commit is contained in:
Connor Johnstone
2026-03-26 17:52:03 -04:00
parent 86b6901638
commit a57125b9cd
+4 -4
View File
@@ -356,7 +356,7 @@ pub async fn add_track(
async fn finish_add_track(
conn: &DatabaseConnection,
title: &str,
artist_name: &str,
_artist_name: &str,
recording_mbid: Option<String>,
artist: artist::Model,
user_id: Option<i32>,
@@ -513,11 +513,11 @@ async fn load_or_build_discography(
}
// Cache the result if we found anything
if !recordings.is_empty() {
if let Ok(json) = serde_json::to_string(&recordings) {
if !recordings.is_empty()
&& let Ok(json) = serde_json::to_string(&recordings)
{
let _ = queries::cache::set(conn, &cache_key, "computed", &json, 7 * 86400).await;
}
}
recordings
}