mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
25 lines
423 B
JavaScript
25 lines
423 B
JavaScript
import moment from 'moment';
|
|
|
|
function getStatusStyle(episodeNumber, downloading, startTime, isMonitored) {
|
|
const currentTime = moment();
|
|
|
|
// if (hasFile) {
|
|
// return 'downloaded';
|
|
// }
|
|
|
|
if (downloading) {
|
|
return 'downloading';
|
|
}
|
|
|
|
if (!isMonitored) {
|
|
return 'unmonitored';
|
|
}
|
|
|
|
if (currentTime.isAfter(startTime)) {
|
|
return 'missing';
|
|
}
|
|
|
|
return 'unaired';
|
|
}
|
|
|
|
export default getStatusStyle;
|