Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a57125b9cd |
+4
-4
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user