mirror of
https://git.sr.ht/~phw/scotty
synced 2025-06-05 04: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
|
@ -18,6 +18,7 @@ Scotty. If not, see <https://www.gnu.org/licenses/>.
|
|||
package jspf
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"os"
|
||||
"sort"
|
||||
|
@ -93,7 +94,7 @@ func (b *JSPFBackend) FinishImport() error {
|
|||
return b.writeJSPF()
|
||||
}
|
||||
|
||||
func (b *JSPFBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.TransferProgress) {
|
||||
func (b *JSPFBackend) ExportListens(ctx context.Context, oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.TransferProgress) {
|
||||
err := b.readJSPF()
|
||||
p := models.TransferProgress{
|
||||
Export: &models.Progress{},
|
||||
|
@ -132,7 +133,7 @@ func (b *JSPFBackend) ImportListens(export models.ListensResult, importResult mo
|
|||
return importResult, nil
|
||||
}
|
||||
|
||||
func (b *JSPFBackend) ExportLoves(oldestTimestamp time.Time, results chan models.LovesResult, progress chan models.TransferProgress) {
|
||||
func (b *JSPFBackend) ExportLoves(ctx context.Context, oldestTimestamp time.Time, results chan models.LovesResult, progress chan models.TransferProgress) {
|
||||
err := b.readJSPF()
|
||||
p := models.TransferProgress{
|
||||
Export: &models.Progress{},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue