99 "regexp"
1010 "strings"
1111
12- "github.com/contre95/soulsolid/src/features/jobs"
1312 "github.com/contre95/soulsolid/src/music"
1413)
1514
@@ -40,7 +39,7 @@ func (e *DownloadJobTask) MetadataKeys() []string {
4039}
4140
4241// Execute performs the download operation
43- func (e * DownloadJobTask ) Execute (ctx context.Context , job * jobs .Job , progressUpdater func (int , string )) (map [string ]any , error ) {
42+ func (e * DownloadJobTask ) Execute (ctx context.Context , job * music .Job , progressUpdater func (int , string )) (map [string ]any , error ) {
4443 jobType , ok := job .Metadata ["type" ].(string )
4544 if ! ok {
4645 return nil , fmt .Errorf ("invalid job type" )
@@ -67,7 +66,7 @@ func (e *DownloadJobTask) Execute(ctx context.Context, job *jobs.Job, progressUp
6766}
6867
6968// executeTrackDownload handles track download jobs
70- func (e * DownloadJobTask ) executeTrackDownload (ctx context.Context , job * jobs .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
69+ func (e * DownloadJobTask ) executeTrackDownload (ctx context.Context , job * music .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
7170 trackID , ok := job .Metadata ["trackID" ].(string )
7271 if ! ok {
7372 return nil , fmt .Errorf ("trackID not found in job metadata" )
@@ -152,7 +151,7 @@ func (e *DownloadJobTask) executeTrackDownload(ctx context.Context, job *jobs.Jo
152151}
153152
154153// executeAlbumDownload handles album download jobs
155- func (e * DownloadJobTask ) executeAlbumDownload (ctx context.Context , job * jobs .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
154+ func (e * DownloadJobTask ) executeAlbumDownload (ctx context.Context , job * music .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
156155 albumID , ok := job .Metadata ["albumID" ].(string )
157156 if ! ok {
158157 return nil , fmt .Errorf ("albumID not found in job metadata" )
@@ -264,7 +263,7 @@ func (e *DownloadJobTask) executeAlbumDownload(ctx context.Context, job *jobs.Jo
264263}
265264
266265// executeArtistDownload handles artist download jobs
267- func (e * DownloadJobTask ) executeArtistDownload (ctx context.Context , job * jobs .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
266+ func (e * DownloadJobTask ) executeArtistDownload (ctx context.Context , job * music .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
268267 artistID , ok := job .Metadata ["artistID" ].(string )
269268 if ! ok {
270269 return nil , fmt .Errorf ("artistID not found in job metadata" )
@@ -384,7 +383,7 @@ func (e *DownloadJobTask) executeArtistDownload(ctx context.Context, job *jobs.J
384383}
385384
386385// executeTracksDownload handles multiple track download jobs
387- func (e * DownloadJobTask ) executeTracksDownload (ctx context.Context , job * jobs .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
386+ func (e * DownloadJobTask ) executeTracksDownload (ctx context.Context , job * music .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
388387 var trackIDs []string
389388
390389 // Try to get trackIDs as []string first
@@ -488,7 +487,7 @@ func (e *DownloadJobTask) executeTracksDownload(ctx context.Context, job *jobs.J
488487}
489488
490489// executePlaylistDownload handles playlist download jobs
491- func (e * DownloadJobTask ) executePlaylistDownload (ctx context.Context , job * jobs .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
490+ func (e * DownloadJobTask ) executePlaylistDownload (ctx context.Context , job * music .Job , progressUpdater func (int , string ), downloadPath string ) (map [string ]any , error ) {
492491 playlistName , ok := job .Metadata ["playlistName" ].(string )
493492 if ! ok {
494493 return nil , fmt .Errorf ("playlistName not found in job metadata" )
@@ -588,7 +587,7 @@ func (e *DownloadJobTask) executePlaylistDownload(ctx context.Context, job *jobs
588587}
589588
590589// Cleanup performs cleanup after job completion
591- func (e * DownloadJobTask ) Cleanup (job * jobs .Job ) error {
590+ func (e * DownloadJobTask ) Cleanup (job * music .Job ) error {
592591 // TODO: Clean up temporary files, etc.
593592 slog .Debug ("Cleaning up download job" , "jobID" , job .ID )
594593 return nil
0 commit comments