mirror of https://github.com/lidarr/Lidarr
27 lines
453 B
JavaScript
27 lines
453 B
JavaScript
/* eslint max-params: 0 */
|
|
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 'unreleased';
|
|
}
|
|
|
|
export default getStatusStyle;
|