Persistence for queue, history and last played

This commit is contained in:
Arkadiusz Fal
2021-10-24 20:01:08 +02:00
parent 68b5abd122
commit 19bb4955a2
13 changed files with 330 additions and 118 deletions

View File

@@ -111,6 +111,10 @@ struct ContentView: View {
playlists.accounts = accounts
search.accounts = accounts
subscriptions.accounts = accounts
if !accounts.current.isNil {
player.loadHistoryDetails()
}
}
func openWelcomeScreenIfAccountEmpty() {
@@ -135,6 +139,7 @@ struct ContentView: View {
accounts.api.video(id).load().onSuccess { response in
if let video: Video = response.typedContent() {
self.player.autoPlayItems = true
self.player.playNow(video, at: parser.time)
self.player.presentPlayer()
}