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>
30 lines
653 B
Swift
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 {}
|