2018-12-21 22:59:33 +00:00
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Roadie.Library;
|
2019-07-07 03:16:33 +00:00
|
|
|
|
using Roadie.Library.Identity;
|
2019-06-30 22:14:36 +00:00
|
|
|
|
using Roadie.Library.Models;
|
2018-11-12 00:28:37 +00:00
|
|
|
|
using Roadie.Library.Models.Pagination;
|
|
|
|
|
using Roadie.Library.Models.Releases;
|
|
|
|
|
using Roadie.Library.Models.Users;
|
2018-11-14 23:18:02 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
2018-11-12 00:28:37 +00:00
|
|
|
|
|
|
|
|
|
namespace Roadie.Api.Services
|
|
|
|
|
{
|
|
|
|
|
public interface IReleaseService
|
|
|
|
|
{
|
2019-07-07 03:16:33 +00:00
|
|
|
|
IEnumerable<int> AddedTrackIds { get; }
|
|
|
|
|
|
2018-11-14 03:19:28 +00:00
|
|
|
|
Task<OperationResult<Release>> ById(User roadieUser, Guid id, IEnumerable<string> includes = null);
|
2018-11-14 23:18:02 +00:00
|
|
|
|
|
2019-07-07 03:16:33 +00:00
|
|
|
|
Task<OperationResult<bool>> Delete(ApplicationUser user, Library.Data.Release release, bool doDeleteFiles = false, bool doUpdateArtistCounts = true);
|
|
|
|
|
|
|
|
|
|
Task<OperationResult<bool>> DeleteReleases(ApplicationUser user, IEnumerable<Guid> releaseIds, bool doDeleteFiles = false);
|
|
|
|
|
|
|
|
|
|
Task<PagedResult<ReleaseList>> List(User user, PagedRequest request, bool? doRandomize = false, IEnumerable<string> includes = null);
|
2019-01-08 22:40:26 +00:00
|
|
|
|
|
2019-07-07 03:16:33 +00:00
|
|
|
|
Task<OperationResult<bool>> MergeReleases(ApplicationUser user, Guid releaseToMergeId, Guid releaseToMergeIntoId, bool addAsMedia);
|
|
|
|
|
|
|
|
|
|
Task<OperationResult<bool>> MergeReleases(ApplicationUser user, Library.Data.Release releaseToMerge, Library.Data.Release releaseToMergeInto, bool addAsMedia);
|
2019-05-29 22:25:40 +00:00
|
|
|
|
|
2018-11-24 16:18:03 +00:00
|
|
|
|
Task<FileOperationResult<byte[]>> ReleaseZipped(User roadieUser, Guid id);
|
2019-01-08 22:40:26 +00:00
|
|
|
|
|
2019-07-07 03:16:33 +00:00
|
|
|
|
Task<OperationResult<bool>> ScanReleaseFolder(ApplicationUser user, Guid releaseId, bool doJustInfo, Library.Data.Release releaseToScan = null);
|
|
|
|
|
|
|
|
|
|
Task<OperationResult<Image>> SetReleaseImageByUrl(ApplicationUser user, Guid id, string imageUrl);
|
2019-01-08 22:40:26 +00:00
|
|
|
|
|
2019-07-07 03:16:33 +00:00
|
|
|
|
Task<OperationResult<bool>> UpdateRelease(ApplicationUser user, Release release, string originalReleaseFolder = null);
|
2019-01-08 22:40:26 +00:00
|
|
|
|
|
2019-07-07 03:16:33 +00:00
|
|
|
|
Task<OperationResult<Image>> UploadReleaseImage(ApplicationUser user, Guid id, IFormFile file);
|
2018-11-12 00:28:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|