mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
fix(dicover music): fixed music not showing in discover music
Music was being blacklisted, and the API call to listenbrainz was wrong
This commit is contained in:
@@ -883,8 +883,6 @@ discoverRoutes.get('/music', async (req, res, next) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const freshReleasesData = await listenbrainz.getFreshReleases({
|
const freshReleasesData = await listenbrainz.getFreshReleases({
|
||||||
offset: 0,
|
|
||||||
count: 20,
|
|
||||||
days,
|
days,
|
||||||
sort: apiSortField,
|
sort: apiSortField,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import PageTitle from '@app/components/Common/PageTitle';
|
|||||||
import {
|
import {
|
||||||
countActiveFilters,
|
countActiveFilters,
|
||||||
prepareFilterValues,
|
prepareFilterValues,
|
||||||
|
type FilterOptions,
|
||||||
} from '@app/components/Discover/constants';
|
} from '@app/components/Discover/constants';
|
||||||
import FilterSlideover from '@app/components/Discover/FilterSlideover';
|
import FilterSlideover from '@app/components/Discover/FilterSlideover';
|
||||||
import useDiscover from '@app/hooks/useDiscover';
|
import useDiscover from '@app/hooks/useDiscover';
|
||||||
@@ -55,10 +56,13 @@ const DiscoverMusic = () => {
|
|||||||
titles,
|
titles,
|
||||||
fetchMore,
|
fetchMore,
|
||||||
error,
|
error,
|
||||||
} = useDiscover<AlbumResult>('/api/v1/discover/music', {
|
} = useDiscover<AlbumResult, unknown, FilterOptions>(
|
||||||
...preparedFilters,
|
'/api/v1/discover/music',
|
||||||
days: preparedFilters.days ?? '7',
|
{
|
||||||
});
|
...preparedFilters,
|
||||||
|
days: preparedFilters.days ?? '7',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return <Error statusCode={500} />;
|
return <Error statusCode={500} />;
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ const useDiscover = <
|
|||||||
(i) =>
|
(i) =>
|
||||||
(i.mediaType === 'movie' ||
|
(i.mediaType === 'movie' ||
|
||||||
i.mediaType === 'tv' ||
|
i.mediaType === 'tv' ||
|
||||||
i.mediaType === 'music') &&
|
i.mediaType === 'album' ||
|
||||||
|
i.mediaType === 'artist') &&
|
||||||
i.mediaInfo?.status !== MediaStatus.AVAILABLE &&
|
i.mediaInfo?.status !== MediaStatus.AVAILABLE &&
|
||||||
i.mediaInfo?.status !== MediaStatus.PARTIALLY_AVAILABLE
|
i.mediaInfo?.status !== MediaStatus.PARTIALLY_AVAILABLE
|
||||||
);
|
);
|
||||||
@@ -131,7 +132,10 @@ const useDiscover = <
|
|||||||
) {
|
) {
|
||||||
titles = titles.filter(
|
titles = titles.filter(
|
||||||
(i) =>
|
(i) =>
|
||||||
(i.mediaType === 'movie' || i.mediaType === 'tv') &&
|
(i.mediaType === 'movie' ||
|
||||||
|
i.mediaType === 'tv' ||
|
||||||
|
i.mediaType === 'album' ||
|
||||||
|
i.mediaType === 'artist') &&
|
||||||
i.mediaInfo?.status !== MediaStatus.BLACKLISTED
|
i.mediaInfo?.status !== MediaStatus.BLACKLISTED
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user