diff --git a/overseerr-api.yml b/overseerr-api.yml index c85c1a083..48ff3003b 100644 --- a/overseerr-api.yml +++ b/overseerr-api.yml @@ -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: diff --git a/server/routes/media.ts b/server/routes/media.ts index f7d67d5c3..5d4fda63a 100644 --- a/server/routes/media.ts +++ b/server/routes/media.ts @@ -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; diff --git a/src/components/Discover/index.tsx b/src/components/Discover/index.tsx index 1a3fccf91..649087787 100644 --- a/src/components/Discover/index.tsx +++ b/src/components/Discover/index.tsx @@ -23,7 +23,7 @@ const Discover: React.FC = () => { const intl = useIntl(); const { data: media, error: mediaError } = useSWR( - '/api/v1/media?filter=available&take=20&sort=mediaAdded' + '/api/v1/media?filter=allavailable&take=20&sort=mediaAdded' ); const {