From 70c1a37db56e6e897466f4338e6132c2bbf1e97f Mon Sep 17 00:00:00 2001 From: Aerozol Date: Tue, 14 Jan 2025 14:57:53 +1300 Subject: [PATCH 1/4] Update data-update-intervals.rst Added "Link listens" to the update table --- docs/general/data-update-intervals.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/general/data-update-intervals.rst b/docs/general/data-update-intervals.rst index bb9006df99..94b2f836e3 100644 --- a/docs/general/data-update-intervals.rst +++ b/docs/general/data-update-intervals.rst @@ -13,6 +13,7 @@ Removing deleted listens from stats On the 2nd and 16th of each month Full dumps 1st and 15th of each month Incremental dumps Daily Weekly playlists Monday morning, based on the users timezone setting +Link listens Monday morning, based on the users timezone setting Daily playlists [#f3]_ Every morning, based on the users timezone setting =============================================== ========================================= From 6c8210ec6378812555ae17c0f7bf6afc7c9640a5 Mon Sep 17 00:00:00 2001 From: Aerozol Date: Tue, 14 Jan 2025 14:58:15 +1300 Subject: [PATCH 2/4] Update data-update-intervals.rst fix table order --- docs/general/data-update-intervals.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/general/data-update-intervals.rst b/docs/general/data-update-intervals.rst index 94b2f836e3..10b4a2565e 100644 --- a/docs/general/data-update-intervals.rst +++ b/docs/general/data-update-intervals.rst @@ -12,8 +12,8 @@ Updating statistics for new listens Daily [#f2]_ Removing deleted listens from stats On the 2nd and 16th of each month Full dumps 1st and 15th of each month Incremental dumps Daily -Weekly playlists Monday morning, based on the users timezone setting Link listens Monday morning, based on the users timezone setting +Weekly playlists Monday morning, based on the users timezone setting Daily playlists [#f3]_ Every morning, based on the users timezone setting =============================================== ========================================= From 2f967e92823dce10238edb0f35e08c638a18cecf Mon Sep 17 00:00:00 2001 From: Aerozol Date: Tue, 14 Jan 2025 16:03:51 +1300 Subject: [PATCH 3/4] Update LinkListens.tsx Tightened and improved the text, see ticket LB-1724 for more details. --- .../src/settings/link-listens/LinkListens.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/frontend/js/src/settings/link-listens/LinkListens.tsx b/frontend/js/src/settings/link-listens/LinkListens.tsx index c3ccded310..6a8034e4bb 100644 --- a/frontend/js/src/settings/link-listens/LinkListens.tsx +++ b/frontend/js/src/settings/link-listens/LinkListens.tsx @@ -249,8 +249,7 @@ export default function LinkListensPage() { first.

- You will find below your top 1000 listens (grouped by album) that - have  + Your top 1,000 listens (grouped by album) that have  not been automatically linked -   to a MusicBrainz recording. Link them below or  - - submit new data to MusicBrainz - - . +  to a MusicBrainz recording.

MusicBrainz is the open-source - music encyclopedia that ListenBrainz uses to display more information - about your music. + music encyclopedia that ListenBrainz uses to display information about + your music.  + + Submit missing data to MusicBrainz + + .

{!isNil(lastUpdated) && ( -

Last updated {new Date(lastUpdated).toLocaleDateString()}

+

Updates Mondays, based on listen data. Last updated {new Date(lastUpdated).toLocaleDateString()}

)}
From d8f11e27d5296ba3dafcb92d434cb47f6c043afd Mon Sep 17 00:00:00 2001 From: Monkey Do Date: Tue, 14 Jan 2025 17:34:37 +0100 Subject: [PATCH 4/4] Tweak link listens docs Modified docs to say Monday 2AM instead of monday morning user-time + format datetime of last run a bit better in LinkListens page --- docs/general/data-update-intervals.rst | 12 ++++++------ .../js/src/settings/link-listens/LinkListens.tsx | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/general/data-update-intervals.rst b/docs/general/data-update-intervals.rst index 10b4a2565e..91b90bab10 100644 --- a/docs/general/data-update-intervals.rst +++ b/docs/general/data-update-intervals.rst @@ -7,14 +7,14 @@ Expected schedule: System Update schedule =============================================== ========================================= Receiving listens, updating listen counts Immediate [#f1]_ -Deleting listens Removed at the top of the next hour (UTC) +Deleting listens Removed at the top of the next hour (UTC) Updating statistics for new listens Daily [#f2]_ Removing deleted listens from stats On the 2nd and 16th of each month -Full dumps 1st and 15th of each month -Incremental dumps Daily -Link listens Monday morning, based on the users timezone setting -Weekly playlists Monday morning, based on the users timezone setting -Daily playlists [#f3]_ Every morning, based on the users timezone setting +Full dumps 1st and 15th of each month +Incremental dumps Daily +Link listens Monday morning at 2AM (UTC) +Weekly playlists Monday morning, based on the user's timezone setting +Daily playlists [#f3]_ Every morning, based on the user's timezone setting =============================================== ========================================= Situations will occasionally arise where these take longer. If you have been a very patient user, and diff --git a/frontend/js/src/settings/link-listens/LinkListens.tsx b/frontend/js/src/settings/link-listens/LinkListens.tsx index 6a8034e4bb..de5e2b0341 100644 --- a/frontend/js/src/settings/link-listens/LinkListens.tsx +++ b/frontend/js/src/settings/link-listens/LinkListens.tsx @@ -13,7 +13,7 @@ import { Helmet } from "react-helmet"; import NiceModal from "@ebay/nice-modal-react"; -import { groupBy, isNil, isNull, pick, size, sortBy } from "lodash"; +import { groupBy, isNil, isNull, isString, pick, size, sortBy } from "lodash"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useQuery } from "@tanstack/react-query"; import ReactTooltip from "react-tooltip"; @@ -86,6 +86,15 @@ export default function LinkListensPage() { const [searchParams, setSearchParams] = useSearchParams(); const pageSearchParam = searchParams.get("page"); + const lastUpdatedHumanReadable = isString(lastUpdated) + ? new Date(lastUpdated).toLocaleString(undefined, { + day: "2-digit", + month: "short", + hour: "numeric", + minute: "numeric", + hour12: true, + }) + : "—"; // State const [deletedListens, setDeletedListens] = React.useState>([]); const [unlinkedListens, setUnlinkedListens] = React.useState< @@ -269,7 +278,10 @@ export default function LinkListensPage() { .

{!isNil(lastUpdated) && ( -

Updates Mondays, based on listen data. Last updated {new Date(lastUpdated).toLocaleDateString()}

+

+ Updates every Monday at 2AM (UTC). Last updated{" "} + {lastUpdatedHumanReadable} +

)}