Added a UTC timestamp for reading history events (#3640)

This commit is contained in:
0xGingi 2025-03-15 14:08:51 -04:00 committed by GitHub
parent 75419fb62b
commit 4cb16be6a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,7 @@ public class ReadHistoryEvent
public int SeriesId { get; set; } public int SeriesId { get; set; }
public required string SeriesName { get; set; } = default!; public required string SeriesName { get; set; } = default!;
public DateTime ReadDate { get; set; } public DateTime ReadDate { get; set; }
public DateTime ReadDateUtc { get; set; }
public int ChapterId { get; set; } public int ChapterId { get; set; }
public required float ChapterNumber { get; set; } = default!; public required float ChapterNumber { get; set; } = default!;
} }

View File

@ -357,6 +357,7 @@ public class StatisticService : IStatisticService
SeriesId = u.SeriesId, SeriesId = u.SeriesId,
LibraryId = u.LibraryId, LibraryId = u.LibraryId,
ReadDate = u.LastModified, ReadDate = u.LastModified,
ReadDateUtc = u.LastModifiedUtc,
ChapterId = u.ChapterId, ChapterId = u.ChapterId,
ChapterNumber = _context.Chapter.Single(c => c.Id == u.ChapterId).MinNumber ChapterNumber = _context.Chapter.Single(c => c.Id == u.ChapterId).MinNumber
}) })

View File

@ -5,6 +5,7 @@ export interface ReadHistoryEvent {
seriesId: number; seriesId: number;
libraryId: number; libraryId: number;
readDate: string; readDate: string;
readDateUtc: string;
chapterId: number; chapterId: number;
chapterNumber: number; chapterNumber: number;
} }

View File

@ -20527,6 +20527,11 @@
"type": "string", "type": "string",
"format": "date-time" "format": "date-time"
}, },
"readDateUtc": {
"type": "string",
"format": "date-time",
"description": "UTC timestamp of when the chapter was read"
},
"chapterId": { "chapterId": {
"type": "integer", "type": "integer",
"format": "int32" "format": "int32"