Ensure new playlists are marked as open
This commit is contained in:
parent
2fb1974598
commit
2ce7f671ba
@ -534,6 +534,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
if playlist:
|
if playlist:
|
||||||
playlist.mark_open()
|
playlist.mark_open()
|
||||||
|
session.commit()
|
||||||
return playlist
|
return playlist
|
||||||
else:
|
else:
|
||||||
log.error("Failed to create playlist")
|
log.error("Failed to create playlist")
|
||||||
@ -1019,11 +1020,11 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
session, template, playlist_name
|
session, template, playlist_name
|
||||||
)
|
)
|
||||||
|
|
||||||
# Need to ensure that the new playlist is committed to
|
|
||||||
# the database before it is opened by the model.
|
|
||||||
session.commit()
|
|
||||||
if playlist:
|
if playlist:
|
||||||
playlist.mark_open()
|
playlist.mark_open()
|
||||||
|
# Need to ensure that the new playlist is committed to
|
||||||
|
# the database before it is opened by the model.
|
||||||
|
session.commit()
|
||||||
self.create_playlist_tab(playlist)
|
self.create_playlist_tab(playlist)
|
||||||
else:
|
else:
|
||||||
log.error("Playlist failed to create")
|
log.error("Playlist failed to create")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user