Advertisement
Cane

Starcraft Stream Viewer

Aug 18th, 2017
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 22.94 KB | None | 0 0
  1. @echo off
  2. SETLOCAL EnableDelayedExpansion
  3. for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
  4.   set "DEL=%%a"
  5. )
  6.  
  7. REM ------------------------------------------------------------
  8. REM Hello user,
  9.  
  10. REM If the script could not find the location of your VLC Media Player
  11. REM and asked you to edit the .bat file, this is what you need to do.
  12.  
  13. REM 1) Find the path to your VLC Media Player installation
  14. REM 2) Add it to the "set vlcpath=" line below
  15. REM Example: set vlcpath=C:\Program Files (x86)\VideoLAN\VLC\vlc.exe
  16.  
  17. set vlcpath=
  18.  
  19. REM 3) Save this document and exit, then try again
  20. REM ------------------------------------------------------------
  21.  
  22.  
  23.  
  24. echo.
  25. echo -------------------------------------------------------------------------------
  26. echo.
  27. call :ColorText 0e "STARCRAFT STREAM VIEWER FOR STREAMLINK + VLC MEDIA PLAYER"
  28. echo.
  29. call :Colortext 0d "This bat file requires Streamlink and VLC to be installed"
  30. echo.
  31.  
  32. if "%vlcpath%"=="" (
  33.   for /f "delims=" %%F in ('dir /b /s "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" 2^>nul') do set vlcpath=%%F
  34.   for /f "delims=" %%F in ('dir /b /s "C:\Program Files\VideoLAN\VLC\vlc.exe" 2^>nul') do set vlcpath=%%F
  35.   for /f "delims=" %%F in ('dir /b /s "C:\VideoLAN\VLC\vlc.exe" 2^>nul') do set vlcpath=%%F
  36.   for /f "delims=" %%F in ('dir /b /s "C:\VLC\vlc.exe" 2^>nul') do set vlcpath=%%F
  37.   for /f "delims=" %%F in ('dir /b /s "D:\Program Files (x86)\VideoLAN\VLC\vlc.exe" 2^>nul') do set vlcpath=%%F
  38.   for /f "delims=" %%F in ('dir /b /s "D:\Program Files\VideoLAN\VLC\vlc.exe" 2^>nul') do set vlcpath=%%F
  39.   for /f "delims=" %%F in ('dir /b /s "D:\VideoLAN\VLC\vlc.exe" 2^>nul') do set vlcpath=%%F
  40.   for /f "delims=" %%F in ('dir /b /s "D:\VLC\vlc.exe" 2^>nul') do set vlcpath=%%F
  41. )
  42.  
  43. if "%vlcpath%"=="" (
  44.   echo.
  45.   echo -------------------------------------------------------------------------------
  46.   echo.
  47.   echo ERROR: VLC PATH NOT FOUND
  48.   echo.
  49.   call :ColorText 0c "a) You EITHER do not have VLC Media Player installed, or"
  50.   echo.
  51.   call :ColorText 0c "b) You have VLC Media Player installed to a custom folder"
  52.   echo.
  53.   echo.
  54.   echo If b, you will need to edit this .bat file to point to the proper location.
  55.   echo Open the .bat file in a text editor and follow the instructions at the top.
  56.   echo.
  57.   call :ColorText 0c "Press any key to exit"
  58.   echo.
  59.   echo.
  60.   echo -------------------------------------------------------------------------------
  61.   echo.
  62.   pause>nul
  63.   EXIT
  64. )
  65.  
  66.  
  67. REM Set CDN options for Afreeca
  68. :CDN
  69.  
  70. echo.
  71. echo -------------------------------------------------------------------------------
  72. echo.
  73. call :ColorText 0e "Set Afreeca CDN server"
  74. echo.
  75. call :ColorText 0c "Only impacts Afreeca. Switch CDN if Afreeca lags for you"
  76. echo.
  77. echo.
  78. call :ColorText 0d " 1"
  79. call :ColorText 0f " Amazon AWS
  80. echo.
  81. call :ColorText 0d " 2"
  82. call :ColorText 0f " GSCDN
  83. echo.
  84. echo.
  85.  
  86. set /p cdn="> "
  87.  
  88. 2>NUL CALL :CDN_%cdn%
  89. IF ERRORLEVEL 1 CALL :DEFAULT_CDN
  90.  
  91. :CDN_1
  92.   set cdn=aws
  93.   echo.
  94.   call :ColorText 0f "CDN set to"
  95.   call :ColorText 0c " Amazon AWS"
  96.   echo.
  97.   GOTO STREAM
  98. :CDN_2
  99.   set cdn=gs
  100.   echo.
  101.   call :ColorText 0f "CDN set to"
  102.   call :ColorText 0c " GSCDN"
  103.   echo.
  104.   GOTO STREAM
  105. :DEFAULT_CDN
  106.   set cdn=gs
  107.   echo.
  108.   call :ColorText 0f "Unintelligible garbage input by user, defaulted to GSCDN"
  109.   echo.
  110.   GOTO STREAM
  111.  
  112.  
  113. :STREAM
  114.  
  115. echo.
  116. echo -------------------------------------------------------------------------------
  117. echo.
  118. call :ColorText 0d "Name"
  119. call :ColorText 0f " or"
  120. call :ColorText 0d " ID"
  121. call :ColorText 0f " of player"
  122. call :ColorText 0f " [or"
  123. call :ColorText 0d " .help"
  124. call :ColorText 0f ", "
  125. call :ColorText 0d " .setup"
  126. call :ColorText 0f ", "
  127. call :ColorText 0d " .online"
  128. call :ColorText 0f ", "
  129. call :ColorText 0d " .tl"
  130. call :ColorText 0f "]"
  131. echo.
  132.  
  133.  
  134. :loop
  135.  
  136. REM Set default service, changes if no Afreeca streamer is found
  137. set service=Afreeca
  138. set /p name="> "
  139.  
  140. :TRY_AGAIN
  141.  
  142. 2>NUL CALL :CASE_%name%
  143. IF ERRORLEVEL 1 CALL :DEFAULT_CASE
  144.  
  145. :CASE_.online
  146.   start "" https://bwstreams.appspot.com
  147.   start "" https://www.twitch.tv/directory/game/StarCraft
  148.   echo Launching online players lists in your browser...
  149.   GOTO STREAM
  150. :CASE_.tl
  151. :CASE_.teamliquid
  152.   start "" http://www.teamliquid.net/forum/brood-war/512913-guide-watch-afreeca-sc-bw-streams-with-vlc
  153.   echo Launching TeamLiquid thread in your browser...
  154.   GOTO STREAM
  155. :CASE_.setup
  156.   GOTO CDN
  157. :CASE_.help
  158.   echo.
  159.   echo.
  160.   echo.
  161.   echo.
  162.   echo.
  163.   echo.
  164.   echo.
  165.   echo.
  166.   echo.
  167.   echo.
  168.   echo.
  169.   echo.
  170.   echo.
  171.   echo.
  172.   echo.
  173.   echo.
  174.   echo.
  175.   echo.
  176.   echo -------------------------------------------------------------------------------
  177.   echo.
  178.   call :ColorText 0e "HOW TO USE"
  179.   echo.
  180.   echo.
  181.   echo ^> Bisu
  182.   echo.
  183.   echo To begin watching a stream, enter a nickname or stream ID. The script will try
  184.   echo to find the live stream on Afreeca or Twitch. When prompted, set the desired
  185.   echo quality option. If a Twitch stream is not partnered, use SOURCE.
  186.   echo.
  187.   echo If the script cannot find the specified player, you will be asked if you wish
  188.   echo to attempt to connect to that ID regardless. You can connect to any Afreeca or
  189.   echo Twitch stream this way so long as you know the ID.
  190.   echo.
  191.   echo.
  192.   call :ColorText 0e "SHOW ONLINE PLAYERS"
  193.   echo.
  194.   echo.
  195.   echo ^> .online
  196.   echo.
  197.   echo Launches the following URLs in your browser:
  198.   echo https://bwstreams.appspot.com/
  199.   echo https://www.twitch.tv/directory/game/StarCraft
  200.   echo.
  201.   echo.
  202.   call :ColorText 0e "SET CDN OPTIONS"
  203.   echo.
  204.   echo.
  205.   echo ^> .setup
  206.   echo.
  207.   echo If Afreeca streams lag or buffer frequently, switching the Afreeca CDN server
  208.   echo may help. This only impacts Afreeca streams.
  209.   echo.
  210.   echo.
  211.   call :ColorText 0e "TROUBLESHOOTING"
  212.   echo.
  213.   echo.
  214.   echo 1) If an AFREECA stream is buffering, switching the CDN can help. If it still
  215.   echo lags, try a lower quality option. Switching CDN usually helps, but not always.
  216.   echo.
  217.   echo 2) If an AFREECA stream displays a countdown timer, close VLC and try again.
  218.   echo This happens some times, possibly due to CDN or ad-service problems.
  219.   echo.
  220.   echo 3) Some TWITCH streams do not have quality options available. If lower options
  221.   echo fail, select SOURCE.
  222.   echo.
  223.   echo 4) For further info, read the TeamLiquid thread by typing .tl or .teamliquid
  224.   GOTO STREAM
  225.  
  226. REM Afreeca players (mostly Korean pros)
  227. :CASE_41tv
  228. :CASE_isee1541
  229.   set id=isee1541
  230.   GOTO PLAYER_START
  231. :CASE_910
  232. :CASE_kuyol
  233.   set id=kuyol
  234.   GOTO PLAYER_START
  235. :CASE_action
  236. :CASE_tjdeosks
  237.   set id=tjdeosks
  238.   GOTO PLAYER_START
  239. :CASE_air
  240. :CASE_rudwk1220
  241.   set id=rudwk1220
  242.   GOTO PLAYER_START
  243. :CASE_ample
  244. :CASE_sasin
  245. :CASE_hoonykkk
  246.   set id=hoonykkk
  247.   GOTO PLAYER_START
  248. :CASE_anytime
  249. :CASE_zeusboy2714
  250.   set id=zeusboy2714
  251.   GOTO PLAYER_START
  252. :CASE_asl
  253. :CASE_aslkor
  254. :CASE_afstar1
  255. :CASE_starleague
  256.   set id=afstar1
  257.   GOTO PLAYER_START
  258. :CASE_asleng
  259. :CASE_asleng1
  260. :CASE_aslenglish
  261. :CASE_asl english
  262.   set id=aslenglish
  263.   GOTO PLAYER_START
  264. :CASE_asleng2
  265. :CASE_aslenglish2
  266. :CASE_asl english 2
  267. :CASE_asl2eng2
  268.   set id=asl2eng2
  269.   GOTO PLAYER_START
  270. :CASE_autumn
  271. :CASE_onstyles
  272.   set id=onstyles
  273.   GOTO PLAYER_START
  274. :CASE_backho
  275. :CASE_cksdnddldhkd
  276.   set id=cksdnddldhkd
  277.   GOTO PLAYER_START
  278. :CASE_bctv
  279. :CASE_1a2a3a
  280.   set id=1a2a3a
  281.   GOTO PLAYER_START
  282. :CASE_beast
  283. :CASE_rjsrkdgkwk12
  284.   set id=rjsrkdgkwk12
  285.   GOTO PLAYER_START
  286. :CASE_best
  287. :CASE_wodnrdldia
  288.   set id=wodnrdldia
  289.   GOTO PLAYER_START
  290. :CASE_bisu
  291. :CASE_rlaxordyd
  292.   set id=rlaxordyd
  293.   GOTO PLAYER_START
  294. :CASE_boxer
  295. :CASE_sblyh119
  296.   set id=sblyh119
  297.   GOTO PLAYER_START
  298. :CASE_brave
  299. :CASE_xorbzzang111
  300.   set id=xorbzzang111
  301.   GOTO PLAYER_START
  302. :CASE_britney
  303. :CASE_khm11903
  304.   set id=khm11903
  305.   GOTO PLAYER_START
  306. :CASE_spire
  307. :CASE_by.spire
  308. :CASE_idch0726
  309.   set id=idch0726
  310.   GOTO PLAYER_START
  311. :CASE_calm
  312. :CASE_brainzerg7
  313.   set id=brainzerg7
  314.   GOTO PLAYER_START
  315. :CASE_carry
  316. :CASE_imcarry
  317.   set id=imcarry
  318.   GOTO PLAYER_START
  319. :CASE_casy
  320.   set id=casy
  321.   GOTO PLAYER_START
  322. :CASE_cola
  323. :CASE_nojaesang
  324.   set id=nojaesang
  325.   GOTO PLAYER_START
  326. :CASE_dongrae
  327.   set id=dongrae
  328.   GOTO PLAYER_START
  329. :CASE_eagle
  330. :CASE_cjsdkxjddlf
  331.   set id=cjsdkxjddlf
  332.   GOTO PLAYER_START
  333. :CASE_effort
  334. :CASE_momo130
  335.   set id=momo130
  336.   GOTO PLAYER_START
  337. :CASE_envy.bisu
  338. :CASE_tjdwo0000
  339.   set id=tjdwo0000
  340.   GOTO PLAYER_START
  341. :CASE_ErOs_LYH
  342. :CASE_kisszzang14
  343.   set id=kisszzang14
  344.   GOTO PLAYER_START
  345. :CASE_ETStarTV
  346. :CASE_scv306306
  347.   set id=scv306306
  348.   GOTO PLAYER_START
  349. :CASE_firebathero
  350. :CASE_fbh
  351.   set id=firebathero
  352.   GOTO PLAYER_START
  353. :CASE_fishcast
  354.   set id=fishcast
  355.   GOTO PLAYER_START
  356. :CASE_flash
  357. :CASE_byflash
  358. :CASE_by.flash
  359.   set id=byflash
  360.   GOTO PLAYER_START
  361. :CASE_force
  362. :CASE_force[name]
  363. :CASE_bs1369
  364.   set id=bs1369
  365.   GOTO PLAYER_START
  366. :CASE_free
  367. :CASE_pretty
  368. :CASE_dbsdydx
  369.   set id=dbsdydx
  370.   GOTO PLAYER_START
  371. :CASE_garimto
  372. :CASE_garimtoi
  373.   set id=garimtoi
  374.   GOTO PLAYER_START
  375. :CASE_ggaemo
  376. :CASE_kkmkhh1234
  377.   set id=kkmkhh1234
  378.   GOTO PLAYER_START
  379. :CASE_gorush
  380. :CASE_cztaemin
  381.   set id=cztaemin
  382.   GOTO PLAYER_START
  383. :CASE_great
  384. :CASE_myunghwan
  385.   set id=myunghwan
  386.   GOTO PLAYER_START
  387. :CASE_guemchi
  388. :CASE_iammang
  389. :CASE_rlatldgus
  390.   set id=rlatldgus
  391.   GOTO PLAYER_START
  392. :CASE_he)jy
  393. :CASE_hejy
  394.   set id=chassisle
  395.   GOTO PLAYER_START
  396. :CASE_hero
  397. :CASE_byhero
  398.   set id=byhero
  399.   GOTO PLAYER_START
  400. :CASE_hint
  401. :CASE_hackanim
  402. :CASE_kyuhoikim
  403.   set id=kyuhoikim
  404.   GOTO PLAYER_START
  405. :CASE_hiya
  406. :CASE_aisiteru99
  407.   set id=aisiteru99
  408.   GOTO PLAYER_START
  409. :CASE_hoejja
  410. :CASE_gkm905
  411.   set id=gkm905
  412.   GOTO PLAYER_START
  413. :CASE_hogil
  414. :CASE_nspzerg
  415.   set id=nspzerg
  416.   GOTO PLAYER_START
  417. :CASE_horang2
  418. :CASE_rudals5467
  419.   set id=rudals5467
  420.   GOTO PLAYER_START
  421. :CASE_hwan
  422. :CASE_wlghks910903
  423.   set id=wlghks910903
  424.   GOTO PLAYER_START
  425. :CASE_hwasin
  426. :CASE_piroopirong
  427.   set id=piroopirong
  428.   GOTO PLAYER_START
  429. :CASE_hyun
  430. :CASE_understay
  431.   set id=understay
  432.   GOTO PLAYER_START
  433. :CASE_hyuk
  434. :CASE_rlekfu6
  435.   set id=rlekfu6
  436.   GOTO PLAYER_START
  437. :CASE_hyvaa
  438. :CASE_youszlls14
  439.   set id=youszlls14
  440.   GOTO PLAYER_START
  441. :CASE_icarus
  442. :CASE_psn1555
  443.   set id=psn1555
  444.   GOTO PLAYER_START
  445. :CASE_intotherainbow
  446. :CASE_erosrainbow
  447.   set id=erosrainbow
  448.   GOTO PLAYER_START
  449. :CASE_iris
  450. :CASE_berserker
  451. :CASE_bht0205
  452.   set id=bht0205
  453.   GOTO PLAYER_START
  454. :CASE_jaedong
  455. :CASE_jaedong23
  456.   set id=Jaedong23
  457.   GOTO PLAYER_START
  458. :CASE_jaehoon
  459. :CASE_rlawogns019
  460.   set id=rlawogns019
  461.   GOTO PLAYER_START
  462. :CASE_jangbi
  463. :CASE_mycou
  464.   set id=mycou
  465.   GOTO PLAYER_START
  466. :CASE_jat.tv
  467. :CASE_yyy2222
  468.   set id=yyy2222
  469.   GOTO PLAYER_START
  470. :CASE_jsmtv
  471. :CASE_hiji0312
  472.   set id=hiji0312
  473.   GOTO PLAYER_START
  474. :CASE_july
  475. :CASE_julyzerg
  476.   set id=julyzerg
  477.   GOTO PLAYER_START
  478. :CASE_kal
  479. :CASE_goojila
  480. :CASE_rngusdl
  481.   set id=rngusdl
  482.   GOTO PLAYER_START
  483. :CASE_kcm
  484. :CASE_cjfals28
  485.   set id=cjfals28
  486.   GOTO PLAYER_START
  487. :CASE_kds
  488. :CASE_cantob
  489.   set id=cantob
  490.   GOTO PLAYER_START
  491. :CASE_killer
  492. :CASE_h78ert
  493.   set id=h78ert
  494.   GOTO PLAYER_START
  495. :CASE_kimeunho
  496. :CASE_dmsghdlekd
  497.   set id=dmsghdlekd
  498.   GOTO PLAYER_START
  499. :CASE_koala
  500. :CASE_cyskkscv
  501.   set id=cyskkscv
  502.   GOTO PLAYER_START
  503. :CASE_kwanro
  504. :CASE_ehrflq2013
  505.   set id=ehrflq2013
  506.   GOTO PLAYER_START
  507. :CASE_larva
  508. :CASE_hong9
  509. :CASE_dpfgc3
  510.   set id=dpfgc3
  511.   GOTO PLAYER_START
  512. :CASE_last
  513. :CASE_rlatjdgus228
  514.   set id=rlatjdgus228
  515.   GOTO PLAYER_START
  516. :CASE_lazy
  517. :CASE_hateliar
  518.   set id=hateliar
  519.   GOTO PLAYER_START
  520. :CASE_leta
  521. :CASE_palko1
  522.   set id=palko1
  523.   GOTO PLAYER_START
  524. :CASE_leto
  525. :CASE_sereniss87
  526.   set id=sereniss87
  527.   GOTO PLAYER_START
  528. :CASE_light
  529. :CASE_scv6256
  530.   set id=scv6256
  531.   GOTO PLAYER_START
  532. :CASE_lovetv
  533. :CASE_sr629
  534.   set id=sr629
  535.   GOTO PLAYER_START
  536. :CASE_m18m
  537. :CASE_minho
  538. :CASE_djwp0531
  539.   set id=djwp0531
  540.   GOTO PLAYER_START
  541. :CASE_minooli
  542.   set id=minooli
  543.   GOTO PLAYER_START
  544. :CASE_mahell
  545. :CASE_alsd1323
  546.   set id=alsd1323
  547.   GOTO PLAYER_START
  548. :CASE_midas
  549. :CASE_sangwk
  550.   set id=sangwk
  551.   GOTO PLAYER_START
  552. :CASE_mind
  553. :CASE_peros777
  554.   set id=peros777
  555.   GOTO PLAYER_START
  556. :CASE_mini
  557. :CASE_bye1013
  558.   set id=bye1013
  559.   GOTO PLAYER_START
  560. :CASE_miso
  561. :CASE_hdy4546
  562.   set id=hdy4546
  563.   GOTO PLAYER_START
  564. :CASE_modesty
  565. :CASE_tearstt
  566.   set id=tearstt
  567.   GOTO PLAYER_START
  568. :CASE_mong
  569. :CASE_cksgmldbs
  570.   set id=cksgmldbs
  571.   GOTO PLAYER_START
  572. :CASE_mook
  573. :CASE_limtaemook
  574.   set id=limtaemook
  575.   GOTO PLAYER_START
  576. :CASE_movie
  577. :CASE_jyh8610
  578.   set id=jyh8610
  579.   GOTO PLAYER_START
  580. :CASE_nada
  581. :CASE_nada11200
  582.   set id=nada11200
  583.   GOTO PLAYER_START
  584. :CASE_nal_ra
  585. :CASE_nalra
  586. :CASE_ra
  587. :CASE_nalra82
  588.   set id=nalra82
  589.   GOTO PLAYER_START
  590. :CASE_noble
  591. :CASE_rnjsgurwls15
  592.   set id=rnjsgurwls15
  593.   GOTO PLAYER_START
  594. :CASE_onicle
  595.   set id=onicle
  596.   GOTO PLAYER_START
  597. :CASE_perfectman
  598. :CASE_row6400
  599.   set id=row6400
  600.   GOTO PLAYER_START
  601. :CASE_piano
  602. :CASE_organ
  603. :CASE_organ333
  604.   set id=organ333
  605.   GOTO PLAYER_START
  606. :CASE_pure
  607. :CASE_psj0436
  608.   set id=psj0436
  609.   GOTO PLAYER_START
  610. :CASE_pusan
  611. :CASE_jou1025
  612.   set id=jou1025
  613.   GOTO PLAYER_START
  614. :CASE_rain
  615. :CASE_sun
  616. :CASE_by.rain
  617. :CASE_by.sun
  618. :CASE_ioioiobb
  619.   set id=ioioiobb
  620.   GOTO PLAYER_START
  621. :CASE_rapsodytoss
  622. :CASE_younggunz91
  623.   set id=younggunz91
  624.   GOTO PLAYER_START
  625. :CASE_reach
  626. :CASE_reach12
  627. :CASE_mantoss
  628.   set id=reach12
  629.   GOTO PLAYER_START
  630. :CASE_really
  631. :CASE_sea.really
  632. :CASE_theferrari
  633.   set id=theferrari
  634.   GOTO PLAYER_START
  635. :CASE_rock
  636. :CASE_therock
  637. :CASE_nal_rock
  638. :CASE_aghhi
  639.   set id=aghhi
  640.   GOTO PLAYER_START
  641. :CASE_roro
  642. :CASE_skwangs7
  643.   set id=skwangs7
  644.   GOTO PLAYER_START
  645. :CASE_rush
  646. :CASE_yoo376
  647.   set id=yoo376
  648.   GOTO PLAYER_START
  649. :CASE_s2
  650. :CASE_ssoov227
  651.   set id=ssoov227
  652.   GOTO PLAYER_START
  653. :CASE_saber
  654. :CASE_ryul2
  655. :CASE_jackpot
  656.   set id=jackpot
  657.   GOTO PLAYER_START
  658. :CASE_sabitv
  659. :CASE_zzzz2z
  660.   set id=zzzz2z
  661.   GOTO PLAYER_START
  662. :CASE_savior
  663. :CASE_mjy1123
  664.   set id=mjy1123
  665.   GOTO PLAYER_START
  666. :CASE_scat.horang2
  667. :CASE_comby4343
  668.   set id=comby4343
  669.   GOTO PLAYER_START
  670. :CASE_sea
  671. :CASE_yuambo
  672.   set id=yuambo
  673.   GOTO PLAYER_START
  674. :CASE_sea.kh
  675. :CASE_youngskh
  676.   set id=youngskh
  677.   GOTO PLAYER_START
  678. :CASE_sexy
  679. :CASE_rfvtgb778
  680.   set id=rfvtgb778
  681.   GOTO PLAYER_START
  682. :CASE_shark
  683. :CASE_starbell87
  684.   set id=starbell87
  685.   GOTO PLAYER_START
  686. :CASE_sharp
  687. :CASE_sharpragu
  688.   set id=sharpragu
  689.   GOTO PLAYER_START
  690. :CASE_shine
  691. :CASE_lyh8808
  692.   set id=lyh8808
  693.   GOTO PLAYER_START
  694. :CASE_shinee
  695. :CASE_onlysibar
  696.   set id=onlysibar
  697.   GOTO PLAYER_START
  698. :CASE_shuttle
  699. :CASE_eyewater
  700. :CASE_jk890202
  701.   set id=jk890202
  702.   GOTO PLAYER_START
  703. :CASE_sky
  704. :CASE_gksmfaowj
  705.   set id=gksmfaowj
  706.   GOTO PLAYER_START
  707. :CASE_skyhigh
  708. :CASE_chobs0309
  709.   set id=chobs0309
  710.   GOTO PLAYER_START
  711. :CASE_smile
  712. :CASE_worud0608
  713.   set id=worud0608
  714.   GOTO PLAYER_START
  715. :CASE_snow
  716. :CASE_by.snow
  717. :CASE_tmsh401
  718.   set id=tmsh401
  719.   GOTO PLAYER_START
  720. :CASE_sonic
  721. :CASE_sogoodtt
  722.   set id=sogoodtt
  723.   GOTO PLAYER_START
  724. :CASE_soulblacktv
  725. :CASE_goodplay
  726.   set id=goodplay
  727.   GOTO PLAYER_START
  728. :CASE_soulkey
  729. :CASE_g_soulkey
  730. :CASE_neo.g_soulkey
  731. :CASE_minchul
  732.   set id=minchul
  733.   GOTO PLAYER_START
  734. :CASE_spotimes
  735. :CASE_bsscamp
  736.   set id=bsscamp
  737.   GOTO PLAYER_START
  738. :CASE_ssak
  739. :CASE_ghtjs3833
  740.   set id=ghtjs3833
  741.   GOTO PLAYER_START
  742. :CASE_starcue
  743. :CASE_jimeang
  744.   set id=jimeang
  745.   GOTO PLAYER_START
  746. :CASE_stork
  747. :CASE_koreasbg
  748.   set id=koreasbg
  749.   GOTO PLAYER_START
  750. :CASE_tamoo
  751. :CASE_zlzl1514
  752.   set id=zlzl1514
  753.   GOTO PLAYER_START
  754. :CASE_terror
  755. :CASE_y1026
  756.   set id=y1026
  757.   GOTO PLAYER_START
  758. :CASE_trot
  759. :CASE_tjdwnls123
  760.   set id=tjdwnls123
  761.   GOTO PLAYER_START
  762. :CASE_tyson
  763. :CASE_subeom12
  764.   set id=subeom12
  765.   GOTO PLAYER_START
  766. :CASE_yellow
  767. :CASE_lifeisjust
  768.   set id=lifeisjust
  769.   GOTO PLAYER_START
  770. :CASE_zelot
  771. :CASE_jh3697
  772.   set id=jh3697
  773.   GOTO PLAYER_START
  774. :CASE_zergman
  775. :CASE_jun10280
  776.   set id=jun10280
  777.   GOTO PLAYER_START
  778. :CASE_zero
  779. :CASE_kimmyungwun
  780.   set id=kimmyungwun
  781.   GOTO PLAYER_START
  782. :CASE_zeus
  783. :CASE_70jeontaekyu
  784.   set id=70jeontaekyu
  785.   GOTO PLAYER_START
  786.  
  787. REM Twitch players (mostly foreigners or tournaments)
  788. :CASE_artosis
  789.   set id=artosis
  790.   set service=Twitch
  791.   GOTO PLAYER_START
  792. :CASE_asltwitch
  793. :CASE_asl twitch
  794.   set id=asl
  795.   set service=Twitch
  796.   GOTO PLAYER_START
  797. :CASE_bonyth
  798.   set id=bonyth
  799.   set service=Twitch
  800.   GOTO PLAYER_START
  801. :CASE_bratok
  802. :CASE_pavelbratok
  803.   set id=pavelbratok
  804.   set service=Twitch
  805.   GOTO PLAYER_START
  806. :CASE_cane
  807. :CASE_canecraft
  808.  REM This is me, the author of the batch file. Testing shit, remove later.
  809.   set id=canecraft
  810.   set service=Twitch
  811.   GOTO PLAYER_START
  812. :CASE_day9
  813. :CASE_day[9]
  814. :CASE_day9tv
  815.   set id=day9tv
  816.   set service=Twitch
  817.   GOTO PLAYER_START
  818. :CASE_demuslim
  819.   set id=demuslim
  820.   set service=Twitch
  821.   GOTO PLAYER_START
  822. :CASE_draco
  823. :CASE_naldraco
  824. :CASE_nal_draco
  825.   set id=nal_draco
  826.   set service=Twitch
  827.   GOTO PLAYER_START
  828. :CASE_dragon
  829.   set id=dragon
  830.   set service=Twitch
  831.   GOTO PLAYER_START
  832. :CASE_dr_shrinker
  833. :CASE_drshrinker
  834. :CASE_shrinker
  835.   set id=dr_shrinker
  836.   set service=Twitch
  837.   GOTO PLAYER_START
  838. :CASE_eonzerg
  839. :CASE_[sc1f]eonzerg
  840. :CASE_imeonzerg
  841.   set id=imeonzerg
  842.   set service=Twitch
  843.   GOTO PLAYER_START
  844. :CASE_hui
  845. :CASE_wayne379
  846.   set id=wayne379
  847.   set service=Twitch
  848.   GOTO PLAYER_START
  849. :CASE_incontrol
  850. :CASE_incontroltv
  851.   set id=incontroltv
  852.   set service=Twitch
  853.   GOTO PLAYER_START
  854. :CASE_lancerx
  855. :CASE_must_die
  856.   set id=must_die
  857.   set service=Twitch
  858.   GOTO PLAYER_START
  859. :CASE_lastscan
  860. :CASE_scan
  861. :CASE_skryoo1004
  862.   set id=skryoo1004
  863.   set service=Twitch
  864.   GOTO PLAYER_START
  865. :CASE_mana
  866. :CASE_liquidmana
  867.   set id=liquidmana
  868.   set service=Twitch
  869.   GOTO PLAYER_START
  870. :CASE_medry
  871. :CASE_medrybw
  872.   set id=medrybw
  873.   set service=Twitch
  874.   GOTO PLAYER_START
  875. :CASE_nony
  876. :CASE_liquidnony
  877. :CASE_tyler
  878. :CASE_liquidtyler
  879.   set id=nony
  880.   set service=Twitch
  881.   GOTO PLAYER_START
  882. :CASE_oystein
  883. :CASE_øystein
  884.   set id=oystein
  885.   set service=Twitch
  886.   GOTO PLAYER_START
  887. :CASE_raelcun
  888. :CASE_nuclearbackwards
  889.   set id=raelcun
  890.   set service=Twitch
  891.   GOTO PLAYER_START
  892. :CASE_ret
  893. :CASE_liquidret
  894. :CASE_liquid`ret
  895.   set id=liquidret
  896.   set service=Twitch
  897.   GOTO PLAYER_START
  898. :CASE_schamtoo
  899. :CASE_haveatyou
  900. :CASE_have at you
  901.   set id=schamtoo
  902.   set service=Twitch
  903.   GOTO PLAYER_START
  904. :CASE_sero
  905. :CASE_seroqt
  906.   set id=seroqt
  907.   set service=Twitch
  908.   GOTO PLAYER_START
  909. :CASE_sscait
  910. :CASE_sscaitournament
  911. :CASE_sscai tournament
  912.   set id=sscait
  913.   set service=Twitch
  914.   GOTO PLAYER_START
  915. :CASE_starcraft
  916.   set id=starcraft
  917.   set service=Twitch
  918.   GOTO PLAYER_START
  919. :CASE_terrorterran
  920.   set id=terrorterran
  921.   set service=Twitch
  922.   GOTO PLAYER_START
  923. :CASE_winter
  924. :CASE_winterstarcraft
  925. :CASE_wintergaming
  926.   set id=wintergaming
  927.   set service=Twitch
  928.   GOTO PLAYER_START
  929.  
  930. :CASE_
  931.   echo.
  932.   call :ColorText 0e "User fat-fingered the "
  933.   call :ColorText 0c " enter "
  934.   call :ColorText 0e " key, please type a command or playername"
  935.   echo.
  936.   echo.
  937.   set /p name="> "
  938.   GOTO TRY_AGAIN
  939.  
  940. REM If no player was found, ask for clarification
  941. :DEFAULT_CASE
  942.   echo.
  943.   call :ColorText 0e "Player "
  944.   call :ColorText 0c " %name% "
  945.   call :ColorText 0e " not found."
  946.   echo.
  947.   call :ColorText 0e "Input another name or command, or select from options menu below."
  948.   echo.
  949.   echo.
  950.   call :ColorText 0d " 1"
  951.   call :ColorText 0f " Attempt to connect to "
  952.   call :ColorText 0c " %name% "
  953.   call :ColorText 0f " on "
  954.   call :ColorText 0c " Afreeca.com"
  955.   echo.
  956.   call :ColorText 0d " 2"
  957.   call :ColorText 0f " Attempt to connect to "
  958.   call :ColorText 0c " %name% "
  959.   call :ColorText 0f " on "
  960.   call :ColorText 0c " Twitch.tv"
  961.   echo.
  962.   echo.
  963.   set /p serv="> "
  964.   2>NUL CALL :SERVICE_%serv%
  965.   IF ERRORLEVEL 1 CALL :DEFAULT_SERVICE
  966.   :SERVICE_1
  967.     echo.
  968.     call :ColorText 0f "Service set to"
  969.     call :ColorText 0c " Afreeca.com"
  970.     echo.
  971.     set service=Afreeca
  972.     set id="%name%"
  973.     GOTO PLAYER_START
  974.   :SERVICE_2
  975.     echo.
  976.     call :ColorText 0f "Service set to"
  977.     call :ColorText 0c " Twitch.tv"
  978.     echo.
  979.     set service=Twitch
  980.     set id="%name%"
  981.     GOTO PLAYER_START
  982.   :DEFAULT_SERVICE
  983.     set name=%serv%
  984.     echo.
  985.     GOTO TRY_AGAIN
  986.  
  987.  
  988.  
  989. :PLAYER_START
  990.  
  991. :QUALITY
  992.  
  993. echo.
  994. call :ColorText 0e "Set stream quality"
  995. echo.
  996. echo.
  997. call :ColorText 0d " 1"
  998. call :ColorText 0f " Source (1080p)"
  999. echo.
  1000. call :ColorText 0d " 2"
  1001. call :ColorText 0f " HD (720p)"
  1002. echo.
  1003. call :ColorText 0d " 3"
  1004. call :ColorText 0f " SD (480p)"
  1005. echo.
  1006. echo.
  1007.  
  1008. set /p quality="> "
  1009.  
  1010. 2>NUL CALL :QUALITY_%quality%
  1011. IF ERRORLEVEL 1 CALL :DEFAULT_QUALITY
  1012.  
  1013. :QUALITY_1
  1014.   set quality=original
  1015.   echo.
  1016.   call :ColorText 0f "Attempting to connect to "
  1017.   call :ColorText 0c " %name%"
  1018.   call :ColorText 0f " on "
  1019.   call :ColorText 0c " %service%"
  1020.   call :ColorText 0f " in "
  1021.   call :ColorText 0c " SOURCE"
  1022.   echo ...
  1023.   echo.
  1024.   call :ColorText 0f "If the stream is live, VLC Media Player should open in 5-30 seconds"
  1025.   echo .
  1026.   call :ColorText 0f "You can type in additional names below if you wish to multistream."
  1027.   echo :
  1028.   GOTO LAUNCH
  1029. :QUALITY_2
  1030.   set quality=hd
  1031.   echo.
  1032.   call :ColorText 0f "Attempting to connect to "
  1033.   call :ColorText 0c " %name%"
  1034.   call :ColorText 0f " on "
  1035.   call :ColorText 0c " %service%"
  1036.   call :ColorText 0f " in "
  1037.   call :ColorText 0c " HD"
  1038.   echo ...
  1039.   echo.
  1040.   call :ColorText 0f "If the stream is live, VLC Media Player should open in 5-30 seconds"
  1041.   echo .
  1042.   call :ColorText 0f "You can type in additional names below if you wish to multistream."
  1043.   echo :
  1044.   GOTO LAUNCH
  1045. :QUALITY_3
  1046.   set quality=sd
  1047.   echo.
  1048.   call :ColorText 0f "Attempting to connect to "
  1049.   call :ColorText 0c " %name%"
  1050.   call :ColorText 0f " on "
  1051.   call :ColorText 0c " %service%"
  1052.   call :ColorText 0f " in "
  1053.   call :ColorText 0c " SD"
  1054.   echo ...
  1055.   echo.
  1056.   call :ColorText 0f "If the stream is live, VLC Media Player should open in 5-30 seconds"
  1057.   echo .
  1058.   call :ColorText 0f "You can type in additional names below if you wish to multistream."
  1059.   echo :
  1060.   GOTO LAUNCH
  1061. :DEFAULT_QUALITY
  1062.   set quality=hd
  1063.   echo.
  1064.   call :ColorText 0f "Unintelligible garbage input by user, quality defaulted to SOURCE"
  1065.   echo.
  1066.   echo.
  1067.   call :ColorText 0f "Attempting to connect to "
  1068.   call :ColorText 0c " %name%"
  1069.   call :ColorText 0f " on "
  1070.   call :ColorText 0c " %service%"
  1071.   call :ColorText 0f " in "
  1072.   call :ColorText 0c " SOURCE"
  1073.   echo ...
  1074.   echo.
  1075.   call :ColorText 0f "If the stream is live, VLC Media Player should open in 5-30 seconds"
  1076.   echo .
  1077.   call :ColorText 0f "You can type in additional names below if you wish to multistream."
  1078.   echo :
  1079.   GOTO LAUNCH
  1080.  
  1081. :LAUNCH
  1082.  
  1083. if "%service%"=="Twitch" (
  1084.   set url="twitch.tv"
  1085.   if "%quality%"=="original" (
  1086.     set output=best
  1087.   )
  1088.   if "%quality%"=="hd" (
  1089.     set output=720p
  1090.   )
  1091.   if "%quality%"=="sd" (
  1092.     set output=480p
  1093.   )
  1094. )
  1095.  
  1096. if "%service%"=="Afreeca" (
  1097.   set url="afreeca.com"
  1098.   set output="%cdn%"_"%quality%"
  1099. )
  1100.  
  1101. start /B streamlink --loglevel=error --player="%vlcpath% --file-caching=5000 --network-caching=5000 --meta-title=%name%" %url%/%id% %output%
  1102.  
  1103. GOTO STREAM
  1104.  
  1105. :ColorText
  1106. echo off
  1107. <nul set /p ".=%DEL%" > "%~2"
  1108. findstr /v /a:%1 /R "^$" "%~2" nul
  1109. del "%~2" > nul 2>&1
  1110. goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement