Ferrite-backup/Ferrite/Models/SourceModels.swift
kingbri 1eef8202ca Ferrite: Decouple torrent sources
These sources will be converted to be more flexible with JavaScript
in the future.

The source catalog is populated by adding a source list in settings
then installing a source from the catalog.

Sources can be enabled or disabled when using Ferrite.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-04 21:33:59 -04:00

29 lines
585 B
Swift

//
// SourceModels.swift
// Ferrite
//
// Created by Brian Dashore on 7/24/22.
//
import Foundation
public struct SourceJson: Codable {
let repoName: String?
let repoAuthor: String?
let sources: [TorrentSourceJson]
enum CodingKeys: String, CodingKey {
case repoName = "name"
case repoAuthor = "author"
case sources = "sources"
}
}
public struct TorrentSourceJson: Codable, Hashable {
let name: String?
let url: String
let rowQuery: String
let linkQuery: String
let titleQuery: String?
let sizeQuery: String?
}