Files
vue-pult/server/download-mplayer.js
sasha 3e90269b0b Initial commit: Vue.js тир управления система
- Клиентская часть Vue 3 + Vite
- Серверная часть Node.js + WebSocket
- Система авторизации и смен
- Управление игровыми портами
- Поддержка тем (светлая/темная)
- Адаптивный дизайн

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 12:24:22 +03:00

50 lines
2.3 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Скрипт для скачивания mplayer для Windows
const https = require('https');
const fs = require('fs');
const path = require('path');
const { exec } = require('child_process');
const mplayerUrl = 'https://sourceforge.net/projects/mplayerwin/files/MPlayer-MEncoder/r38151/mplayer-svn-38151-x86_64.7z/download';
const mplayerPath = path.join(__dirname, 'tools', 'mplayer');
console.log('📥 Скачивание mplayer для Windows...');
console.log('URL:', mplayerUrl);
// Создаем папку tools если её нет
if (!fs.existsSync(path.join(__dirname, 'tools'))) {
fs.mkdirSync(path.join(__dirname, 'tools'));
}
console.log('\n⚠ MPlayer нужно скачать вручную:');
console.log('1. Перейдите по ссылке:');
console.log(' https://sourceforge.net/projects/mplayerwin/files/MPlayer-MEncoder/');
console.log('2. Скачайте последнюю версию (например: mplayer-svn-38151-x86_64.7z)');
console.log('3. Распакуйте архив');
console.log('4. Скопируйте файл mplayer.exe в папку:');
console.log(' ' + path.join(__dirname, 'tools'));
console.log('\n📝 После этого радио будет работать без браузера!');
// Альтернативный вариант - использовать mpv
console.log('\n🎵 Альтернатива - MPV Player (рекомендуется):');
console.log('1. Скачайте с https://mpv.io/installation/');
console.log('2. Выберите Windows builds -> 64bit');
console.log('3. Распакуйте и скопируйте mpv.exe в папку:');
console.log(' ' + path.join(__dirname, 'tools'));
// Проверяем наличие плееров
const checkPlayers = () => {
const players = ['mplayer.exe', 'mpv.exe', 'vlc.exe', 'ffplay.exe'];
const toolsPath = path.join(__dirname, 'tools');
console.log('\n🔍 Проверка установленных плееров:');
players.forEach(player => {
const playerPath = path.join(toolsPath, player);
if (fs.existsSync(playerPath)) {
console.log('✅', player, '- найден!');
} else {
console.log('❌', player, '- не найден');
}
});
};
checkPlayers();