Optimized import, only updating changed data and purging old data

This commit is contained in:
Deluan
2016-03-08 14:18:17 -05:00
parent df9687bf02
commit 46e7627fd3
13 changed files with 253 additions and 55 deletions
+1
View File
@@ -29,4 +29,5 @@ type AlbumRepository interface {
Get(id string) (*Album, error)
FindByArtist(artistId string) (Albums, error)
GetAll(QueryOptions) (Albums, error)
PurgeInactive(active *Albums) error
}
+1
View File
@@ -10,6 +10,7 @@ type ArtistRepository interface {
Put(m *Artist) error
Get(id string) (*Artist, error)
GetByName(name string) (*Artist, error)
PurgeInactive(active *Artists) error
}
type Artists []Artist
+1
View File
@@ -48,4 +48,5 @@ type MediaFileRepository interface {
Put(m *MediaFile) error
Get(id string) (*MediaFile, error)
FindByAlbum(albumId string) (MediaFiles, error)
PurgeInactive(active *MediaFiles) error
}