diff --git a/locales/en.json b/locales/en.json index 2605fc5..2dc5931 100644 --- a/locales/en.json +++ b/locales/en.json @@ -43,6 +43,8 @@ "personal_epg_label": "EPG URL (XMLTV) *", "personal_epg_m3u_label": "M3U URL", "personal_epg_optional": "optional", + "personal_epg_m3u_enabled": "This instance allows a personal M3U playlist.", + "personal_epg_m3u_disabled": "The administrator of this instance has disabled personal M3U playlists.", "cancel": "Cancel", "apply": "Apply", "setup_already_done": "Configuration already done. Use your admin key to access setup again.", @@ -52,4 +54,4 @@ "fav_remove": "Remove from favorites", "update_available": "↑ Update available:", "update_title": "Click to download the latest version" -} \ No newline at end of file +} diff --git a/locales/es.json b/locales/es.json index e4331cb..3f84350 100644 --- a/locales/es.json +++ b/locales/es.json @@ -43,6 +43,8 @@ "personal_epg_label": "URL EPG (XMLTV) *", "personal_epg_m3u_label": "URL M3U", "personal_epg_optional": "opcional", + "personal_epg_m3u_enabled": "Esta instancia permite una lista M3U personal.", + "personal_epg_m3u_disabled": "El administrador de esta instancia ha desactivado las listas M3U personales.", "cancel": "Cancelar", "apply": "Aplicar", "setup_already_done": "Configuración ya realizada. Usa tu clave de administrador para volver al setup.", @@ -52,4 +54,4 @@ "fav_remove": "Quitar de favoritos", "update_available": "↑ Actualizacion disponible:", "update_title": "Haz clic para descargar la ultima version" -} \ No newline at end of file +} diff --git a/locales/fr.json b/locales/fr.json index 46cb8fe..0094539 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -43,6 +43,8 @@ "personal_epg_label": "URL EPG (XMLTV) *", "personal_epg_m3u_label": "URL M3U", "personal_epg_optional": "optionnel", + "personal_epg_m3u_enabled": "Cette instance autorise l'ajout d'une playlist M3U personnelle.", + "personal_epg_m3u_disabled": "L'administrateur de cette instance a désactivé l'ajout d'une playlist M3U personnelle.", "cancel": "Annuler", "apply": "Appliquer", "setup_already_done": "Configuration déjà effectuée. Utilisez votre clé admin pour accéder à nouveau au setup.", @@ -52,4 +54,4 @@ "fav_remove": "Retirer des favoris", "update_available": "↑ Mise a jour disponible :", "update_title": "Cliquez pour telecharger la derniere version" -} \ No newline at end of file +} diff --git a/setup.php b/setup.php index ec21324..bb88005 100644 --- a/setup.php +++ b/setup.php @@ -69,6 +69,7 @@ if ($mode === 'setup' && $_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST[' } else { $group_name = trim($_POST['group_name'] ?? ''); $allow_personal_epg = isset($_POST['allow_personal_epg']); + $allow_personal_m3u = $allow_personal_epg && isset($_POST['allow_personal_m3u']); $names = $_POST['source_name'] ?? []; $epg_urls = $_POST['source_epg_url'] ?? []; @@ -103,6 +104,7 @@ if ($mode === 'setup' && $_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST[' 'group_name' => $group_name, 'epg_sources' => $epg_sources, 'allow_personal_epg' => $allow_personal_epg, + 'allow_personal_m3u' => $allow_personal_m3u, 'admin_key' => $new_key, ]; $written = file_put_contents($config_path, json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); @@ -119,6 +121,9 @@ if ($mode === 'setup' && $_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST[' $prefill_group = $_POST['group_name'] ?? $existing['group_name'] ?? ''; $prefill_sources = $existing['epg_sources'] ?? []; $prefill_epg = !empty($existing['allow_personal_epg']); +$prefill_personal_m3u = array_key_exists('allow_personal_m3u', $existing) + ? !empty($existing['allow_personal_m3u']) + : $prefill_epg; $submitted_key = trim($_POST['admin_key_input'] ?? $_POST['admin_key_hidden'] ?? ''); ?> @@ -289,6 +294,17 @@ $submitted_key = trim($_POST['admin_key_input'] ?? $_POST['admin_key_hidden'] +