mirror of
https://git.sr.ht/~phw/scotty
synced 2025-06-05 12:58:33 +02:00
Pass context to import backends
This commit is contained in:
parent
26d9f5e840
commit
4a66e3d432
8 changed files with 71 additions and 42 deletions
|
@ -112,9 +112,7 @@ out:
|
|||
results <- models.ListensResult{Items: listens}
|
||||
}
|
||||
|
||||
func (b *MalojaApiBackend) ImportListens(export models.ListensResult, importResult models.ImportResult, progress chan models.TransferProgress) (models.ImportResult, error) {
|
||||
ctx := context.TODO()
|
||||
|
||||
func (b *MalojaApiBackend) ImportListens(ctx context.Context, export models.ListensResult, importResult models.ImportResult, progress chan models.TransferProgress) (models.ImportResult, error) {
|
||||
p := models.TransferProgress{}.FromImportResult(importResult, false)
|
||||
for _, listen := range export.Items {
|
||||
scrobble := NewScrobble{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue