Premiumize is another debrid provider. Add support in addition to other debrid services. Add a unified Magnet type that encloses both the link and hash when needed for certain services. A universal ASAuthenticationSession has been added to make implicit authentication easier for services that support it. Clean up declarations of certain variables that were mismanaged during the debrid decentralization process. Signed-off-by: kingbri <bdashore3@proton.me>
17 lines
396 B
Swift
17 lines
396 B
Swift
//
|
|
// Array.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 12/4/22.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension Array {
|
|
// From https://www.hackingwithswift.com/example-code/language/how-to-split-an-array-into-chunks
|
|
func chunked(into size: Int) -> [[Element]] {
|
|
stride(from: 0, to: count, by: size).map {
|
|
Array(self[$0 ..< Swift.min($0 + size, count)])
|
|
}
|
|
}
|
|
}
|