mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
* New: Release Profiles - UI Updates * New: Release Profiles - API Changes * New: Release Profiles - Test Updates * New: Release Profiles - Backend Updates * New: Interactive Artist Search * New: Change Montiored on Album Details Page * New: Show Duration on Album Details Page * Fixed: Manual Import not working if no albums are Missing * Fixed: Sort search input by sortTitle * Fixed: Queue columnLabel throwing JS error
28 lines
549 B
JavaScript
28 lines
549 B
JavaScript
let currentPopulator = null;
|
|
let currentReasons = [];
|
|
|
|
export function registerPagePopulator(populator, reasons = []) {
|
|
currentPopulator = populator;
|
|
currentReasons = reasons;
|
|
}
|
|
|
|
export function unregisterPagePopulator(populator) {
|
|
if (currentPopulator === populator) {
|
|
currentPopulator = null;
|
|
currentReasons = [];
|
|
}
|
|
}
|
|
|
|
export function repopulatePage(reason) {
|
|
if (!currentPopulator) {
|
|
return;
|
|
}
|
|
|
|
if (!reason) {
|
|
currentPopulator();
|
|
}
|
|
|
|
if (reason && currentReasons.includes(reason)) {
|
|
currentPopulator();
|
|
}
|
|
}
|