Skip to content

Commit

Permalink
Save cache.db stamps when manually saving queue
Browse files Browse the repository at this point in the history
  • Loading branch information
ejv2 committed Aug 8, 2024
1 parent b4f2709 commit 3e963aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const (

// Queue reload operations.
const (
QueueReload = iota
QueueSave
DataReload = iota
DataSave
)

// Dependent data structures.
Expand Down Expand Up @@ -159,8 +159,9 @@ loop:
}

ReloadData()
if i == QueueSave {
if i == DataSave {
Q.Save()
Stamps.Save()
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions ui/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ func InputLoop(exit chan struct{}) {
ActivateMenu(LibraryMenu)
case 'r':
go func() {
reload <- data.QueueReload
reload <- data.DataReload
StatusMessage("Queue file reloaded")
}()
case 'R':
go func() {
reload <- data.QueueSave
reload <- data.DataSave
StatusMessage("Queue file saved")
}()
case 'p':
Expand Down

0 comments on commit 3e963aa

Please sign in to comment.