Advertisement
WannaGet

GETPaP

Jun 5th, 2015
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 57.81 KB | None | 0 0
  1. ::(u): skip catagory as this no longer works.
  2. ::(t): installation adds shortcut to 'GET-IPLAYER - x86+64.bat' on desktop with icon & maximised window. Adds the choice to add too.
  3. ::(s): added %hide% to download string. Now only matches not in recording history will attempt to download by default.
  4. ::(r): added --whitespace to download string. Underscores on downloaded files now replaced by spaces.
  5. ::(q): history off by default
  6. ::(p): remove empty Get-Iplayer folder on desktop.
  7. ::(o): using forced downloading when a download fails saves your choices & skips questions. For example; what you wanna watch, download folder etc.
  8. ::(P): history can be switched on & off.
  9. ::(n): reverted (m). MOVE failed when destination folder exists.
  10. ::(m): reverted mistake. Using MOVE to usb (R:\) as it failed. Only use MOVE to desktop.
  11. ::(l): Resize window to 50 lines when downloading only (if NOT "!dip!"=="--fields=pid"). Leaves window large for matching PID downloads.
  12. ::(k): set more lines when %Pap% not empty, as some programs have many results.
  13. ::(j): use MOVE instead of Robocopy when downloading to desktop.
  14. ::(i): trimmed some bits around deleting partial downloads before & after streaming.
  15. ::(h): remove '&' when choosing catagory with if NOT "!tttt!"=="" set tttt=%tttt:&=%
  16. ::(g): removed two echo commands left in by mistake.
  17. ::(f): fixed blank entry at start not working using: if NOT "!Pap!"=="" set Pap=%Pap:"=%
  18. ::(e): fixed download folder input not working at start using: set Pap=%Pap:"=%
  19. ::(d): trim leading & trailing whitespace from all user input using CALL to subroutine.
  20. ::(c): trim leading & trailing whitespace from user input at start (Pap) & download (earh).
  21. ::(b): wrap quotes around earh if words only. Eg. No quotes for PID or NUMBERS. Avoids downloading all programs matching each word. Only the string of words is matched & downloaded.
  22. ::(a): set lines to 9999 for full list search.
  23. ::TO DO  : Fix failure [unexpected truth at this time] when forced re-downloading of multiple worded title after a failed download. PID's & codes work.
  24. ::TO DO  : Add PVR commands. Unfinished/barely started. Ideally set pvr & create task in task scheduler. Perhaps ask user when task to be run & be able to change time run & delete task etc.
  25. ::TO DO  : Forced downloading should set history on as you only need force a previously downloaded program.
  26. ::TO DO  : if more than one instance of get-iplayer.bat running check rtmpdump process, if running wait to stream. therefore programs could be queued.
  27. ::TO DO  : Maybe use config file to set default settings or use start of [GET-IPLAYER - x86+64.bat] so an extra file not needed.
  28. ::TO DO  : Use of PID codes from the start.
  29. ::TO DO  : Deal with ampersands inputted.
  30. ::TO DO  : Add option to open text file of tv, radio or podcast cache when searching full list - Maybe use list to search results
  31. ::TO DO  : Add question: if destination folder (R:/Video) not exist ask for path of folder then check answered folder if exist set the variable to answer. Else repeat.
  32. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  33. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  34. :::::::::::::::::::======================================================::::::::::::::::::::::::::
  35. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  36. :::::::::::::::::::    This Batch File Is To Be Used With Get-IPlayer    ::::::::::::::::::::::::::
  37. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  38. :::::::::::::::::::Get-IPlayer Downloads Streams From The IPlayer Website::::::::::::::::::::::::::
  39. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  40. :::::::::::::::::::======================================================::::::::::::::::::::::::::
  41. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  42. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  43. @echo off
  44. setlocal enabledelayedexpansion
  45. echo.&echo.&echo Please Wait..
  46. set type=TV
  47. set hide=--hide
  48. @IF EXIST "%userprofile%\desktop\iPlayer Recordings" for /F %%N in ('dir /S/B "%userprofile%\Desktop\iPlayer Recordings" ^| find /V /C "::"') do (if %%N EQU 0 rd "%userprofile%\Desktop\iPlayer Recordings")
  49. @IF EXIST "%userprofile%\desktop\Get-IPlayer" for /F %%N in ('dir /S/B "%userprofile%\Desktop\Get-IPlayer" ^| find /V /C "::"') do (if %%N EQU 0 rd "%userprofile%\Desktop\Get-IPlayer")
  50. COLOR 0e
  51. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  52. :::::::::::::::::::::::::::::::::Determine Whether 32bit or 64bit::::::::::::::::::::::::::::::::::
  53. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  54. if exist "C:\Program Files (x86)" SET TBIT= (x86)
  55. :startA
  56. if not exist "C:\Program Files%TBIT%\get_iplayer\Uninst.exe" mode con cols=140&mode con lines=60&goto :DOWNLOADGET
  57. if exist "R:\GET-IPLAYER.txt" ATTRIB +H "R:\GET-IPLAYER.txt"
  58. :raddypodcst
  59. if not "%TBIT%"==" (x86)" goto :start
  60. echo.&echo.&echo.
  61. @Echo                              %DATE%
  62. if "%TBIT%"==" (x86)" goto :skipp
  63. GOTO :DOWNLOADGET
  64. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::START
  65. :START
  66. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  67. title Get-iPlayer
  68. mode con cols=140
  69. mode con lines=60
  70. COLOR 0E
  71. echo.|command /C date|find /i "current" >%temp%\dow.txt
  72. for /f "tokens=1-4 delims=/ " %%i in (%temp%\dow.txt) do set DOW=%%l
  73. echo.&echo.&echo.&echo                                            %TIME%&echo.
  74. IF "%DOW%" == "Sun" echo                                        %DATE% Sunday
  75. IF "%DOW%" == "Mon" echo                                         %DATE% Monday
  76. IF "%DOW%" == "Tue" echo                                        %DATE% Tuesday
  77. IF "%DOW%" == "Wed" echo                                       %DATE% Wednesday
  78. IF "%DOW%" == "Thu" echo                                       %DATE% Thursday
  79. IF "%DOW%" == "Fri" echo                                         %DATE% Friday
  80. IF "%DOW%" == "Sat" echo                                       %DATE% Saturday
  81.  
  82. GOTO :skippy
  83. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::skipp
  84. :skipp
  85. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  86. COLOR 0e
  87. mode con cols=140
  88. mode con lines=999
  89. echo.
  90. echo.
  91. echo.
  92.                             @Echo                              %DATE%
  93. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::skippy
  94. :skippy
  95. echo.&echo.&echo.
  96.                              echo  :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  97.     if "%forced%"=="--force" echo  :::::::::::::::::                     FORCED DOWNLOADING                     ::::::::::::::::::
  98.                              echo  :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  99.                              echo  :::::::::::::::::                                                            ::::::::::::::::::
  100.         if /i "%type%"=="tv" echo  :::::::04Pu::::::                       - TELEVISION -                       ::::::::::::::::::
  101.      if /i "%type%"=="RADIO" echo  :::::::::::::::::                          - RADIO -                         ::::::::::::::::::
  102.    if /i "%type%"=="PODCAST" echo  :::::::::::::::::                         - PODCAST -                        ::::::::::::::::::
  103.                              ECHO  :::::::::::::::::                                                            ::::::::::::::::::
  104.                              echo  :::::::::::::::::   Leave blank, press enter to view the full program list   ::::::::::::::::::
  105. if not "%forced%"=="--force" echo  :::::::::::::::::                                                            ::::::::::::::::::
  106.                              echo  :::::::::::::::::     Maximise the window                                    ::::::::::::::::::
  107.                              echo  :::::::::::::::::     Use the scrollbar/mouse wheel to navigate the list     ::::::::::::::::::
  108.      if /i "%proggy%"=="rad" echo  :::::::::::::::::                                                            ::::::::::::::::::
  109.      if /i "%proggy%"=="pod" echo  :::::::::::::::::                                                            ::::::::::::::::::
  110.     if /i NOT "%type%"=="tv" echo  :::::::::::::::::                         - WARNING -                        ::::::::::::::::::
  111.      if /i "%proggy%"=="rad" echo  :::::::::::::::::                                                            ::::::::::::::::::
  112.      if /i "%proggy%"=="pod" echo  :::::::::::::::::                                                            ::::::::::::::::::
  113.      if /i "%proggy%"=="rad" echo  :::::::::::::::::                 RADIO HAS OVER 3000 PROGRAMS               ::::::::::::::::::
  114.      if /i "%proggy%"=="pod" echo  :::::::::::::::::                THERE ARE OVER 17,000 PODCASTS              ::::::::::::::::::
  115.      if /i "%proggy%"=="rad" echo  :::::::::::::::::         LEAVING THE ANSWER BLANK WILL TAKE SOME TIME       ::::::::::::::::::
  116.      if /i "%proggy%"=="pod" echo  :::::::::::::::::           LEAVING THE ANSWER BLANK WILL TAKE AN AGE        ::::::::::::::::::
  117.      if /i "%proggy%"=="rad" echo  :::::::::::::::::           ALSO THE FULL LIST WILL NOT BE VIEWABLE          ::::::::::::::::::
  118.      if /i "%proggy%"=="pod" echo  :::::::::::::::::            ALSO THE FULL LIST WILL NOT BE VIEWABLE         ::::::::::::::::::
  119.      if /i "%proggy%"=="rad" echo  :::::::::::::::::              SEARCH A CHANNEL IN THE NEXT STEP             ::::::::::::::::::
  120.      if /i "%proggy%"=="pod" echo  :::::::::::::::::               SEARCH A CHANNEL IN THE NEXT STEP            ::::::::::::::::::
  121.                              echo  :::::::::::::::::                                                            ::::::::::::::::::
  122.                             echo  :::::::::::::::::--- --- --- --- --- --- ---^> OR ^<--- --- --- --- --- --- ---::::::::::::::::::
  123.                              echo  :::::::::::::::::                                                            ::::::::::::::::::
  124.                              echo  :::::::::::::::::  1.Enter the title, part of the title or url               ::::::::::::::::::
  125.                            if "%Pap%"=="R" SET thistype=Enter P to search podcasts                              ::::::::::::::::::
  126.                            if "%Pap%"=="P" SET thistype=Enter R to search radio content                         ::::::::::::::::::
  127.     if /i NOT "%type%"=="tv" echo  :::::::::::::::::  2.%thistype%
  128.     if /i NOT "%type%"=="tv" echo  :::::::::::::::::  3.Enter T to search tv                                    ::::::::::::::::::
  129.         if /i "%type%"=="tv" echo  :::::::::::::::::  2.Enter R to search radio                                 ::::::::::::::::::
  130.         if /i "%type%"=="tv" echo  :::::::::::::::::  3.Enter P to search podcasts                              ::::::::::::::::::
  131.              if "%Pap%"=="A" ECHO  :::::::::::::::::  4.Enter PVR to search ^& set pvr recordings                ::::::::::::::::::
  132.              if "%Pap%"=="A" echo  :::::::::::::::::____________________________________________________________::::::::::::::::::
  133.              if "%Pap%"=="A" echo  :::::::::::::::::                                                            ::::::::::::::::::
  134.              if "%Pap%"=="A" ECHO  :::::::::::::::::  5.uSWF to update the SWF url                              ::::::::::::::::::
  135.              if "%Pap%"=="A" ECHO  :::::::::::::::::  6.GetD downloads ^& installs the latest version            ::::::::::::::::::
  136.              if "%Pap%"=="A" echo  :::::::::::::::::  7.GetU updates Get-Iplayer ^(needs admin^)                  ::::::::::::::::::
  137.              if "%Pap%"=="A" echo  :::::::::::::::::  8.Drag folder or enter its path to set download location  ::::::::::::::::::
  138.              if "%Pap%"=="A" echo  :::::::::::::::::  9.GetS Add 'GET-IPLAYER - x86+64.bat' shortcut to desktop ::::::::::::::::::
  139.                              echo  :::::::::::::::::                                                            ::::::::::::::::::
  140.                              echo  :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  141.          if NOT "%Pap%"=="A" ECHO  :::::::::::::::::  4.Enter A for more options                                ::::::::::::::::::
  142.                              echo  :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  143.          if NOT "%Pap%"=="A" echo  :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  144. echo.&echo.&echo.
  145. if "!NewPlace:~1,2!"==":\" ECHO                  Download folder: !NewPlace!
  146. echo.&echo.
  147. if "%forced%"=="--force" set agi= again
  148. if NOT "%forced%"=="--force" set agi=
  149. if /i "%type%"=="tv" SET show=What you wanna watch%agi% on the bbc
  150. if /i "%type%"=="RADIO" SET wma=,wma&set show=Which radio program do you want to search%agi%
  151. if /i "%type%"=="PODCAST" SET show=Which podcast would you like to search%agi%
  152. set Pap=
  153. ECHO                 %show% %USERNAME%?
  154. ECHO.
  155. set /p Pap=:                 
  156. if NOT "!Pap!"=="" set Pap=%Pap:"=%
  157. set whitespace=%Pap%
  158. setlocal enabledelayedexpansion
  159. call :whitespac
  160. set Pap=%whitespace%
  161. goto :whitespaceGONE
  162. :::::::::::::::Remove leading & trailing whitespace:::::::::::::dS
  163. :whitespac
  164. for /f "tokens=* delims= " %%a in ("%whitespace%") do set whitespace=%%a
  165. for /l %%a in (1,1,40) do if "!whitespace:~-1!"==" " set whitespace=!whitespace:~0,-1!
  166. goto :eof
  167. :::::::::::::::Remove leading & trailing whitespace:::::::::::::dE
  168. :whitespaceGONE
  169. if "!Pap!"=="" mode con lines=9999 cols=201&TITLE Full List Search&goto :hghg
  170. ::if "!Pap!"=="piD" SET dip=--fields=pid&goto :raddypodcst
  171. if "!Pap:~0,4!"=="http" SET DPLACE=from url&SET http=!Pap!&GOTO :HTTPPn
  172. SET Pap=%Pap:"=%
  173. if "!Pap!"=="PVR" echo                      %Pap% IS UNFINISHED&timeout /T 9 >nul&goto :raddypodcst
  174. if "!Pap!"=="R" SET type=RADIO&SET proggy=rad&goto :raddypodcst
  175. if "!Pap!"=="P" SET type=PODCAST&SET proggy=pod&goto :raddypodcst
  176. if "!Pap!"=="T" SET type=TV&SET proggy=&goto :raddypodcst
  177. if "!Pap!"=="A" SET A=NIMDA&goto :raddypodcst
  178. if /i "!Pap!"=="UsWF" GOTO :UPDATEGETSWF
  179. if /i "!Pap!"=="GetU" GOTO :UPDATEGET
  180. if /i "!Pap!"=="GetD" GOTO :DOWNLOADGET
  181. if /i "!Pap!"=="GetS" GOTO :install
  182. if exist "!Pap!" (2>nul pushd "!Pap!" && (popd&SET "NewPlace=!Pap!"&SET "!Pap!= "&GOTO :raddypodcst) || SET "!Pap!= "&GOTO :raddypodcst) else TITLE Will search for "!Pap!"
  183. if /i "!NewPlace:~1,2!"==":\" goto :herelass
  184. goto :hghg
  185. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::HTTPPn
  186. :HTTPPn
  187. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::gatahtt
  188. :gatahtt
  189. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  190. @if not exist "R:\GET-IPLAYER.txt" GOTO :HTTPP
  191. @echo.&echo.
  192. set FPLACE=
  193. set /p FPLACE=:                 Do you want it on PC or USB?
  194. set whitespace=%FPLACE%
  195. setlocal enabledelayedexpansion
  196. call :whitespac
  197. set FPLACE=%whitespace%
  198. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  199. ::::::::::::::::Asks If You Want To Download To USB If R:/GET-IPLAYER.txt Exists::::::::::::::::::::
  200. ::::::::::::::::                                                                ::::::::::::::::::::
  201. ::::::::::::::::  Assign a USB drive the letter R and create a text file named  ::::::::::::::::::::
  202. ::::::::::::::::         GET-IPLAYER in the ROOT Folder For This To Work        ::::::::::::::::::::
  203. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  204. echo.
  205. cls
  206. echo.
  207. echo.
  208. if /i "%FPLACE%"=="" goto :gatahtt
  209. if /i "%FPLACE:~0,1%"=="p" SET FPLACE=pc&goto :HTTPP
  210. if /i "%FPLACE:~0,1%"=="u" SET FPLACE=usb&goto :HTTPP
  211. if /i not "%FPLACE:~0,1%"=="p" goto :gatahtt
  212. if /i not "%FPLACE:~0,1%"=="u" goto :gatahtt
  213. goto :HTTPP
  214. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::herelass
  215. :herelass
  216. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::hghg
  217. :hghg
  218. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  219. if /i NOT "!Pap!"=="" GOTO :excatB
  220. TITLE Full List Search - Search Channel?
  221. echo.&echo.&echo.
  222. set onlycha=
  223. set /p onlycha=:               Would You like to search a channel? Y/N
  224. set whitespace=%onlycha%
  225. setlocal enabledelayedexpansion
  226. call :whitespac
  227. set onlycha=%whitespace%
  228. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  229. ::::::::::::::::Leave The Above "What You Wanna Search" Blank & This Question Occurs:::::::::::::::
  230. ::::::::::::::::                                                                    :::::::::::::::
  231. ::::::::::::::::  Asks You if You Want To Search Just One Channel Then Lists Them   :::::::::::::::
  232. ::::::::::::::::                                                                    :::::::::::::::
  233. ::::::::::::::::           Leave Blank & Press Enter To Skip This Step              :::::::::::::::
  234. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  235. if /i NOT "%onlycha%"=="Y" goto :inCh
  236. C: & cd "\Program Files%TBIT%\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer --list=channel --type=%type%
  237. echo.&echo.&echo.
  238. set /p chch=:                    Which Channel?
  239. if /i "%chch%"=="" SET chch=
  240. set whitespace=%chch%
  241. setlocal enabledelayedexpansion
  242. call :whitespac
  243. set chch=%whitespace%
  244. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::inCh
  245. :inCh
  246. :::::::::::::::(u):::::::::::::::S
  247. goto :excatB
  248. :::::::::::::::(u):::::::::::::::E
  249. cls
  250. TITLE Full List Search - Include Catagory?
  251. echo.&echo.&echo.
  252. set onlycat=
  253. set /p onlycat=:               Would You like to search a catagory? Y/N
  254. set whitespace=%onlycat%
  255. setlocal enabledelayedexpansion
  256. call :whitespac
  257. set onlycat=%whitespace%
  258. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  259. ::::::::::::::::Leave The Above "What You Wanna Search" Blank & This Question Occurs:::::::::::::::
  260. ::::::::::::::::                                                                    :::::::::::::::
  261. ::::::::::::::::  Asks You if You Want To Search Just One Catagory Then Lists Them  :::::::::::::::
  262. ::::::::::::::::                                                                    :::::::::::::::
  263. ::::::::::::::::           Leave Blank & Press Enter To Skip This Step              :::::::::::::::
  264. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  265. if /i NOT "%onlycat%"=="Y" goto :excatC
  266. SET kkkk=--category
  267. C: & cd "\Program Files%TBIT%\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer --list=categories --type=%type%
  268. echo.&echo.&echo.
  269. set /p tttt=:                    Which Catagory?
  270. if NOT "!tttt!"=="" set tttt=%tttt:&=%
  271. set whitespace=%tttt%
  272. setlocal enabledelayedexpansion
  273. call :whitespac
  274. set tttt=%whitespace%
  275. if /i "%tttt%"=="" SET tttt=
  276. if /i "%tttt%"=="" SET nnnn=
  277. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::excatC
  278. :excatC
  279. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  280. cls
  281. TITLE Full List Search - Exclude Catagory?
  282. echo.&echo.&echo.
  283. if /i "!Pap!"=="" set /p excat=:                     Exclude Catagory From Listing? Y/N
  284. set whitespace=%excat%
  285. setlocal enabledelayedexpansion
  286. call :whitespac
  287. set excat=%whitespace%
  288. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  289. :::::::::::::Leave The Above "What You Wanna Search" Blank & This Question Occurs Too::::::::::::::
  290. :::::::::::::                                                                        ::::::::::::::
  291. :::::::::::::     Asks You if You Want To Exclude Just One Catagory From The List    ::::::::::::::
  292. :::::::::::::                                                                        ::::::::::::::
  293. :::::::::::::              Leave Blank & Press Enter To Skip This Step               ::::::::::::::
  294. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  295. if /i NOT "%excat%"=="Y" goto :excatB
  296. SET nnnn=--exclude-category
  297. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::excatBAB
  298. :excatBAB
  299. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  300. C: & cd "\Program Files%TBIT%\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer --list=categories --type=%type%
  301. echo.&echo.&echo.
  302. set /p excatchoice=:                     Which Catagory?
  303. if NOT "!excatchoice!"=="" set excatchoice=%excatchoice:&=%
  304. set whitespace=%excatchoice%
  305. setlocal enabledelayedexpansion
  306. call :whitespac
  307. set excatchoice=%whitespace%
  308. if /i "%excatchoice%"=="" SET excatchoice=
  309. if /i "%excatchoice%"=="" SET nnnn=
  310. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::excatB
  311. :excatB
  312. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  313. cls
  314. echo.
  315. echo.
  316. echo.
  317. TITLE Name Download Folder
  318. ::if /i "!Pap!"=="" goto :flchoice
  319. echo                      What Do You Want To Name The Download Folder?
  320. echo.
  321. set DPLACE=
  322. set /p DPLACE=:          
  323.  
  324. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::--------------------
  325. if NOT "!DPLACE!"=="" set DPLACE=%DPLACE:&=%
  326. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::--------------------
  327.  
  328. set whitespace=%DPLACE%
  329. setlocal enabledelayedexpansion
  330. call :whitespac
  331. set DPLACE=%whitespace%
  332. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  333. :::::::::::::::::::::::Asks You What You Want To Name The Download Directory:::::::::::::::::::::::
  334. ::::::::::::::::::::::                                                       ::::::::::::::::::::::
  335. ::::::::::::::::::::::  LEAVE BLANK & PRESS ENTER. IT WILL USE 1 OF 3 NAMES  ::::::::::::::::::::::
  336. ::::::::::::::::::::::                                                       ::::::::::::::::::::::
  337. ::::::::::::::::::::::1.Program title searched                               ::::::::::::::::::::::
  338. ::::::::::::::::::::::2.Program list number(s)                               ::::::::::::::::::::::
  339. ::::::::::::::::::::::3.Program pid code(s)                                  ::::::::::::::::::::::
  340. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::flchoice
  341. :flchoice
  342. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  343. echo.
  344. echo                                            ....
  345. echo                                        ____________
  346. echo                                    ____________________
  347. echo                                        ____________
  348. echo                                            ....
  349. echo.
  350. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::gataht
  351. :gataht
  352. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  353. @if not exist "R:\GET-IPLAYER.txt" GOTO :herelas
  354. set FPLACE=
  355. set /p FPLACE=:                 Do You Want It On PC or USB?
  356. set whitespace=%FPLACE%
  357. setlocal enabledelayedexpansion
  358. call :whitespac
  359. set FPLACE=%whitespace%
  360. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  361. ::::::::::::::::Asks If You Want To Download To USB If R:/GET-IPLAYER.txt Exists::::::::::::::::::::
  362. ::::::::::::::::                                                                ::::::::::::::::::::
  363. ::::::::::::::::  Assign a USB drive the letter R and create a text file named  ::::::::::::::::::::
  364. ::::::::::::::::         GET-IPLAYER in the ROOT Folder For This To Work        ::::::::::::::::::::
  365. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  366. Secho.
  367. cls
  368. echo.
  369. echo.
  370. if /i "%FPLACE%"=="" goto :gataht
  371. if /i "%FPLACE:~0,1%"=="p" SET FPLACE=pc&goto :herelas
  372. if /i "%FPLACE:~0,1%"=="u" SET FPLACE=usb&goto :herelas
  373. if /i not "%FPLACE:~0,1%"=="p" goto :gataht
  374. if /i not "%FPLACE:~0,1%"=="u" goto :gataht
  375. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::herelas
  376. :herelas
  377. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  378. echo                                            ....
  379. echo                                        ____________
  380. echo                                    ____________________
  381. echo                                        ____________
  382. echo                                            ....
  383. echo.
  384. @if not exist "R:\GET-IPLAYER.txt" echo    "!Pap!" Will Be Downloaded To "C:\downloads\media\%DPLACE%" Then Moved To "%userprofile%\desktop\Get-IPlayer\%Type%\%DPLACE%"
  385. @if not exist "R:\GET-IPLAYER.txt" goto :gooo
  386. @if /i "%FPLACE%"=="pc" echo    "!Pap!" Will Be Downloaded To "C:\downloads\media\%DPLACE%" Then Moved To "%userprofile%\desktop\Get-IPlayer\%Type%\%DPLACE%"
  387. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::gooo
  388. :gooo
  389. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  390. @if "%FPLACE%"=="usb" echo                "!Pap!" Will Be Downloaded To "C:\downloads\media\%DPLACE%" Then Moved To "R:\%Type%\%DPLACE%"
  391. timeout /T 1 >nul
  392. echo.
  393. echo                                            ....
  394. echo                                        ____________
  395. echo                                    ____________________
  396. echo                                        ____________
  397. echo                                            ....
  398. echo                                            ....
  399. echo                                        ____________
  400. echo                                    ____________________
  401. echo                                        ____________
  402. echo                                            ....
  403. echo.
  404. echo                       Searching "!Pap!"
  405. echo.
  406. echo                                            ....
  407. echo                                        ____________
  408. echo                                    ____________________
  409. echo                                        ____________
  410. echo                                            ....
  411. echo.
  412. :inputrefresh
  413. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  414. if /i "!Pap!"=="" CLS
  415. title Searching "!Pap!"
  416. set wanted=
  417. if /i "%onlycat%"=="Y" set wanted=INCLUDING %tttt%
  418. set notwanted=
  419. if /i "%excat%"=="Y" set notwanted=EXCLUDING %excatchoice%
  420. set thischan=
  421. set onon=
  422. if /i "%onlycha%"=="Y" set onon=ON CHANNEL &set thischan=--CHANNEL="%chch%"
  423. if /i "!Pap!"=="" TITLE FULL LIST OF %type% PROGRAMS %wanted% %notwanted% %onon%%chch%
  424. if "%earh%"=="Rget" TITLE REFRESHING THE FULL LIST OF %type% PROGRAMS %wanted% %notwanted%%onon%%chch%
  425. if "!dip!"=="--fields=pid" TITLE REFRESHING %type% PROGRAMS %wanted% %notwanted%%onon%%chch% WITH PID, NAME, SERIES ^& EPISODE
  426. if /i "!Pap!"=="" color 06
  427. :::::::::::::::(k):::::::::::::::S
  428. if /i not "%Pap%"=="" mode con lines=260
  429. :::::::::::::::(k):::::::::::::::E
  430. if "%type%"=="TV" mode con lines=9999 cols=201
  431. if "%type%"=="RADIO" mode con lines=9999 cols=201
  432. if "%type%"=="PODCAST" mode con lines=9999 cols=201
  433. :inputrefreshB
  434. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  435. if "!dip!"=="--fields=pid" C: & cd "\Program Files%TBIT%\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer --listformat="<pid>: <name>-<episode>" %thischan% %kkkk%=%tttt% %nnnn%=%excatchoice% --refresh %hide% --type=%type% "!Pap!" &goto :nopiD
  436. C: & cd "\Program Files%TBIT%\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer %thischan% %kkkk%=%tttt% %nnnn%=%excatchoice% --refresh %hide% --type=%type% "!Pap!"
  437. :nopiD
  438. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  439. ::::::::::::::::::::Sets The Catagories You May Have Chosen To Include/Exclude:::::::::::::::::::::
  440. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  441. if "!Pap!"=="" TITLE Finished Updating %type% Index %onon%%chch%
  442. if not "!Pap!"=="" TITLE Finished Searching "!Pap!"
  443. echo.&echo.
  444. ECHO                     TO RESTART LEAVE BLANK ^& PRESS "ENTER"
  445. ::(P)S
  446. if "!hide!"=="--hide"    set adviceC= history is off enter Hget to switch on
  447. if "!hide!"==""    set adviceC= history is on enter Hgot to switch off
  448. ::(P)E
  449. echo                             %adviceC%
  450. echo.
  451. @if "%FORCED%"=="--force" COLOR 4e
  452. @if "%FORCED%"=="--force" ECHO         _______________________________________________________________________________
  453. @if "%FORCED%"=="--force" ECHO     ************** REMEMBER YOU HAVE SET TO FORCE THE DOWNLOAD! **************
  454. @if "%FORCED%"=="--force" ECHO     USE THE PROGRAMS "CODE" UNLESS YOU WISH TO DOWNLOAD EVERY MATCHING RESULT!
  455. @if "%FORCED%"=="--force" ECHO         _______________________________________________________________________________
  456. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  457. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  458. :::::::::::::::::::: When Forcing A Download The Above Message Will Appear To :::::::::::::::::::::
  459. :::::::::::::::::::: Remind You That Anything Matching What You Enter Will Be :::::::::::::::::::::
  460. ::::::::::::::::::::Downloaded Regardless Of It Being In The Recording History:::::::::::::::::::::
  461. ::::::::::::::::::::                                                          :::::::::::::::::::::
  462. ::::::::::::::::::::         Using The Programs Code Is Recommended           :::::::::::::::::::::
  463. ::::::::::::::::::::                                                          :::::::::::::::::::::
  464. ::::::::::::::::::::    Get-IPlayers Recording History Stops Programs From    :::::::::::::::::::::
  465. ::::::::::::::::::::           Being Accidentially Downloaded Again           :::::::::::::::::::::
  466. :::::::::::::::::::: Try To Download A Program Downloaded Before It Will Fail :::::::::::::::::::::
  467. ::::::::::::::::::::      Then Ask You If You Want To Force The Download      :::::::::::::::::::::
  468. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  469. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  470. SET advice=Use spaces between codes&SET adviceB=465 768 969 12 7 970 989&echo.&if not "!dip!"=="--fields=pid" echo                                    DOWNLOADING MANY PROGRAMS^?&echo                                       Enter piD for codes&echo.
  471. if "!dip!"=="--fields=pid" SET advice= use space between PIDS&echo.&echo                                    ENTER nuM TO REVERT BACK&SET adviceB=^?^?^?^?bk6t ^?^?^?^?bhq3&SET !earh!="!earh!"
  472. echo.
  473. echo                                    %advice%
  474. echo                                    %adviceB%
  475. echo.
  476. echo.&echo.
  477. if not "!dip!"=="--fields=pid" echo                                     ENTER CODE(S) OR TITLE&echo.
  478. set earh=
  479. set /p earh=:                                
  480. :::::::::::::::Remove leading & trailing whitespace:::::::::::::dS
  481. set whitespace=%earh%
  482. setlocal enabledelayedexpansion
  483. call :whitespac
  484. set earh=%whitespace%
  485. :::::::::::::::Remove leading & trailing whitespace:::::::::::::dE
  486. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  487. :::::::::::::::::::Asks You Which Program You Want To Download From The Results::::::::::::::::::::
  488. :::::::::::::::::::                                                            ::::::::::::::::::::
  489. :::::::::::::::::::1.Leave Blank To Go Back To Start                           ::::::::::::::::::::
  490. :::::::::::::::::::2.Enter Program Code To Download Just One Match             ::::::::::::::::::::
  491. :::::::::::::::::::3.Use A Space Between Each Programs code                    ::::::::::::::::::::
  492. :::::::::::::::::::4.Enter Program Title To Download All Matches               ::::::::::::::::::::
  493. :::::::::::::::::::5.Enter "Rget" to refresh the list                          ::::::::::::::::::::
  494. :::::::::::::::::::6.Enter "piD" to refresh the list with PID codes            ::::::::::::::::::::
  495. :::::::::::::::::::7.Enter "nuM" to revert from PID back to numbers list       ::::::::::::::::::::
  496. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  497. if /i "!earh!"=="" goto :beforestart
  498. if "!earh!"=="uSb"SET FPLACE=uSb&goto :inputrefresh
  499. if "!earh!"=="pC" SET FPLACE=pc&goto :inputrefresh
  500. ::(P) S
  501. if "!earh!"=="Hget" CLS&SET hide=&goto :inputrefresh
  502. if "!earh!"=="Hgot" CLS&SET hide=--hide&goto :inputrefresh
  503. ::(P) E
  504. if "!earh!"=="Rget" CLS&goto :inputrefresh
  505. if "!earh!"=="piD" CLS&SET dip=--fields=pid&goto :inputrefresh
  506. if "!earh!"=="nuM" CLS&SET dip=&SET "!earh!"=!earh!&goto :inputrefresh
  507. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  508. :::::::::::::::::::Delete the character string ' ' from %earh% so can determine if only numbers::::
  509. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  510. SET NOspaces=%earh: =%
  511. echo %NOspaces%|findstr /r "[^0-9]" > nul
  512. if errorlevel 1 set tttt=\%tttt%&goto :passnumcheck
  513. if "!dip!"=="--fields=pid" goto :passnumcheck
  514. if not errorlevel 1 SET earh="%earh%"&set tttt=
  515. :passnumcheck
  516. if /i "%tttt%"=="\" SET tttt=
  517. color 0e
  518. echo.&echo.
  519. echo.
  520. if /i NOT "!DPLACE!"=="" GOTO :afternotpap
  521. if "!DPLACE!"=="" SET DPLACE=%earh:"=%
  522. if /i NOT "!Pap!"=="" SET DPLACE=%Pap:"=%
  523. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::afternotpap
  524. :afternotpap
  525. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  526. title Downloading Program: %earh%
  527. echo.&echo.
  528. echo                                 Downloading Program %earh%
  529. echo                                   ......................
  530. echo                                      ................
  531. echo                                         ..........
  532. echo                                            ....
  533. echo                                             ..
  534. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::HTTPP
  535. :HTTPP
  536. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  537. :::::::::::::::(i):::::::::::::::S
  538. @if exist "C:\downloads\media\%type%%tttt%\%DPLACE%\*.partial.*" del "C:\downloads\media\%type%%tttt%\%DPLACE%\*.partial.*"
  539. :::::::::::::::(i):::::::::::::::E
  540. @if exist "C:\downloads\media\%type%%tttt%\%DPLACE%\*.flv*"      del "C:\downloads\media\%type%%tttt%\%DPLACE%\*.flv*"
  541. echo                                            ....
  542. echo.                                        _________
  543. echo                                      _______________
  544. echo                                         _________
  545. echo                                            ____
  546. echo                                             ..
  547. echo                                             ..
  548. :dodown
  549. :::::::::::::::(l):::::::::::::::S
  550. if NOT "!dip!"=="--fields=pid" mode con lines=50
  551. :::::::::::::::(l):::::::::::::::E
  552. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::                                    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  553. :::::::::::::::::OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:::::::::::::::::::
  554. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::                                    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  555. C: & cd "\Program Files%TBIT%\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer %http% %hide% --type=%type% %dip% %earh% %FORCED% --get --mode=best%wma% --whitespace --output="\downloads\media\%type%%tttt%\%DPLACE%"
  556. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::                                    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  557. :::::::::::::::::OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:::::::::::::::::::
  558. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::                                    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  559. :yeshitp
  560. ::if /i not "%type%"=="tv" echo                                       A Little Time.. Some issue here
  561. if /i not "%type%"=="tv" timeout /T 2 >nul
  562. @IF EXIST "C:\downloads\media\%type%%tttt%\%DPLACE%" for /F %%N in ('dir /S/B "C:\downloads\media\%type%%tttt%\%DPLACE%" ^| find /V /C "::"') do (if %%N EQU 0 rd "C:\downloads\media\%type%%tttt%\%DPLACE%")
  563. @IF EXIST "C:\downloads\media\%type%%tttt%" for /F %%N in ('dir /S/B "C:\downloads\media\%type%%tttt%" ^| find /V /C "::"') do (if %%N EQU 0 rd "C:\downloads\media\%type%%tttt%")
  564. @IF EXIST "C:\downloads\media\%type%" for /F %%N in ('dir /S/B "C:\downloads\media\%type%" ^| find /V /C "::"') do (if %%N EQU 0 rd "C:\downloads\media\%type%")
  565. @if NOT exist "C:\downloads\media\%type%%tttt%\%DPLACE%" GOTO :PANTS
  566. echo                                             ..
  567. echo                                             ..
  568. @if NOT exist "C:\downloads\media\%type%%tttt%\%DPLACE%\*.partial.*" SET skipSD=
  569. :::::::::::::::(i):::::::::::::::S
  570.     @if exist "C:\downloads\media\%type%%tttt%\%DPLACE%\*.partial.*" SET skipSD=dontdown&del "C:\downloads\media\%type%%tttt%\%DPLACE%\*.partial.*"&goto :dodown
  571. :::::::::::::::(i):::::::::::::::E
  572.     @if exist "C:\downloads\media\%type%%tttt%\%DPLACE%\*.flv*"      SET skipSD=dontdown&del "C:\downloads\media\%type%%tttt%\%DPLACE%\*.flv*"     &goto :dodown
  573. echo                                             ..
  574. echo                                             ..
  575. echo                                             ..
  576. if /i "%FPLACE%"=="usb" goto :instood
  577. if not exist "!NewPlace!" goto :nonewplace
  578. if /i "!NewPlace:~1,2!"==":\" %SystemRoot%\System32\robocopy "C:\downloads\media\%type%%tttt%\%DPLACE%" "!NewPlace!\%type%%tttt%\%DPLACE%" /MOVE /V /R:5 /W:10 /ETA & GOTO :instaed
  579. :nonewplace
  580. @IF NOT EXIST "%userprofile%\desktop\Get-IPlayer" MD "%userprofile%\desktop\Get-IPlayer\%type%%tttt%\%DPLACE%"
  581. :::::::::::::::(j):::::::::::::::S
  582. if exist "C:\downloads\media\%type%%tttt%\%DPLACE%" %SystemRoot%\System32\robocopy "C:\downloads\media\%type%%tttt%\%DPLACE%" "%userprofile%\desktop\Get-IPlayer\%type%%tttt%\%DPLACE%" /MOVE /V /R:5 /W:10 /ETA
  583. :::::::::::::::(j):::::::::::::::E
  584. if /i NOT "%FPLACE%"=="usb" goto :instaed
  585. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::instood
  586. :instood
  587. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  588. if exist "C:\downloads\media\%type%%tttt%\%DPLACE%" %SystemRoot%\System32\robocopy "C:\downloads\media\%type%%tttt%\%DPLACE%" "R:\%type%%tttt%\%DPLACE%" /MOVE /V /R:5 /W:10 /ETA
  589. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::instaed
  590. :instaed
  591. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  592. echo                                             ..
  593. if "%skipSD%"=="dontdown" goto :dodown
  594. @IF EXIST "C:\downloads\media\%type%%tttt%" for /F %%N in ('dir /S/B "C:\downloads\media\%type%%tttt%" ^| find /V /C "::"') do (if %%N EQU 0 rd "C:\downloads\media\%type%%tttt%")
  595. @IF EXIST "C:\downloads\media\%type%" for /F %%N in ('dir /S/B "C:\downloads\media\%type%" ^| find /V /C "::"') do (if %%N EQU 0 rd "C:\downloads\media\%type%")
  596. mode con cols=37
  597. mode con lines=8
  598. @color 0a
  599. echo.&echo.&echo.
  600. echo           "!Pap!" Downloaded
  601. echo.&echo.&echo.
  602. mode con cols=70
  603. mode con lines=8
  604. @color 0e
  605. goto :here9
  606. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::again
  607. :again
  608. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  609. @color 0c
  610. cls
  611. echo.&echo.&echo.
  612. echo                         Invalid Choice!
  613. timeout /T 1 >nul
  614. cls
  615. @color 0e
  616. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::here9
  617. :here9
  618. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  619. CLS
  620. TITLE Finished Downloading !pap!
  621. echo.&echo.&echo.
  622. set doyou=
  623. set /p doyou=%username% would you like to download something else?
  624. set whitespace=%doyou%
  625. setlocal enabledelayedexpansion
  626. call :whitespac
  627. set doyou=%whitespace%
  628. if /i "%doyou%"=="" goto :beforestart
  629. if /i "%doyou:~0,1%"=="y" goto :beforestart
  630. if /i "%doyou:~0,1%"=="n" goto :noagain
  631. if /i not "%doyou:~0,1%"=="y" goto :again
  632. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::noagain
  633. :noagain
  634. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  635. cls
  636. echo.&echo.&echo.
  637. echo                               FIN!
  638. timeout /T 3 >nul
  639. DEL "%temp%\dow.txt" /q
  640. endlocal
  641. exit
  642. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::PANTS
  643. :PANTS
  644. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  645. :::::::::::::::::           Asks If You Want To Force The Download           ::::::::::::::::::::::
  646. :::::::::::::::::                                                            ::::::::::::::::::::::
  647. :::::::::::::::::Type Quit, Exit or End To Close The Get-IPlayer Batch Window::::::::::::::::::::::
  648. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  649. @color 0c
  650. :wrongentry
  651. mode con cols=140
  652. mode con lines=20
  653. title DOWNLOAD FAILED!
  654. echo.&echo.&echo.
  655. echo                                 Failed To Download "%earh:"=%"
  656. echo.&echo.
  657. echo                            You Will Need To Force Download "%earh:"=%"
  658. echo.
  659. echo                            n=continue
  660. echo                            y=force download
  661. ::(P): S
  662. if "%hide%"=="" echo                            h=hide recording history
  663. if "%hide%"=="--hide" echo                              s=show recording history
  664. ::(P): E
  665. echo                            e=exit
  666. set doyouneed=
  667. set /p doyouneed=:                             
  668. set whitespace=%doyouneed%
  669. setlocal enabledelayedexpansion
  670. call :whitespac
  671. set doyouneed=%whitespace%
  672. if /i "%doyouneed%"=="" GOTO wrongentry
  673. if /i "%doyouneed:~0,1%"=="n" SET FORCED=
  674. if /i "%doyouneed:~0,1%"=="n" IF EXIST "%userprofile%\desktop\Get-IPlayer" for /F %%N in ('dir /S/B "%userprofile%\desktop\Get-IPlayer" ^| find /V /C "::"') do (if %%N EQU 0 rd "%userprofile%\desktop\Get-IPlayer")
  675. ::(P): S
  676. if /i "%doyouneed:~0,1%"=="h" set hide=--hide&GOTO :wrongentry
  677. if /i "%doyouneed:~0,1%"=="s" set hide=&GOTO :wrongentry
  678. ::(P): E
  679. if /i "%doyouneed:~0,1%"=="E" GOTO :CLEANUP
  680. if /i "%doyouneed:~0,1%"=="Y" SET FORCED=--force
  681. echo.&echo.
  682. GOTO NOcleanup
  683. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::CLEANUP
  684. :CLEANUP
  685. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  686. @IF EXIST "%userprofile%\desktop\Get-IPlayer" for /F %%N in ('dir /S/B "%userprofile%\desktop\Get-IPlayer" ^| find /V /C "::"') do (if %%N EQU 0 rd "%userprofile%\desktop\Get-IPlayer")
  687. @IF EXIST "R:\%type%\%DPLACE%\" RD "R:\%type%\%DPLACE%\"
  688. @IF EXIST "R:\%type%\%DPLACE%\" RD "R:\%type%\%DPLACE%\"
  689. DEL "%temp%\dow.txt" /q
  690. EXIT
  691. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::NOcleanup
  692. :NOcleanup
  693. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  694. ::timeout /T 1 >nul
  695. @color 0e
  696. mode con cols=37
  697. mode con lines=8
  698. @if "%FORCED%"=="--force" mode con lines=10
  699. title RETRY
  700. @if "%FORCED%"=="--force" TITLE FORCED RETRY
  701. echo.&echo.&echo.
  702. echo              RESTARTING
  703. @if "%FORCED%"=="--force" ECHO.
  704. ::(o): S
  705. @if "%FORCED%"=="--force" ECHO            IN FORCED MODE&GOTO :inputrefresh
  706. ::(o): E
  707. SET DPLACE=
  708. SET earh=
  709. SET nnnn=
  710. SET excatchoice=
  711. SET notwanted=
  712. SET onlycat=
  713. SET excat=
  714. SET tttt=
  715. SET kkkk=
  716. set chch=
  717. set onon=
  718. set thischan=
  719. set type=TV
  720. SET proggy=
  721. SET dip=
  722. echo.&echo.&echo.
  723. timeout /T 2 >nul
  724. if "%TBIT%"==" (x86)" goto :skipp
  725. GOTO :START
  726. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::beforestart
  727. :beforestart
  728. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  729. @if not "%FORCED%"=="--force" goto :NOcleanup
  730. mode con cols=70
  731. mode con lines=8
  732. @color 0e
  733. echo.&echo.&echo.
  734. @if "%FORCED%"=="--force" TITLE TURN FORCED DOWNLOADING OFF?&set /p doyouneedAGAIN=TURN FORCED DOWNLOADING OFF Y/N?
  735. set whitespace=%doyouneedAGAIN%
  736. setlocal enabledelayedexpansion
  737. call :whitespac
  738. set doyouneedAGAIN=%whitespace%
  739.     if /i "%doyouneedAGAIN%"=="" GOTO :beforestart
  740.     if /i "%doyouneedAGAIN:~0,1%"=="n" GOTO :NOcleanup
  741.     if /i "%doyouneedAGAIN:~0,1%"=="y" SET FORCED=
  742.     if /i "%doyouneedAGAIN:~0,1%"=="y" GOTO :NOcleanup
  743. if /i not "%doyouneedAGAIN:~0,1%"=="y" goto :beforestart
  744. if /i not "%doyouneedAGAIN:~0,1%"=="n" goto :beforestart
  745. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  746. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  747. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  748. :::::::::::::::::::======================================================::::::::::::::::::::::::::
  749. :::::::::::::::::::    This Batch File Is To Be Used With Get-IPlayer    ::::::::::::::::::::::::::
  750. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  751. :::::::::::::::::::                  By Terence Hamill                   ::::::::::::::::::::::::::
  752. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  753. :::::::::::::::::::Get-IPlayer Downloads Streams From The IPlayer Website::::::::::::::::::::::::::
  754. :::::::::::::::::::======================================================::::::::::::::::::::::::::
  755. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  756. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  757. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  758. :::::::::::::::::::======================================================::::::::::::::::::::::::::
  759. :::::::::::::::::::        Get-IPlayer Was Written By Phil Lewis         ::::::::::::::::::::::::::
  760. :::::::::::::::::::======================================================::::::::::::::::::::::::::
  761. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  762. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  763. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  764. :::::::::::::::::::       Get-IPlayer Has Much More Functionality        ::::::::::::::::::::::::::
  765. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  766. :::::::::::::::::::   Select Get-IPlayer From Programs To Learn More     ::::::::::::::::::::::::::
  767. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  768. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  769. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  770. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  771. :::::::::::::::::::         I Wrote This Batch File For A Friend         ::::::::::::::::::::::::::
  772. :::::::::::::::::::          Who Was Not Up For Editing Scripts          ::::::::::::::::::::::::::
  773. :::::::::::::::::::           Some Is Copy Pasted So Could Be            ::::::::::::::::::::::::::
  774. :::::::::::::::::::               Cleaned Up A Great Deal                ::::::::::::::::::::::::::
  775. :::::::::::::::::::                                                      ::::::::::::::::::::::::::
  776. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  777. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  778. :::::::::::::::::::   A nice ghetto batch file I've written for You to   ::::::::::::::::::::::::::
  779. :::::::::::::::::::       make use of and the first bit of Batch         ::::::::::::::::::::::::::
  780. :::::::::::::::::::      I have written besides Robocopy commands        ::::::::::::::::::::::::::
  781. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  782. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::DOWNLOADGET
  783. :DOWNLOADGET
  784. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  785. :::::::::::::::Asks You if You Want To Download get-iplayer.exe From Infradead.org            :::::
  786. :::::::::::::::                                                                               :::::
  787. :::::::::::::::1.Download The exe                                                             :::::
  788. :::::::::::::::2.Install get-iplayer                                                          :::::
  789. :::::::::::::::3.Now This Batch File Can Be Used To Download Programs From The IPlayer Website:::::
  790. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  791. CLS
  792. echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
  793. set IPlay=
  794. set /p IPlay=:                 Would You Like To Download ^& Install Get-IPlayer %username% Y or N?
  795. set whitespace=%IPlay%
  796. setlocal enabledelayedexpansion
  797. call :whitespac
  798. set IPlay=%whitespace%
  799. if /i "%IPlay%"=="" GOTO :DOWNfailLOADGET
  800. if exist "C:\Users\terence\Desktop\GET-IPLAYER.txt" echo.&echo.&echo.&echo.&echo               Please read GET-IPLAYER.txt file in&echo.&echo              %CD%
  801. echo.&echo.&echo.&echo.
  802. if /i "%IPlay:~0,1%"=="Y" echo                 Press any key to continue get-iplayer download
  803. if /i "%IPlay:~0,1%"=="Y" pause>nul&if not exist "C:\Program Files%TBIT%\get_iplayer\Uninst.exe" echo You can have files downloaded to a usb device when completed>GET-IPLAYER.txt&ECHO Put this file in the root folder of usb drive (R:)>>GET-IPLAYER.txt&echo Enables GET-IPLAYER.bat to check if the usb drive is plugged in.>>GET-IPLAYER.txt&ECHO.>>GET-IPLAYER.txt&echo.>>GET-IPLAYER.txt&ECHO You can go on ^& install get-iplayer now :)>>GET-IPLAYER.txt
  804. if /i "%IPlay:~0,1%"=="Y" TITLE DOWNLOADING GET-IPLAYER&bitsadmin.exe /transfer "Downloading" http://www.infradead.org/get_iplayer_win/get_iplayer_setup_latest.exe %userprofile%\Desktop\get_iplayer_setup_latest.exe
  805. echo.&echo.&echo.
  806. if /i "%IPlay:~0,1%"=="Y" ECHO:                Installing get_iplayer_setup_latest.exe
  807. echo.&echo.&echo.
  808. if /i "%IPlay:~0,1%"=="N" if exist "%userprofile%\desktop\get_iplayer_setup_latest.exe" del "%userprofile%\desktop\get_iplayer_setup_latest.exe"&goto start
  809. if /i "%IPlay:~0,1%"=="N" if not exist "C:\Program Files%TBIT%\get_iplayer\Uninst.exe" EXIT
  810. if /i "%IPlay:~0,1%"=="N" if exist "C:\Program Files%TBIT%\get_iplayer\Uninst.exe" goto start                   pause
  811. if /i "%IPlay:~0,1%"=="Y" goto install
  812. :DOWNfailLOADGET
  813. cls
  814. echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
  815. if /i not "%IPlay:~0,1%"=="N" echo                                                Invalid Choice!
  816. timeout /T 2 >nul
  817. @color 0c
  818. timeout /T 1 >nul
  819. cls
  820. @color 0e
  821. if /i "%IPlay%"=="" GOTO :DOWNLOADGET
  822. if /i not "%IPlay%"=="N" goto :DOWNLOADGET
  823. :install
  824. ::(t): S
  825. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  826. :::::::::::::::                      Add Shortcut To Desktop                        :::::::::::::::
  827. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  828. set   SCRIPT="%TEMP%\%RANDOM%-%RANDOM%.vbs"
  829.    echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
  830. echo sLinkFile = "%USERPROFILE%\Desktop\%~n0.lnk" >> %SCRIPT%
  831. ::echo sLinkFile = "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\get_iplayer\%~n0.lnk" >> %SCRIPT%
  832.          echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
  833.         echo oLink.TargetPath = "%CD%\%~n0.bat" >> %SCRIPT%
  834.                              echo oLink.WindowStyle = 3 >> %SCRIPT%
  835. if exist "%CD%\getiplayer.ico"                                  echo oLink.IconLocation = "%CD%\getiplayer.ico"                                  >> %SCRIPT% &goto :iconDone
  836. if exist "C:\Program Files Portable\get_iplayer\getiplayer.ico" echo oLink.IconLocation = "C:\Program Files Portable\get_iplayer\getiplayer.ico" >> %SCRIPT% &goto :iconDone
  837. if exist "C:\Program Files Portable\icons\large01BBC.ico"       echo oLink.IconLocation = "C:\Program Files Portable\icons\large01BBC.ico"       >> %SCRIPT% &goto :iconDone
  838. if exist "C:\Program Files\get_iplayer\iplayer_logo.ico"        echo oLink.IconLocation = "C:\Program Files\get_iplayer\iplayer_logo.ico"        >> %SCRIPT%
  839. :iconDone
  840. echo oLink.Save >> %SCRIPT%
  841. cscript /nologo %SCRIPT%
  842. del %SCRIPT%
  843. if /i "!Pap!"=="GetS" GOTO :raddypodcst
  844. ::(t): E
  845. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  846. if exist "%userprofile%\desktop\get_iplayer_setup_latest.exe" mode con cols=37&mode con cols=50&mode con lines=12&color F0&TITLE INSTALLING GET-IPLAYER&ECHO.&ECHO.&ECHO.&ECHO                      WAITING&ECHO.&ECHO.&if exist "GET-IPLAYER.txt" ECHO        Please read GET-IPLAYER.txt file in&echo.&echo %CD%
  847. if exist "%userprofile%\desktop\get_iplayer_setup_latest.exe" start /WAIT %userprofile%\desktop\get_iplayer_setup_latest.exe& del get_iplayer_setup_latest.exe&goto start
  848. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::UPDATEGET
  849. :UPDATEGET
  850. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  851. :::::::::::::::               Asks You if You Want To Update get-iplayer.exe                  :::::
  852. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  853. CLS
  854. echo.&echo.&echo.
  855. set UPDATEGET=
  856. set /p UPDATEGET=:                 Would You Like To Update Get-IPlayer %username% Y or N?
  857. set whitespace=%UPDATEGET%
  858. setlocal enabledelayedexpansion
  859. call :whitespac
  860. set UPDATEGET=%whitespace%
  861. if /i "%UPDATEGET%"=="" GOTO :UPDATEGET
  862. echo.&echo.&echo.
  863. if /i "%UPDATEGET:~0,1%"=="Y" TITLE UPDATING GET-IPLAYER&ECHO:                 Updating get-iplayer&C: & cd "\Program Files\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer --update
  864. echo.&echo.&echo.
  865. pause
  866. if /i "%UPDATEGET:~0,1%"=="Y" GOTO START
  867. if /i "%UPDATEGET:~0,1%"=="N" GOTO START
  868. cls
  869. echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
  870. if /i not "%UPDATEGET:~0,1%"=="N" GOTO START
  871. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::UPDATEGETSWF
  872. :UPDATEGETSWF
  873. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  874. :::::::::::::::               Asks You if You Want To Update get-iplayer SWF URL              :::::
  875. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  876. CLS
  877. echo.&echo.&echo.
  878. set UPDATEGETSWF=
  879. set /p UPDATEGETSWF=:              Would You Like To Update The SWF URL %username% Y or N?
  880. set whitespace=%UPDATEGETSWF%
  881. setlocal enabledelayedexpansion
  882. call :whitespac
  883. set UPDATEGETSWF=%whitespace%
  884. if /i "%UPDATEGETSWF%"=="" GOTO :UPDATEGETSWF
  885. if /i "%UPDATEGETSWF:~0,1%"=="N" GOTO START
  886. echo.&echo.&echo.
  887. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::UPDATEURLSWF
  888. :UPDATEURLSWF
  889. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  890. CLS
  891. echo.&echo.&echo.
  892. if /i "%UPDATEGETSWF:~0,1%"=="Y" set /p UPDATEURLSWF=Enter The New SWF URL:  
  893. set whitespace=%UPDATEURLSWF%
  894. setlocal enabledelayedexpansion
  895. call :whitespac
  896. set UPDATEURLSWF=%whitespace%
  897. if /i "%UPDATEURLSWF%"=="" GOTO :UPDATEGETSWF
  898. if /i NOT "%UPDATEURLSWF:~0,4%"=="http" GOTO :UPDATEGETSWF
  899. if /i "%UPDATEURLSWF:~0,4%"=="http" SET httpSWF=UPDATEURLSWF
  900. echo.&echo.&echo.
  901. if /i "%UPDATEGETSWF:~0,1%"=="Y" TITLE DELETING GET-IPLAYER PREFERENCES&ECHO:              Deleting Prefernces&C: & cd "\Program Files%TBIT%\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer --prefs-del --rtmp-tv-opts="X" --rtmp-radio-opts="X"  --rtmp-livetv-opts="X" --rtmp-liveradio-opts="X"
  902. echo.&echo.&echo.
  903. if /i "%UPDATEGETSWF:~0,1%"=="Y" TITLE UPDATING SWF File URL&ECHO:                 Updating SWF File URL&C: & cd "\Program Files\get_iplayer\" & "%Windir%\system32\cmd.exe" /c get_iplayer --prefs-add --rtmp-tv-opts="--swfVfy %httpSWF%"
  904. echo.&echo.&echo.
  905. pause
  906. GOTO START
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement