Ferrite-backup/Ferrite/Models/DebridModels.swift
kingbri 69a9d30475 Debrid: Add InstantAvailability and download to protocol
Unify IA into a passable client side structure and add a common
download method to the DebridSource protocol.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-19 16:40:26 -05:00

30 lines
653 B
Swift

//
// DebridModels.swift
// Ferrite
//
// Created by Brian Dashore on 6/2/24.
//
import Foundation
public struct DebridIA: Sendable, Hashable {
let magnet: Magnet
let expiryTimeStamp: Double
var files: [DebridIAFile]
}
public struct DebridIAFile: Hashable, Sendable {
let fileId: Int
let name: String
let streamUrlString: String?
let batchIds: [Int]
init(fileId: Int, name: String, streamUrlString: String? = nil, batchIds: [Int] = []) {
self.fileId = fileId
self.name = name
self.streamUrlString = streamUrlString
self.batchIds = batchIds
}
}
public struct DebridCloudFile {}