mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-05 02:25:45 +02:00
Handle deleting podcast episodes
This commit is contained in:
parent
4e63d43679
commit
0a989e7811
2 changed files with 31 additions and 9 deletions
|
@ -100,16 +100,16 @@ struct LocalFile: Realmable, Codable {
|
|||
var mimeType: String?
|
||||
var size: Int = 0
|
||||
|
||||
var contentUrl: String {
|
||||
return AbsDownloader.itemDownloadFolder(path: _contentUrl)!.absoluteString
|
||||
}
|
||||
var contentUrl: String { AbsDownloader.itemDownloadFolder(path: _contentUrl)!.absoluteString }
|
||||
var contentPath: URL { AbsDownloader.itemDownloadFolder(path: _contentUrl)! }
|
||||
var basePath: String? { self.filename }
|
||||
|
||||
static func primaryKey() -> String? {
|
||||
return "id"
|
||||
}
|
||||
|
||||
private enum CodingKeys : String, CodingKey {
|
||||
case id, filename, contentUrl, mimeType, size
|
||||
case id, filename, contentUrl, mimeType, size, basePath
|
||||
}
|
||||
|
||||
init() {}
|
||||
|
@ -129,6 +129,7 @@ struct LocalFile: Realmable, Codable {
|
|||
try container.encode(contentUrl, forKey: .contentUrl)
|
||||
try container.encode(mimeType, forKey: .mimeType)
|
||||
try container.encode(size, forKey: .size)
|
||||
try container.encode(basePath, forKey: .basePath)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue