Add local agent, only for images

This commit is contained in:
Deluan
2022-12-30 23:52:53 -05:00
committed by Deluan Quintão
parent 387acc5f63
commit bf461473ef
15 changed files with 134 additions and 76 deletions
-10
View File
@@ -53,13 +53,3 @@ func (a *mediafileArtworkReader) Reader(ctx context.Context) (io.ReadCloser, str
ff = append(ff, fromAlbum(ctx, a.a, a.mediafile.AlbumCoverArtID()))
return selectImageReader(ctx, a.artID, ff...)
}
func fromAlbum(ctx context.Context, a *artwork, id model.ArtworkID) sourceFunc {
return func() (io.ReadCloser, string, error) {
r, _, err := a.Get(ctx, id.String(), 0)
if err != nil {
return nil, "", err
}
return r, id.String(), nil
}
}