Advertisement
WannaGet

GETPaP

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