private async Task <string> FindAlbumId(string path, string artistId) { AlbumMetadata metadata = await Get(path); if (string.IsNullOrEmpty(metadata.Mbid)) { return(await FindIdFromPath(path, artistId)); } return(metadata.Mbid); }
public async Task Update(string path, string artistId) { string albumId = await FindAlbumId(path, artistId); ReleaseGroup album = await _metadataUpdater.GetAlbum(albumId); AlbumMetadata albumMetadata = ConvertMetadata(album); await Save(path, albumMetadata); await UpdateImage(path, albumId); }
public async Task Save(string path, AlbumMetadata metadata) { await _metadataRepository.Save(path, metadata); }