mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-08 12:58:38 +02:00
Refactor storage model to work with native Realm
This commit is contained in:
@@ -33,11 +33,13 @@ class PlaybackSession: Object, Codable {
|
||||
|
||||
var isLocal: Bool { self.localLibraryItem != nil }
|
||||
|
||||
var localMediaProgressId: String {
|
||||
if let episodeId = episodeId {
|
||||
return "\(localLibraryItem!.id)-\(episodeId)"
|
||||
var localMediaProgressId: String? {
|
||||
if let localLibraryItem = localLibraryItem, let episodeId = episodeId {
|
||||
return "\(localLibraryItem.id)-\(episodeId)"
|
||||
} else if let localLibraryItem = localLibraryItem {
|
||||
return localLibraryItem.id
|
||||
} else {
|
||||
return localLibraryItem!.id
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user