Added a new API for Panels so they can sync with a dedicated api. Removed ability to save progress with Panels.
This commit is contained in:
parent
0cf760ecd3
commit
c62e48f06a
3 changed files with 91 additions and 8 deletions
|
|
@ -1102,14 +1102,20 @@ public class OpdsController : BaseApiController
|
|||
Response.AddCacheHeader(content);
|
||||
|
||||
// Save progress for the user
|
||||
await _readerService.SaveReadingProgress(new ProgressDto()
|
||||
|
||||
var userAgent = Request.Headers["User-Agent"].ToString();
|
||||
if (!userAgent.Equals("panels", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
ChapterId = chapterId,
|
||||
PageNum = pageNumber,
|
||||
SeriesId = seriesId,
|
||||
VolumeId = volumeId,
|
||||
LibraryId =libraryId
|
||||
}, await GetUser(apiKey));
|
||||
await _readerService.SaveReadingProgress(new ProgressDto()
|
||||
{
|
||||
ChapterId = chapterId,
|
||||
PageNum = pageNumber,
|
||||
SeriesId = seriesId,
|
||||
VolumeId = volumeId,
|
||||
LibraryId =libraryId
|
||||
}, await GetUser(apiKey));
|
||||
}
|
||||
|
||||
|
||||
return File(content, MimeTypeMap.GetMimeType(format));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue