Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,7 @@ function* getCollectionTracks() {
// Some playlists & albums may not have a metadata time, so use the time if not.
// If for whatever reason, the metadata time is off, prefer the release date
const times = tracks.map((t) =>
Math.max(t.metadata_time || t.time, collection.release_date)
Math.max(t.metadata_time || t.time, moment(collection.release_date).unix())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dayjs pls

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file uses moment, we can migrate later. I don't want to change the expected value

)

// Reconcile fetching this playlist with the queue.
Expand DownExpand Up@@ -80,10 +80,7 @@ function* getCollectionTracks() {
if (!metadata.track_id) return null

if (times[i]) {
metadata.dateAdded =
typeof times[i] === 'string'
? moment(times[i])
: moment.unix(times[i])
metadata.dateAdded = moment.unix(times[i])
}
if (uidForSource[id] && uidForSource[id].length > 0) {
metadata.uid = uidForSource[id].shift()
Expand Down