mirror of
https://git.sr.ht/~phw/scotty
synced 2025-06-05 12:58:33 +02:00
Pass context to export backends
This commit is contained in:
parent
b5bca1d4ab
commit
26d9f5e840
12 changed files with 55 additions and 33 deletions
|
@ -17,6 +17,7 @@ Scotty. If not, see <https://www.gnu.org/licenses/>.
|
|||
package scrobblerlog
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
|
@ -129,7 +130,7 @@ func (b *ScrobblerLogBackend) FinishImport() error {
|
|||
return b.file.Close()
|
||||
}
|
||||
|
||||
func (b *ScrobblerLogBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.TransferProgress) {
|
||||
func (b *ScrobblerLogBackend) ExportListens(ctx context.Context, oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.TransferProgress) {
|
||||
file, err := os.Open(b.filePath)
|
||||
p := models.TransferProgress{
|
||||
Export: &models.Progress{},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue