Release v2.14.1
This commit is contained in:
1 parent
635e1a9942
commit
c3299abaac
174 files changed
+4483
-1687
No files matched your search
@@ -1,18 +1,13 @@
|
||||
const { collectFontLibrarySyncOperations } = require('../../media/font-library');
|
||||
const { fetchPlayerRegistrations } = require('#src/data/player-registry');
|
||||
const { collectFontLibrarySyncOperations } = require('#src/web/lib/media/font-library');
|
||||
const { fetchPlayerRegistrations, isRecentPlayerRegistration } = require('#src/data/player-registry');
|
||||
|
||||
const TASK = {
|
||||
key: 'initial-font-sync',
|
||||
category: 'fonts'
|
||||
};
|
||||
|
||||
function isRecentPlayerRegistration(player, staleSeconds) {
|
||||
const lastSeenAt = player && player.last_seen_at;
|
||||
const lastSeenAtValue = lastSeenAt instanceof Date ? lastSeenAt.getTime() : new Date(lastSeenAt).getTime();
|
||||
const cutoffTime = Date.now() - Math.max(30, Number(staleSeconds || 60)) * 1000;
|
||||
|
||||
return Number.isFinite(lastSeenAtValue) && lastSeenAtValue >= cutoffTime;
|
||||
}
|
||||
// Queue a one-off font sync for each live player on startup. The task keeps the resolved player
|
||||
// metadata in the payload so retries and background workers do not need to rediscover the same URL.
|
||||
|
||||
function normalizePlayerMetadata(player) {
|
||||
const playerIdentifier = String(player && player.identifier || '').trim();
|
||||
|
||||
Reference in new issue
Block a user