mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-21 00:32:04 +00:00
remove hardcoded catalog type
This commit is contained in:
parent
caaff9ab20
commit
f60087c6c4
1 changed files with 13 additions and 4 deletions
|
|
@ -22,7 +22,7 @@ interface DiscoverSectionProps {
|
||||||
pendingDiscoverResults: StreamingContent[];
|
pendingDiscoverResults: StreamingContent[];
|
||||||
loadingMore: boolean;
|
loadingMore: boolean;
|
||||||
selectedCatalog: DiscoverCatalog | null;
|
selectedCatalog: DiscoverCatalog | null;
|
||||||
selectedDiscoverType: 'movie' | 'series';
|
selectedDiscoverType: string;
|
||||||
selectedDiscoverGenre: string | null;
|
selectedDiscoverGenre: string | null;
|
||||||
availableGenres: string[];
|
availableGenres: string[];
|
||||||
typeSheetRef: React.RefObject<BottomSheetModal>;
|
typeSheetRef: React.RefObject<BottomSheetModal>;
|
||||||
|
|
@ -78,7 +78,11 @@ export const DiscoverSection = ({
|
||||||
onPress={() => typeSheetRef.current?.present()}
|
onPress={() => typeSheetRef.current?.present()}
|
||||||
>
|
>
|
||||||
<Text style={[styles.discoverSelectorText, { color: currentTheme.colors.white }]} numberOfLines={1}>
|
<Text style={[styles.discoverSelectorText, { color: currentTheme.colors.white }]} numberOfLines={1}>
|
||||||
{selectedDiscoverType === 'movie' ? t('search.movies') : t('search.tv_shows')}
|
{selectedDiscoverType === 'movie' ? t('search.movies')
|
||||||
|
: selectedDiscoverType === 'series' ? t('search.tv_shows')
|
||||||
|
: selectedDiscoverType === 'anime.movie' ? t('search.anime_movies')
|
||||||
|
: selectedDiscoverType === 'anime.series' ? t('search.anime_series')
|
||||||
|
: selectedDiscoverType.replace(/[._]/g, ' ').replace(/\b\w/g, c => c.toUpperCase())}
|
||||||
</Text>
|
</Text>
|
||||||
<MaterialIcons name="keyboard-arrow-down" size={20} color={currentTheme.colors.lightGray} />
|
<MaterialIcons name="keyboard-arrow-down" size={20} color={currentTheme.colors.lightGray} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
@ -112,8 +116,13 @@ export const DiscoverSection = ({
|
||||||
{selectedCatalog && (
|
{selectedCatalog && (
|
||||||
<View style={styles.discoverFilterSummary}>
|
<View style={styles.discoverFilterSummary}>
|
||||||
<Text style={[styles.discoverFilterSummaryText, { color: currentTheme.colors.lightGray }]}>
|
<Text style={[styles.discoverFilterSummaryText, { color: currentTheme.colors.lightGray }]}>
|
||||||
{selectedCatalog.addonName} • {selectedCatalog.type === 'movie' ? t('search.movies') : t('search.tv_shows')}
|
{selectedCatalog.addonName} • {
|
||||||
{selectedDiscoverGenre ? ` • ${selectedDiscoverGenre}` : ''}
|
selectedCatalog.type === 'movie' ? t('search.movies')
|
||||||
|
: selectedCatalog.type === 'series' ? t('search.tv_shows')
|
||||||
|
: selectedCatalog.type === 'anime.movie' ? t('search.anime_movies')
|
||||||
|
: selectedCatalog.type === 'anime.series' ? t('search.anime_series')
|
||||||
|
: selectedCatalog.type.replace(/[._]/g, ' ').replace(/\b\w/g, c => c.toUpperCase())
|
||||||
|
}{selectedDiscoverGenre ? ` • ${selectedDiscoverGenre}` : ''}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue