예제 #1
0
        public List <RetagBookFilePreview> GetRetagPreviewsByAuthor(int authorId)
        {
            var previews = _audioTagService.GetRetagPreviewsByAuthor(authorId);

            previews.AddRange(_eBookTagService.GetRetagPreviewsByAuthor(authorId));

            return(previews);
        }
예제 #2
0
 public List <RetagBookResource> GetBooks(int?authorId, int?bookId)
 {
     if (bookId.HasValue)
     {
         return(_audioTagService.GetRetagPreviewsByBook(bookId.Value).Where(x => x.Changes.Any()).ToResource());
     }
     else if (authorId.HasValue)
     {
         return(_audioTagService.GetRetagPreviewsByAuthor(authorId.Value).Where(x => x.Changes.Any()).ToResource());
     }
     else
     {
         throw new BadRequestException("One of authorId or bookId must be specified");
     }
 }
예제 #3
0
 private List<RetagBookResource> GetBooks()
 {
     if (Request.Query.bookId.HasValue)
     {
         var bookId = (int)Request.Query.bookId;
         return _audioTagService.GetRetagPreviewsByBook(bookId).Where(x => x.Changes.Any()).ToResource();
     }
     else if (Request.Query.AuthorId.HasValue)
     {
         var authorId = (int)Request.Query.AuthorId;
         return _audioTagService.GetRetagPreviewsByAuthor(authorId).Where(x => x.Changes.Any()).ToResource();
     }
     else
     {
         throw new BadRequestException("One of authorId or bookId must be specified");
     }
 }