fix: show recently added series even if they are not complete

pull/724/head
sct 4 years ago
parent 660ada0b20
commit d0c830e80d

@ -3179,7 +3179,7 @@ paths:
schema:
type: string
nullable: true
enum: [all, available, partial, processing, pending]
enum: [all, available, partial, allavailable, processing, pending]
- in: query
name: sort
schema:

@ -1,5 +1,5 @@
import { Router } from 'express';
import { getRepository, FindOperator, FindOneOptions } from 'typeorm';
import { getRepository, FindOperator, FindOneOptions, In } from 'typeorm';
import Media from '../entity/Media';
import { MediaStatus } from '../constants/media';
import logger from '../logger';
@ -27,6 +27,12 @@ mediaRoutes.get('/', async (req, res, next) => {
case 'partial':
statusFilter = MediaStatus.PARTIALLY_AVAILABLE;
break;
case 'allavailable':
statusFilter = In([
MediaStatus.AVAILABLE,
MediaStatus.PARTIALLY_AVAILABLE,
]);
break;
case 'processing':
statusFilter = MediaStatus.PROCESSING;
break;

@ -23,7 +23,7 @@ const Discover: React.FC = () => {
const intl = useIntl();
const { data: media, error: mediaError } = useSWR<MediaResultsResponse>(
'/api/v1/media?filter=available&take=20&sort=mediaAdded'
'/api/v1/media?filter=allavailable&take=20&sort=mediaAdded'
);
const {

Loading…
Cancel
Save