From 6f22cf6d1f6da0584f0b906730ad78fa00061d25 Mon Sep 17 00:00:00 2001 From: kungfoolfighting Date: Wed, 19 Jul 2023 00:24:32 +0200 Subject: [PATCH] Removes unnecessary logging. --- .../TorrentClients/PremiumizeTorrentClient.cs | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/server/RdtClient.Service/Services/TorrentClients/PremiumizeTorrentClient.cs b/server/RdtClient.Service/Services/TorrentClients/PremiumizeTorrentClient.cs index 9757118..7be05db 100644 --- a/server/RdtClient.Service/Services/TorrentClients/PremiumizeTorrentClient.cs +++ b/server/RdtClient.Service/Services/TorrentClients/PremiumizeTorrentClient.cs @@ -225,24 +225,10 @@ public class PremiumizeTorrentClient : ITorrentClient private async Task>> GetDownloadLinksFromFolderId(string folderId, string folderPath) { var files = await GetClient().Folder.ListAsync(folderId); - Log($"Found {files.Content.Count} items in folder {folderId} with name {files.Name} and breadcrumbs: {files.Breadcrumbs}"); - foreach(var crumb in files.Breadcrumbs) - { - Log($"crumb name: {crumb.Name}; crumb Id; {crumb.Id}"); - } - foreach (var item in files.Content) - { - Log($"Found item: {item.Name}"); - Log($"Id: {item.Id}"); - Log($"Size: {item.Size}"); - Log($"Folder Id: {item.FolderId}"); - Log($"Type: {item.Type}"); - Log($"Link: {item.Link}"); - } var downloadLinks = files.Content.Where(m => !String.IsNullOrWhiteSpace(m.Link)).Select(m => m.Link).ToList(); - Log($"Found {downloadLinks.Count} links in folder {folderId}"); + Log($"Found {downloadLinks.Count} links in folder {folderPath}"); List> linksAndFolders = new List>(); @@ -250,16 +236,14 @@ public class PremiumizeTorrentClient : ITorrentClient { linksAndFolders.Add(new Tuple(downloadLink, folderPath)); } - Log($"Added {linksAndFolders.Count} links to returnList"); + List subFolders = files.Content.Where(m => !String.IsNullOrWhiteSpace(m.Id)).Where(m => m.Type =="folder").Select(m => m).ToList(); foreach (var subFolder in subFolders) { String subFolderPath = folderPath + subFolder.Name + "/"; var subFolderLinks = await GetDownloadLinksFromFolderId(subFolder.Id, subFolderPath); linksAndFolders.AddRange(subFolderLinks); - Log($"List contains {linksAndFolders.Count} links after AddRange"); } - Log($"Returning {linksAndFolders.Count} links from sub-folder {folderPath}"); return linksAndFolders; } @@ -287,7 +271,6 @@ public class PremiumizeTorrentClient : ITorrentClient if (!String.IsNullOrWhiteSpace(transfer.FolderId)) { downloadLinks = await GetDownloadLinksFromFolderId(transfer.FolderId, ""); - Log($"Found {downloadLinks.Count} total links", torrent); } else if (!String.IsNullOrWhiteSpace(transfer.FileId)) {