Added auth
This commit is contained in:
@@ -240,7 +240,7 @@ impl fmt::Display for SyncStats {
|
|||||||
/// Finds all Track-type Wanted items and enqueues them for download,
|
/// Finds all Track-type Wanted items and enqueues them for download,
|
||||||
/// skipping any that already have a queue entry.
|
/// skipping any that already have a queue entry.
|
||||||
pub async fn sync_wanted_to_queue(conn: &DatabaseConnection, dry_run: bool) -> DlResult<SyncStats> {
|
pub async fn sync_wanted_to_queue(conn: &DatabaseConnection, dry_run: bool) -> DlResult<SyncStats> {
|
||||||
let wanted = queries::wanted::list(conn, Some(WantedStatus::Wanted)).await?;
|
let wanted = queries::wanted::list(conn, Some(WantedStatus::Wanted), None).await?;
|
||||||
let mut stats = SyncStats::default();
|
let mut stats = SyncStats::default();
|
||||||
|
|
||||||
for item in &wanted {
|
for item in &wanted {
|
||||||
|
|||||||
@@ -226,12 +226,15 @@ async fn test_wanted_item_status_updated_on_download() {
|
|||||||
// Create a wanted item
|
// Create a wanted item
|
||||||
let wanted = queries::wanted::add(
|
let wanted = queries::wanted::add(
|
||||||
db.conn(),
|
db.conn(),
|
||||||
ItemType::Track,
|
queries::wanted::AddWantedItem {
|
||||||
"Wanted Song",
|
item_type: ItemType::Track,
|
||||||
None,
|
name: "Wanted Song",
|
||||||
None,
|
musicbrainz_id: None,
|
||||||
None,
|
artist_id: None,
|
||||||
None,
|
album_id: None,
|
||||||
|
track_id: None,
|
||||||
|
user_id: None,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user