Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows #43

Open
pjrf opened this issue Jan 15, 2020 · 0 comments
Open

Windows #43

pjrf opened this issue Jan 15, 2020 · 0 comments

Comments

@pjrf
Copy link

pjrf commented Jan 15, 2020

Podia existir um "radio.cmd" para se usar no windows.
Fazer o download do mpv de https://sourceforge.net/projects/mpv-player-windows/files/64bit/
e por no "radio.cmd" por exemplo:

@echo off
set player="c:\mpv\mpv.exe"
if not exist %player% ( goto:abort )
goto:begin

:begin
title Radio
color 02
cls
echo.
echo E) Exit P) Pause K) Kill
echo.
echo 1) Antena1 10) Oxigenio
echo 2) Antena2 11) Radar
echo 3) Antena3 12) Renascenca
echo 4) Cidade FM 13) RFM
echo 5) Comercial 14) RUC
echo 6) Kiss FM 15) Smooth
echo 7) M80 16) TSF
echo 8) Mega Hits 17) Vodafone
echo 9) MEO Music 18) Zero
echo.
echo Which radio do you want to listen?

set /p a=

IF %a%==E (
call:kill
goto:abort
)
IF %a%==K (
call:kill
)
IF %a%==P (
echo cycle pause >\.\pipe\mpv-pipe
)
:: mpv-remote.bat
:: @>\.\pipe\mpv-pipe echo %*
:: mpv-remote cycle pause

IF %a%==1 (call:play "--referrer http://www.rtp.pt https://streaming-live.rtp.pt/liveradio/antena180a/playlist.m3u8")
IF %a%==2 (call:play "--referrer http://www.rtp.pt https://streaming-live.rtp.pt/liveradio/antena280a/playlist.m3u8")
IF %a%==3 (call:play "--referrer http://www.rtp.pt https://streaming-live.rtp.pt/liveradio/antena380a/playlist.m3u8")
IF %a%==4 (call:play "http://mcrwowza5.mcr.iol.pt/cidade/ngrp:cidade.stream_all/playlist.m3u8")
IF %a%==5 (call:play "https://mcrwowza5.mcr.iol.pt/comercial/ngrp:comercial.stream_all/playlist.m3u8")
IF %a%==6 (call:play "http://162.210.196.217:8070/stream.mp3")
IF %a%==7 (call:play "http://mcrwowza5.mcr.iol.pt/m80/ngrp:m80.stream_all/playlist.m3u8")
IF %a%==8 (call:play "https://20133.live.streamtheworld.com/MEGA_HITSAAC.aac")
IF %a%==9 (call:play "http://centova.radios.pt/proxy/495")
IF %a%==10 (call:play "https://proic1.evspt.com/oxigenio_aac")
IF %a%==11 (call:play "http://centova.radios.pt:8497/stream")
IF %a%==12 (call:play "https://20723.live.streamtheworld.com/RADIO_RENASCENCAAAC.aac")
IF %a%==13 (call:play "https://20133.live.streamtheworld.com/RFMAAC.aac")
IF %a%==14 (call:play "http://ruc.midi-club.net:8000/")
IF %a%==15 (call:play "http://mcrwowza3.mcr.iol.pt/smooth/ngrp:smooth.stream_all/playlist.m3u8")
IF %a%==16 (call:play "http://tsfdirecto.tsf.pt/tsfdirecto.aac")
IF %a%==17 (call:play "http://mcrscast.mcr.iol.pt/vodafone")
IF %a%==18 (call:play "http://stream.radiozero.pt:8000/zero128.mp3")
goto:begin

:kill
for /f "tokens=2 delims=," %%b in ('c:\WINDOWS\system32\tasklist.exe /fo csv /nh /fi "imagename eq mpv.exe" 2^>nul') do ( c:\WINDOWS\system32\taskkill /PID %%~b /F )
goto:eof

:play
call:kill
start "Radio" /MIN /B cmd /C %player% --input-ipc-server=\.\pipe\mpv-pipe %~1
if ERRORLEVEL 1 ( goto:abort )
goto:eof

:abort
::color 02
exit /B 1
goto:eof

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant