diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-10-04 14:41:05 +1000 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-10-04 14:41:05 +1000 |
| commit | 7cc6f198cf437ae60185b65bfa556341be8ec63f (patch) | |
| tree | 5fc3e23a1041ba952fd2298b5d886fe03564890d /src/tangara/audio/track_queue.cpp | |
| parent | 39a5d062fc13ad81e91968e1c30b729ec606d934 (diff) | |
| download | tangara-fw-7cc6f198cf437ae60185b65bfa556341be8ec63f.tar.gz | |
Explicitly close the playlist files in the queue on storage unmount
Diffstat (limited to 'src/tangara/audio/track_queue.cpp')
| -rw-r--r-- | src/tangara/audio/track_queue.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tangara/audio/track_queue.cpp b/src/tangara/audio/track_queue.cpp index 35c1403f..05ac0b95 100644 --- a/src/tangara/audio/track_queue.cpp +++ b/src/tangara/audio/track_queue.cpp @@ -159,6 +159,13 @@ auto TrackQueue::open() -> bool { return playlist_.open(); } +auto TrackQueue::close() -> void { + playlist_.close(); + if (opened_playlist_) { + opened_playlist_->close(); + } +} + auto TrackQueue::openPlaylist(const std::string& playlist_file, bool notify) -> bool { opened_playlist_.emplace(playlist_file); |
