Skip to content

Commit

Permalink
feat: remove debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed May 8, 2023
1 parent ff3717e commit fc15671
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/routes/torrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,12 @@ pub async fn get_torrent_handler(req: HttpRequest, app_data: WebAppData) -> Serv

let infohash = get_torrent_infohash_from_request(&req)?;

println!("infohash: {}", infohash);

let torrent_listing = app_data.database.get_torrent_listing_from_infohash(&infohash).await?;

let torrent_id = torrent_listing.torrent_id;

println!("torrent_listing: {:#?}", torrent_listing);

let category = app_data.database.get_category_from_id(torrent_listing.category_id).await?;

println!("category: {:#?}", category);

let mut torrent_response = TorrentResponse::from_listing(torrent_listing);

torrent_response.category = category;
Expand All @@ -196,13 +190,9 @@ pub async fn get_torrent_handler(req: HttpRequest, app_data: WebAppData) -> Serv

torrent_response.files = app_data.database.get_torrent_files_from_id(torrent_id).await?;

println!("torrent_response.files: {:#?}", torrent_response.files);

if torrent_response.files.len() == 1 {
let torrent_info = app_data.database.get_torrent_info_from_infohash(&infohash).await?;

println!("torrent_info: {:#?}", torrent_info);

torrent_response
.files
.iter_mut()
Expand All @@ -215,8 +205,6 @@ pub async fn get_torrent_handler(req: HttpRequest, app_data: WebAppData) -> Serv
.await
.map(|v| v.into_iter().flatten().collect())?;

println!("trackers: {:#?}", torrent_response.trackers);

// add tracker url
match user {
Ok(user) => {
Expand Down

0 comments on commit fc15671

Please sign in to comment.