mirror of
https://gitlab.com/foxixus/neomovies.git
synced 2025-10-28 01:48:50 +05:00
Release 2.4.1
This commit is contained in:
@@ -11,7 +11,7 @@ Neo Movies - это современная веб-платформа постр
|
||||
|
||||
### ✨ Основные возможности
|
||||
|
||||
- 🎥 Два встроенных видеоплеера на выбор (Alloha, Lumex)
|
||||
- 🎥 Три встроенных видеоплеера на выбор (Alloha, Lumex, Vibix(NEW)))
|
||||
- 🔍 Умный поиск по фильмам
|
||||
- 📱 Адаптивный дизайн для всех устройств
|
||||
- 🌙 Темная тема
|
||||
|
||||
@@ -30,16 +30,7 @@ export default function FavoritesPage() {
|
||||
|
||||
try {
|
||||
const response = await neoApi.get('/api/v1/favorites');
|
||||
const items = Array.isArray(response.data)
|
||||
? response.data.map((m: any) => ({
|
||||
id: m.id,
|
||||
mediaId: String(m.id),
|
||||
mediaType: 'movie' as const,
|
||||
title: m.title ?? m.name ?? '',
|
||||
posterPath: m.poster_path ?? '',
|
||||
}))
|
||||
: [];
|
||||
setFavorites(items);
|
||||
setFavorites(response.data);
|
||||
} catch (error: any) {
|
||||
console.error('Failed to fetch favorites:', error);
|
||||
// Редиректим только при явном 401
|
||||
|
||||
@@ -51,7 +51,20 @@ export default function MoviePlayer({ id, title, poster, imdbId, isFullscreen =
|
||||
return;
|
||||
}
|
||||
|
||||
const playerEndpoint = settings.defaultPlayer === 'alloha' ? '/api/v1/players/alloha' : '/api/v1/players/lumex';
|
||||
const getPlayerEndpoint = (player: string) => {
|
||||
switch (player) {
|
||||
case 'alloha':
|
||||
return '/api/v1/players/alloha';
|
||||
case 'lumex':
|
||||
return '/api/v1/players/lumex';
|
||||
case 'vibix':
|
||||
return '/api/v1/players/vibix';
|
||||
default:
|
||||
return '/api/v1/players/alloha';
|
||||
}
|
||||
};
|
||||
|
||||
const playerEndpoint = getPlayerEndpoint(settings.defaultPlayer);
|
||||
|
||||
// Формируем URL, где imdbId является частью пути
|
||||
const newIframeSrc = `${API_BASE_URL}${playerEndpoint}/${resolvedImdb}`;
|
||||
@@ -76,7 +89,20 @@ export default function MoviePlayer({ id, title, poster, imdbId, isFullscreen =
|
||||
return;
|
||||
}
|
||||
|
||||
const playerEndpoint = settings.defaultPlayer === 'alloha' ? '/api/v1/players/alloha' : '/api/v1/players/lumex';
|
||||
const getPlayerEndpoint = (player: string) => {
|
||||
switch (player) {
|
||||
case 'alloha':
|
||||
return '/api/v1/players/alloha';
|
||||
case 'lumex':
|
||||
return '/api/v1/players/lumex';
|
||||
case 'vibix':
|
||||
return '/api/v1/players/vibix';
|
||||
default:
|
||||
return '/api/v1/players/alloha';
|
||||
}
|
||||
};
|
||||
|
||||
const playerEndpoint = getPlayerEndpoint(settings.defaultPlayer);
|
||||
const newIframeSrc = `${API_BASE_URL}${playerEndpoint}/${resolvedImdb}`;
|
||||
setIframeSrc(newIframeSrc);
|
||||
setLoading(false);
|
||||
|
||||
@@ -17,10 +17,15 @@ export default function SettingsContent() {
|
||||
name: 'Lumex',
|
||||
description: 'Альтернативный плеер, может быть полезен при проблемах с основным.',
|
||||
},
|
||||
{
|
||||
id: 'vibix',
|
||||
name: 'Vibix',
|
||||
description: 'Современный плеер с адаптивным качеством и стабильной работой.',
|
||||
},
|
||||
];
|
||||
|
||||
const handlePlayerSelect = (playerId: string) => {
|
||||
updateSettings({ defaultPlayer: playerId as 'alloha' | 'lumex' });
|
||||
updateSettings({ defaultPlayer: playerId as 'alloha' | 'lumex' | 'vibix' });
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ interface Settings {
|
||||
theme: 'light' | 'dark';
|
||||
language: 'ru' | 'en';
|
||||
notifications: boolean;
|
||||
defaultPlayer: 'alloha' | 'lumex';
|
||||
defaultPlayer: 'alloha' | 'lumex' | 'vibix';
|
||||
}
|
||||
|
||||
const defaultSettings: Settings = {
|
||||
|
||||
Reference in New Issue
Block a user