Premiumize: Perform a transfer if a link is present

This is required for PM's cloud since transfers will also add the
files to a user's cloud rather than just fetching the DDL link.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2023-01-04 14:33:38 -05:00
parent 5a4e98f10d
commit 025d3797dc

View file

@ -653,6 +653,11 @@ public class DebridManager: ObservableObject {
} else {
throw Premiumize.PMError.FailedRequest(description: "There were no items or files found!")
}
// Add a PM transfer if the item exists
if let premiumizeItem = selectedPremiumizeItem {
try await premiumize.createTransfer(magnet: premiumizeItem.magnet)
}
} catch {
toastModel?.updateToastDescription("Premiumize download error: \(error)")
print("Premiumize download error: \(error)")