A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz

fix empty googledrive parent dir value

+7 -3
+7 -3
crates/googledrive/src/scan.rs
··· 44 44 refresh_token.clone(), 45 45 token.did.clone(), 46 46 token.xata_id.clone(), 47 + None, 47 48 ) 48 49 .await?; 49 50 } ··· 68 69 refresh_token, 69 70 did.to_string(), 70 71 google_drive_id.clone(), 72 + None, 71 73 ) 72 74 .await?; 73 75 } ··· 81 83 refresh_token: String, 82 84 did: String, 83 85 google_drive_id: String, 86 + parent_drive_file_id: Option<String>, 84 87 ) -> BoxFuture<'static, Result<(), Error>> { 85 88 Box::pin(async move { 86 89 let client = GoogleDriveClient::new(&refresh_token).await?; ··· 100 103 if file.mime_type == "application/vnd.google-apps.folder" { 101 104 println!("Scanning folder: {}", file.name.bright_green()); 102 105 103 - create_google_drive_directory(&pool, &file, &google_drive_id, Some(&file_id)).await?; 106 + create_google_drive_directory(&pool, &file, &google_drive_id, parent_drive_file_id.as_deref()).await?; 104 107 105 108 // TODO: publish folder metadata to nats 106 109 ··· 137 140 } 138 141 } 139 142 140 - for file in files { 143 + for child_file in files { 141 144 scan_audio_files( 142 145 pool.clone(), 143 - file.id, 146 + child_file.id.clone(), 144 147 refresh_token.clone(), 145 148 did.clone(), 146 149 google_drive_id.clone(), 150 + Some(file_id.clone()), 147 151 ) 148 152 .await?; 149 153 tokio::time::sleep(std::time::Duration::from_secs(3)).await;