Advertisement
WannaGet

GETPaP

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