Skip to content

Commit

Permalink
Update audiobook rss feeds to increment pub dates in 1 minute intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Jan 17, 2025
1 parent 6057930 commit 4701b3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/models/FeedEpisode.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ class FeedEpisode extends Model {
*/
static getFeedEpisodeObjFromAudiobookTrack(book, pubDateStart, feed, slug, audioTrack, useChapterTitles, existingEpisodeId = null) {
// Example: <pubDate>Fri, 04 Feb 2015 00:00:00 GMT</pubDate>
let timeOffset = isNaN(audioTrack.index) ? 0 : Number(audioTrack.index) * 1000 // Offset pubdate to ensure correct order
// Offset pubdate in 1 minute intervals to ensure correct order
let timeOffset = isNaN(audioTrack.index) ? 0 : Number(audioTrack.index) * 60000
let episodeId = existingEpisodeId || uuidv4()

// e.g. Track 1 will have a pub date before Track 2
Expand Down

0 comments on commit 4701b3e

Please sign in to comment.