add songs libraries (#490)

* first pass at adding song libraries

* start handling optional video

* fix song playback

* fix song transitions

* add songs page to UI
This commit is contained in:
Jason Dove
2021-11-22 22:26:06 -06:00
committed by GitHub
parent 096f2d42e8
commit 852728c816
63 changed files with 13235 additions and 187 deletions
@@ -12,6 +12,7 @@ namespace ErsatzTV.Core.Interfaces.Metadata
MovieMetadata GetFallbackMetadata(Movie movie);
Option<MusicVideoMetadata> GetFallbackMetadata(MusicVideo musicVideo);
Option<OtherVideoMetadata> GetFallbackMetadata(OtherVideo otherVideo);
Option<SongMetadata> GetFallbackMetadata(Song song);
string GetSortTitle(string title);
}
}
@@ -17,6 +17,7 @@ namespace ErsatzTV.Core.Interfaces.Metadata
Task<bool> RefreshFallbackMetadata(Artist artist, string artistFolder);
Task<bool> RefreshFallbackMetadata(MusicVideo musicVideo);
Task<bool> RefreshFallbackMetadata(OtherVideo otherVideo);
Task<bool> RefreshFallbackMetadata(Song song);
Task<bool> RefreshFallbackMetadata(Show televisionShow, string showFolder);
}
}
@@ -0,0 +1,15 @@
using System.Threading.Tasks;
using ErsatzTV.Core.Domain;
using LanguageExt;
namespace ErsatzTV.Core.Interfaces.Metadata
{
public interface ISongFolderScanner
{
Task<Either<BaseError, Unit>> ScanFolder(
LibraryPath libraryPath,
string ffprobePath,
decimal progressMin,
decimal progressMax);
}
}
@@ -0,0 +1,17 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Metadata;
using LanguageExt;
namespace ErsatzTV.Core.Interfaces.Repositories
{
public interface ISongRepository
{
Task<Either<BaseError, MediaItemScanResult<Song>>> GetOrAdd(LibraryPath libraryPath, string path);
Task<IEnumerable<string>> FindSongPaths(LibraryPath libraryPath);
Task<List<int>> DeleteByPath(LibraryPath libraryPath, string path);
Task<bool> AddTag(SongMetadata metadata, Tag tag);
Task<List<SongMetadata>> GetSongsForCards(List<int> ids);
}
}