Advertisement
Guest User

log file

a guest
May 14th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.86 KB | None | 0 0
  1. [18:55:27] hb_init: starting libhb thread
  2. HandBrake 0.9.9 (2013051800) - Darwin x86_64 - http://handbrake.fr
  3. 8 CPUs detected
  4. Opening /Users/toe/Downloads/Derek - S01E02.mp4...
  5. [18:55:27] hb_scan: path=/Users/toe/Downloads/Derek - S01E02.mp4, title_index=0
  6. libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/toe/Downloads/Derek - S01E02.mp4/BDMV/index.bdmv
  7. libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/toe/Downloads/Derek - S01E02.mp4/BDMV/BACKUP/index.bdmv
  8. libbluray/bluray.c:1725: nav_get_title_list(/Users/toe/Downloads/Derek - S01E02.mp4) failed (0x103009e00)
  9. [18:55:27] bd: not a bd - trying as a stream/file instead
  10. libdvdnav: Using dvdnav version 4.1.3
  11. libdvdread: Encrypted DVD support unavailable.
  12. libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
  13. libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
  14. libdvdread: Can't open file VIDEO_TS.IFO.
  15. libdvdnav: vm: failed to read VIDEO_TS.IFO
  16. [18:55:27] dvd: not a dvd - trying as a stream/file instead
  17. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x102000800] moov atom not found
  18. [18:55:27] hb_stream_open: open /Users/toe/Downloads/Derek - S01E02.mp4 failed
  19. [18:55:27] scan: unrecognized file type
  20. [18:55:27] libhb: scan thread found 0 valid title(s)
  21. No title found.
  22. HandBrake has exited.
  23.  
  24.  
  25.  
  26. ===== Log file.=======
  27.  
  28. /Users/toe/Downloads/Derek - S01E02.mp4
  29. /private/tmp/addTvTags_45339/Derek-1.jpg
  30. /private/tmp/addTvTags_45339/Derek-1.jpg
  31. ; fi
  32. if [[ ! "${backupFile}" ]]; then backupFile=0; fi
  33. if [[ ! "${removeTags}" ]]; then removeTags=0; fi
  34. if [[ ! "${useFileNameForSearch}" ]]; then useFileNameForSearch=0; fi
  35. if [[ ! "${addTags}" ]]; then addTags=0; fi
  36. if [[ ! "${sortOrder}" ]]; then sortOrder=0; fi
  37. if [[ sortOrder -eq 0 ]]; then sortOrder="default"; fi
  38. if [[ sortOrder -eq 1 ]]; then sortOrder="dvd"; fi
  39.  
  40. if [[ ! -x "$mp4infoPath" || ! -x "$mp4tagsPath" || ! -x "$mp4artPath" || ! -x "$mp4chapsPath" || ! -x "$atomicParsleyPath" || ! -x "$sublerCliPath" ]]; then
  41. displayAlert "Error: Add TV Tags" "The Command Line Tools needed for this action could not be found. Please reinstall Batch Rip Actions for Automator."
  42. exit 1
  43. fi
  44.  
  45. fileExt=`basename "$theFile" | sed 's|.*\.||'`
  46. fileName=`basename "$theFile" .${fileExt} | tr '_' ' ' | sed 's| ([0-9]*)||'`
  47. fileNameWithExt=`basename "$theFile"`
  48. movieName=`basename "$theFile" ".${fileExt}"`
  49. outputDir=`dirname "$theFile"`
  50. setLabelColor "$theFile" "0" &
  51.  
  52. # Create Temp Folder
  53. sourceTmpFolder="/tmp/addTvTags_$scriptPID"
  54. mkdir $sourceTmpFolder
  55.  
  56. # Backup File
  57. if [[ backupFile -eq 1 ]]; then
  58. cp "$theFile" "${outputDir}/${movieName}-backup-${scriptPID}.${fileExt}"
  59. fi
  60.  
  61. if [[ addTags -eq 1 || renameFile -eq 1 ]]; then
  62. if [[ "$fileExt" = "mp4" || "$fileExt" = "m4v" ]]; then
  63. if [[ useFileNameForSearch -eq 1 ]]; then
  64. if echo "$theFile" | egrep '.* - S[0-9]{2}E[0-9]{2}\....' ; then
  65. season_episode=$(basename "$theFile" | sed -e 's/\./ /g' -e 's/.*\([Ss][0-9][0-9][Ee][0-9][0-9]\).*/\1/')
  66. seasonNum=$(echo $season_episode | awk -F[Ee] '{print $1}'| awk -F[Ss] '{print $2}' | sed 's|^0||')
  67. episodeNum=$(echo $season_episode | awk -F[Ee] '{print $2}' | sed 's|^0||')
  68. episodeID=`echo $season_episode | sed -e 's|.*[Ee]||' -e "s|^|${seasonNum}|"`
  69. seriesName=$(basename "$theFile" | sed -e 's/\./ /g' -e 's/ [Ss][0-9][0-9][Ee][0-9][0-9].*//' -e 's|\ \-$||')
  70. searchTerm=$(echo "$seriesName" | sed -e 's|\ |+|g' -e 's|\ \-\ |:\ |g' -e "s|\'|%27|g")
  71. tvdbGetTvTags
  72. else
  73. displayAlert "Error: Add TV Tags (Filename)" "File Naming Convention. Cannot parse the filename. Rename your file: TV Show Name - S##E##.m4v"
  74. cleanUpTmpFiles
  75. break 1
  76. fi
  77. else
  78. searchForTvTags
  79. tvdbGetTvTags
  80. fi
  81. if sed '1q;d' "$episodeXml" | grep '>' > /dev/null ; then
  82. if [[ renameFile -eq 1 ]]; then
  83. renameTvItem
  84. fi
  85. if [[ removeTags -eq 1 ]]; then
  86. "$atomicParsleyPath" "$theFile" --overWrite --metaEnema
  87. fi
  88. if [[ addTags -eq 1 ]]; then
  89. addiTunesTagsTV
  90. fi
  91. osascript -e "set theFile to POSIX file \"$theFile\"" -e 'tell application "Finder" to update theFile'
  92. else
  93. if [[ useFileNameForSearch -eq 1 ]]; then
  94. setLabelColor "$theFile" "1" &
  95. displayAlert "Error: Add TV Tags (TVDB)" "The API server did not return a correct match or the service may be down. Verify that your file name has the correct Movie Name and Year according to themoviedb.org database. If the problem resides with the API server, try again later."
  96. else
  97. setLabelColor "$theFile" "1" &
  98. displayAlert "Error: Add TV Tags (TVDB)" "No results returned from database. The API may be down or there is a problem returning the data. Check your internet connection or try again later."
  99. fi
  100. cleanUpTmpFiles
  101. break 1
  102. fi
  103. else
  104. displayAlert "Error: Add TV Tags" "File Type Extension. Cannot determine if file is mpeg-4 compatible. File extension and type must be .mp4 or .m4v."
  105. cleanUpTmpFiles
  106. break 1
  107. fi
  108. elif [[ removeTags -eq 1 && addTags -eq 0 && renameFile -eq 0 ]]; then
  109. "$atomicParsleyPath" "$theFile" --overWrite --metaEnema
  110. else
  111. displayAlert "Error: Error: Add TV Tags" "No workflow options selected. Please check your workflow options in Automator."
  112. cleanUpTmpFiles
  113. exit 1
  114. fi
  115. returnList="${returnList}${theFile}|"
  116. cleanUpTmpFiles
  117. done
  118. + read theFile
  119. + [[ ! -n 0 ]]
  120. + [[ ! -n 0 ]]
  121. + [[ ! -n 0 ]]
  122. + [[ ! -n 0 ]]
  123. + [[ ! -n 1 ]]
  124. + [[ ! -n 1 ]]
  125. + [[ ! -n 0 ]]
  126. + [[ sortOrder -eq 0 ]]
  127. + sortOrder=default
  128. + [[ sortOrder -eq 1 ]]
  129. + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4info ]]
  130. + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4tags ]]
  131. + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4art ]]
  132. + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4chaps ]]
  133. + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/AtomicParsley ]]
  134. + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/SublerCLI ]]
  135. basename "$theFile" | sed 's|.*\.||'
  136. ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4'
  137. ++ sed 's|.*\.||'
  138. + fileExt=mp4
  139. basename "$theFile" .${fileExt} | tr '_' ' ' | sed 's| ([0-9]*)||'
  140. ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4' .mp4
  141. ++ tr _ ' '
  142. ++ sed 's| ([0-9]*)||'
  143. + fileName='Derek - S01E02'
  144. basename "$theFile"
  145. ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4'
  146. + fileNameWithExt='Derek - S01E02.mp4'
  147. basename "$theFile" ".${fileExt}"
  148. ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4' .mp4
  149. + movieName='Derek - S01E02'
  150. dirname "$theFile"
  151. ++ dirname '/Users/toe/Downloads/Derek - S01E02.mp4'
  152. + outputDir=/Users/toe/Downloads
  153. + sourceTmpFolder=/tmp/addTvTags_45339
  154. + mkdir /tmp/addTvTags_45339
  155. + setLabelColor '/Users/toe/Downloads/Derek - S01E02.mp4' 0
  156. + osascript -e try -e 'set theFolder to POSIX file "/Users/toe/Downloads/Derek - S01E02.mp4" as alias' -e 'tell application "Finder" to set label index of theFolder to 0' -e 'end try'
  157. + [[ backupFile -eq 1 ]]
  158. + [[ addTags -eq 1 ]]
  159. + [[ mp4 = \m\p\4 ]]
  160. + [[ useFileNameForSearch -eq 1 ]]
  161. + echo '/Users/toe/Downloads/Derek - S01E02.mp4'
  162. + egrep '.* - S[0-9]{2}E[0-9]{2}\....'
  163. basename "$theFile" | sed -e 's/\./ /g' -e 's/.*\([Ss][0-9][0-9][Ee][0-9][0-9]\).*/\1/'
  164. ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4'
  165. ++ sed -e 's/\./ /g' -e 's/.*\([Ss][0-9][0-9][Ee][0-9][0-9]\).*/\1/'
  166. + season_episode=S01E02
  167. echo $season_episode | awk -F[Ee] '{print $1}'| awk -F[Ss] '{print $2}' | sed 's|^0||'
  168. ++ echo S01E02
  169. ++ awk '-F[Ee]' '{print $1}'
  170. ++ awk '-F[Ss]' '{print $2}'
  171. ++ sed 's|^0||'
  172. + seasonNum=1
  173. echo $season_episode | awk -F[Ee] '{print $2}' | sed 's|^0||'
  174. ++ echo S01E02
  175. ++ awk '-F[Ee]' '{print $2}'
  176. ++ sed 's|^0||'
  177. + episodeNum=2
  178. echo $season_episode | sed -e 's|.*[Ee]||' -e "s|^|${seasonNum}|"
  179. ++ echo S01E02
  180. ++ sed -e 's|.*[Ee]||' -e 's|^|1|'
  181. + episodeID=102
  182. basename "$theFile" | sed -e 's/\./ /g' -e 's/ [Ss][0-9][0-9][Ee][0-9][0-9].*//' -e 's|\ \-$||'
  183. ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4'
  184. ++ sed -e 's/\./ /g' -e 's/ [Ss][0-9][0-9][Ee][0-9][0-9].*//' -e 's|\ \-$||'
  185. + seriesName=Derek
  186. echo "$seriesName" | sed -e 's|\ |+|g' -e 's|\ \-\ |:\ |g' -e "s|\'|%27|g"
  187. ++ echo Derek
  188. ++ sed -e 's|\ |+|g' -e 's|\ \-\ |:\ |g' -e 's|\'\''|%27|g'
  189. + searchTerm=Derek
  190. + tvdbGetTvTags
  191. + seriesXml=/tmp/addTvTags_45339/Derek-S1.xml
  192. + '[' '!' -e /tmp/addTvTags_45339/Derek-S1.xml ']'
  193. $curlCmd "http://www.thetvdb.com/api/9F21AC232F30F34D/mirrors.xml" | "$xpathPath" "//mirrorpath/text()" 2>/dev/null
  194. ++ curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://www.thetvdb.com/api/9F21AC232F30F34D/mirrors.xml
  195. ++ /usr/bin/xpath '//mirrorpath/text()'
  196. % Total % Received % Xferd Average Speed Time Time Time Current
  197. Dload Upload Total Spent Left Speed
  198.  
  199. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  200. 100 147 0 147 0 0 258 0 --:--:-- --:--:-- --:--:-- 258
  201. + tvdbMirror=http://thetvdb.com
  202. $curlCmd "$tvdbMirror/api/GetSeries.php?seriesname=$searchTerm" | "$xpathPath" //seriesid 2>/dev/null | awk 'NR==1 {print $1}' | awk -F\> '{print $2}' | awk -F\< '{print $1}'
  203. ++ curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 'http://thetvdb.com/api/GetSeries.php?seriesname=Derek'
  204. ++ /usr/bin/xpath //seriesid
  205. ++ awk 'NR==1 {print $1}'
  206. ++ awk '-F>' '{print $2}'
  207. ++ awk '-F<' '{print $1}'
  208. % Total % Received % Xferd Average Speed Time Time Time Current
  209. Dload Upload Total Spent Left Speed
  210.  
  211. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  212. 100 698 0 698 0 0 2467 0 --:--:-- --:--:-- --:--:-- 2475
  213. + series_id=257630
  214. + curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://thetvdb.com/api/9F21AC232F30F34D/series/257630/en.xml
  215. + iconv -f ISO-8859-1 -t UTF-8
  216. % Total % Received % Xferd Average Speed Time Time Time Current
  217. Dload Upload Total Spent Left Speed
  218.  
  219. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  220. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  221. 100 711 0 711 0 0 2312 0 --:--:-- --:--:-- --:--:-- 2308
  222. + cat /tmp/addTvTags_45339/Derek-S1.xml
  223. + egrep -B 9999999 -m1 '</Data>'
  224. + /usr/bin/xmllint --recover --nsclean --format --output /tmp/addTvTags_45339/Derek-S1.xml -
  225. + bannerXml=/tmp/addTvTags_45339/Derek-banners.xml
  226. + '[' '!' -e /tmp/addTvTags_45339/Derek-banners.xml ']'
  227. + iconv -f ISO-8859-1 -t UTF-8
  228. + curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://thetvdb.com/api/9F21AC232F30F34D/series/257630/banners.xml
  229. % Total % Received % Xferd Average Speed Time Time Time Current
  230. Dload Upload Total Spent Left Speed
  231.  
  232. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  233. 100 656 0 656 0 0 4909 0 --:--:-- --:--:-- --:--:-- 4932
  234. + cat /tmp/addTvTags_45339/Derek-banners.xml
  235. + egrep -B 9999999 -m1 '</Banners>'
  236. + /usr/bin/xmllint --recover --nsclean --format --output '' -
  237. I/O error : No such file or directory
  238. I/O error : No such file or directory
  239. + episodeXml=/tmp/addTvTags_45339/Derek-S01E02.xml
  240. + '[' '!' -e /tmp/addTvTags_45339/Derek-S01E02.xml ']'
  241. + '[' default = default ']'
  242. + curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://thetvdb.com/api/9F21AC232F30F34D/series/257630/default/1/2/en.xml
  243. + iconv -f ISO-8859-1 -t UTF-8
  244. % Total % Received % Xferd Average Speed Time Time Time Current
  245. Dload Upload Total Spent Left Speed
  246.  
  247. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  248. 100 776 0 776 0 0 5013 0 --:--:-- --:--:-- --:--:-- 5038
  249. + grep '<title>404 Not Found</title>'
  250. + cat /tmp/addTvTags_45339/Derek-S01E02.xml
  251. + egrep -B 9999999 -m1 '</Data>'
  252. + /usr/bin/xmllint --recover --nsclean --format --output /tmp/addTvTags_45339/Derek-S01E02.xml -
  253. + sed '1q;d' /tmp/addTvTags_45339/Derek-S01E02.xml
  254. + grep '>'
  255. + [[ renameFile -eq 1 ]]
  256. + [[ removeTags -eq 1 ]]
  257. + [[ addTags -eq 1 ]]
  258. + addiTunesTagsTV
  259. "$xpathPath" "$episodeXml" "//EpisodeName/text()" 2>/dev/null
  260. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//EpisodeName/text()'
  261. + episodeName='Episode 2'
  262. "$xpathPath" "$seriesXml" "//SeriesName/text()" 2>/dev/null
  263. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//SeriesName/text()'
  264. + showName=Derek
  265. "$xpathPath" "$seriesXml" "//Network/text()" 2>/dev/null
  266. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//Network/text()'
  267. + tvNetwork='Channel 4'
  268. "$xpathPath" "$seriesXml" "//ContentRating/text()" 2>/dev/null
  269. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//ContentRating/text()'
  270. + tvRating=TV-MA
  271. "$xpathPath" "$episodeXml" "//FirstAired/text()" 2>/dev/null
  272. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//FirstAired/text()'
  273. + releaseDate=2013-02-06
  274. "$xpathPath" "$episodeXml" "//Overview/text()" 2>/dev/null
  275. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//Overview/text()'
  276. + episodeDesc='It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  277.  
  278. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  279.  
  280. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.'
  281. "$xpathPath" "$seriesXml" "//Genre/text()" 2>/dev/null
  282. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//Genre/text()'
  283. + genreList='|Comedy|Drama|'
  284. "$xpathPath" "$seriesXml" "//Actors/text()" 2>/dev/null | sed -e 's_^\|__' -e 's_\|$__' -e's|\||, |g'
  285. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//Actors/text()'
  286. ++ sed -e 's_^\|__' -e 's_\|$__' '-es|\||, |g'
  287. + movieActors='Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl'
  288. "$xpathPath" "$episodeXml" "//GuestStars/text()" 2>/dev/null | sed -e 's_^\|__' -e 's_\|$__' -e's|\||, |g'
  289. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//GuestStars/text()'
  290. ++ sed -e 's_^\|__' -e 's_\|$__' '-es|\||, |g'
  291. + movieGuests='Holli Dempsey, Brett Goldstein'
  292. + '[' '!' 'Holli Dempsey, Brett Goldstein' = '' ']'
  293. + movieActors='Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein'
  294. "$xpathPath" "$episodeXml" "//Director/text()" 2>/dev/null | sed -e 's_^\|__' -e 's_\|$__' -e's|\||, |g'
  295. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//Director/text()'
  296. ++ sed -e 's_^\|__' -e 's_\|$__' '-es|\||, |g'
  297. + movieDirector='Ricky Gervais'
  298. "$xpathPath" "$episodeXml" "//Writer/text()" 2>/dev/null | sed -e 's_^\|__' -e 's_\|$__' -e's|\||, |g'
  299. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//Writer/text()'
  300. ++ sed -e 's_^\|__' -e 's_\|$__' '-es|\||, |g'
  301. + movieWriters='Ricky Gervais'
  302. date "+%Y-%m-%d %H:%M:%S"
  303. ++ date '+%Y-%m-%d %H:%M:%S'
  304. + purchaseDate='2014-05-14 20:33:28'
  305. + echo '|Comedy|Drama|'
  306. + grep Animation
  307. + echo '|Comedy|Drama|'
  308. + grep Science-Fiction
  309. + echo '|Comedy|Drama|'
  310. + grep Fantasy
  311. + echo '|Comedy|Drama|'
  312. + grep Horror
  313. + echo '|Comedy|Drama|'
  314. + grep '\(Action\|Adventure\|Disaster\)'
  315. + echo '|Comedy|Drama|'
  316. + grep Musical
  317. + echo '|Comedy|Drama|'
  318. + grep Documentary
  319. + echo '|Comedy|Drama|'
  320. + grep Sport
  321. + echo '|Comedy|Drama|'
  322. + grep Western
  323. + echo '|Comedy|Drama|'
  324. + grep '\(Thriller\|Suspense\)'
  325. + echo '|Comedy|Drama|'
  326. + grep '\(Drama\|Historical\|Political\|Crime\|Mystery\)'
  327. + movieGenre=Drama
  328. + tvPoster=/tmp/addTvTags_45339/Derek-1.jpg
  329. + '[' '!' -e /tmp/addTvTags_45339/Derek-1.jpg ']'
  330. "$xpathPath" "$bannerXml" / 2>/dev/null | tr -d '\n ' | sed 's|</Banner>|</Banner>\||g' | tr '|' '\n' | egrep "Season>${seasonNum}</Season" | awk -F\<BannerPath\> '{print $2}' | awk -F\</BannerPath\> '{print $1}' | sed "s|^|${tvdbMirror}/banners/|"
  331. ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-banners.xml /
  332. ++ tr -d '\n '
  333. ++ sed 's|</Banner>|</Banner>\||g'
  334. ++ tr '|' '\n'
  335. ++ egrep 'Season>1</Season'
  336. ++ awk '-F<BannerPath>' '{print $2}'
  337. ++ awk '-F</BannerPath>' '{print $1}'
  338. ++ sed 's|^|http://thetvdb.com/banners/|'
  339. + getTvPoster='http://thetvdb.com/banners/seasons/257630-1.jpg
  340. http://thetvdb.com/banners/seasons/257630-1-2.jpg'
  341. + for eachURL in '$getTvPoster'
  342. + curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://thetvdb.com/banners/seasons/257630-1.jpg
  343. % Total % Received % Xferd Average Speed Time Time Time Current
  344. Dload Upload Total Spent Left Speed
  345.  
  346. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  347. 100 153k 100 153k 0 0 307k 0 --:--:-- --:--:-- --:--:-- 307k
  348. sips -g pixelWidth "$tvPoster" | sed 's|.*[^0-9+]||'
  349. ++ sips -g pixelWidth /tmp/addTvTags_45339/Derek-1.jpg
  350. ++ sed 's|.*[^0-9+]||'
  351. + imgIntegrityTest='
  352. 400'
  353. + '[' '
  354. 400' -gt 100 ']'
  355. + resizeImage /tmp/addTvTags_45339/Derek-1.jpg
  356. + sips -Z 600W600H /tmp/addTvTags_45339/Derek-1.jpg --out /tmp/addTvTags_45339/Derek-1.jpg
  357. <CGColor 0x7fe07c0028e0> [<CGColorSpace 0x7fe07a500c50> (kCGColorSpaceDeviceRGB)] ( 0 0 0 1 )
  358. + break 1
  359. + '[' '!' -e /tmp/addTvTags_45339/Derek-1.jpg ']'
  360. "$mp4infoPath" "$theFile" | egrep "1.*video" | awk -F,\ '{print $4}' | sed 's|\ @.*||'
  361. ++ '/Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4info' '/Users/toe/Downloads/Derek - S01E02.mp4'
  362. ++ egrep '1.*video'
  363. ++ awk '-F, ' '{print $4}'
  364. ++ sed 's|\ @.*||'
  365. + getResolution=720x404
  366. echo "$getResolution" | sed 's|x.*||'
  367. ++ echo 720x404
  368. ++ sed 's|x.*||'
  369. + pixelWidth=720
  370. echo "$getResolution" | sed 's|.*x||'
  371. ++ echo 720x404
  372. ++ sed 's|.*x||'
  373. + pixelHeight=404
  374. + [[ pixelWidth -gt 1279 ]]
  375. + [[ pixelHeight -gt 719 ]]
  376. + hdFileTest=0
  377. "$mp4infoPath" "$theFile" | grep -i "Content ID" | sed 's|.* ||'
  378. ++ '/Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4info' '/Users/toe/Downloads/Derek - S01E02.mp4'
  379. ++ grep -i 'Content ID'
  380. ++ sed 's|.* ||'
  381. + cnidNum=
  382. + [[ -z '' ]]
  383. echo $(( 10000+($RANDOM)%(20000-10000+1) ))$(( 1000+($RANDOM)%(9999-1000+1) ))
  384. ++ echo 174501448
  385. + cnidNum=174501448
  386. + sublerArgs='{Artwork:/tmp/addTvTags_45339/Derek-1.jpg}{Name:Episode 2}{Artist:Derek}{Album Artist:Derek}{Album:Derek, Season 1}{Grouping:}{Composer:}{Comments:}{Genre:Drama}{Release Date:2013-02-06}{Track #:2}{Disk #:1/1}{TV Show:Derek}{TV Episode #:2}{TV Network:Channel 4}{TV Episode ID:102}{TV Season:1}{Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  387.  
  388. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  389.  
  390. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Long Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  391.  
  392. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  393.  
  394. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Rating:TV-MA}{Rating Annotation:}{Studio:}{Cast:Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein}{Director:Ricky Gervais}{Codirector:}{Producers:}{Screenwriters:Ricky Gervais}{Lyrics:}{Copyright:}{contentID:174501448}{HD Video:0}{Gapless:0}{Content Rating:}{Media Kind:TV Show}'
  395. substituteISO88591 "$(echo "$sublerArgs")"
  396. echo "$sublerArgs"
  397. +++ echo '{Artwork:/tmp/addTvTags_45339/Derek-1.jpg}{Name:Episode 2}{Artist:Derek}{Album Artist:Derek}{Album:Derek, Season 1}{Grouping:}{Composer:}{Comments:}{Genre:Drama}{Release Date:2013-02-06}{Track #:2}{Disk #:1/1}{TV Show:Derek}{TV Episode #:2}{TV Network:Channel 4}{TV Episode ID:102}{TV Season:1}{Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  398.  
  399. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  400.  
  401. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Long Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  402.  
  403. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  404.  
  405. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Rating:TV-MA}{Rating Annotation:}{Studio:}{Cast:Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein}{Director:Ricky Gervais}{Codirector:}{Producers:}{Screenwriters:Ricky Gervais}{Lyrics:}{Copyright:}{contentID:174501448}{HD Video:0}{Gapless:0}{Content Rating:}{Media Kind:TV Show}'
  406. ++ substituteISO88591 '{Artwork:/tmp/addTvTags_45339/Derek-1.jpg}{Name:Episode 2}{Artist:Derek}{Album Artist:Derek}{Album:Derek, Season 1}{Grouping:}{Composer:}{Comments:}{Genre:Drama}{Release Date:2013-02-06}{Track #:2}{Disk #:1/1}{TV Show:Derek}{TV Episode #:2}{TV Network:Channel 4}{TV Episode ID:102}{TV Season:1}{Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  407.  
  408. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  409.  
  410. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Long Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  411.  
  412. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  413.  
  414. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Rating:TV-MA}{Rating Annotation:}{Studio:}{Cast:Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein}{Director:Ricky Gervais}{Codirector:}{Producers:}{Screenwriters:Ricky Gervais}{Lyrics:}{Copyright:}{contentID:174501448}{HD Video:0}{Gapless:0}{Content Rating:}{Media Kind:TV Show}'
  415. echo "$1" | sed "s|\'|\\\'|g"
  416. +++ echo '{Artwork:/tmp/addTvTags_45339/Derek-1.jpg}{Name:Episode 2}{Artist:Derek}{Album Artist:Derek}{Album:Derek, Season 1}{Grouping:}{Composer:}{Comments:}{Genre:Drama}{Release Date:2013-02-06}{Track #:2}{Disk #:1/1}{TV Show:Derek}{TV Episode #:2}{TV Network:Channel 4}{TV Episode ID:102}{TV Season:1}{Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  417.  
  418. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  419.  
  420. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Long Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  421.  
  422. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  423.  
  424. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Rating:TV-MA}{Rating Annotation:}{Studio:}{Cast:Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein}{Director:Ricky Gervais}{Codirector:}{Producers:}{Screenwriters:Ricky Gervais}{Lyrics:}{Copyright:}{contentID:174501448}{HD Video:0}{Gapless:0}{Content Rating:}{Media Kind:TV Show}'
  425. +++ sed 's|\'\''|\\'\''|g'
  426. ++ escapeString='{Artwork:/tmp/addTvTags_45339/Derek-1.jpg}{Name:Episode 2}{Artist:Derek}{Album Artist:Derek}{Album:Derek, Season 1}{Grouping:}{Composer:}{Comments:}{Genre:Drama}{Release Date:2013-02-06}{Track #:2}{Disk #:1/1}{TV Show:Derek}{TV Episode #:2}{TV Network:Channel 4}{TV Episode ID:102}{TV Season:1}{Description:It\'\''s Derek\'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  427.  
  428. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  429.  
  430. And there\'\''s a new addition to the staff: community service worker Vicky, who\'\''s convinced she looks like Victoria Beckham.}{Long Description:It\'\''s Derek\'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  431.  
  432. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  433.  
  434. And there\'\''s a new addition to the staff: community service worker Vicky, who\'\''s convinced she looks like Victoria Beckham.}{Rating:TV-MA}{Rating Annotation:}{Studio:}{Cast:Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein}{Director:Ricky Gervais}{Codirector:}{Producers:}{Screenwriters:Ricky Gervais}{Lyrics:}{Copyright:}{contentID:174501448}{HD Video:0}{Gapless:0}{Content Rating:}{Media Kind:TV Show}'
  435. ++ php -r 'echo mb_convert_encoding('\''{Artwork:/tmp/addTvTags_45339/Derek-1.jpg}{Name:Episode 2}{Artist:Derek}{Album Artist:Derek}{Album:Derek, Season 1}{Grouping:}{Composer:}{Comments:}{Genre:Drama}{Release Date:2013-02-06}{Track #:2}{Disk #:1/1}{TV Show:Derek}{TV Episode #:2}{TV Network:Channel 4}{TV Episode ID:102}{TV Season:1}{Description:It\'\''s Derek\'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  436.  
  437. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  438.  
  439. And there\'\''s a new addition to the staff: community service worker Vicky, who\'\''s convinced she looks like Victoria Beckham.}{Long Description:It\'\''s Derek\'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  440.  
  441. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  442.  
  443. And there\'\''s a new addition to the staff: community service worker Vicky, who\'\''s convinced she looks like Victoria Beckham.}{Rating:TV-MA}{Rating Annotation:}{Studio:}{Cast:Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein}{Director:Ricky Gervais}{Codirector:}{Producers:}{Screenwriters:Ricky Gervais}{Lyrics:}{Copyright:}{contentID:174501448}{HD Video:0}{Gapless:0}{Content Rating:}{Media Kind:TV Show}'\'', '\''UTF-8'\'', '\''HTML-ENTITIES'\'');'
  444. + sublerArgs='{Artwork:/tmp/addTvTags_45339/Derek-1.jpg}{Name:Episode 2}{Artist:Derek}{Album Artist:Derek}{Album:Derek, Season 1}{Grouping:}{Composer:}{Comments:}{Genre:Drama}{Release Date:2013-02-06}{Track #:2}{Disk #:1/1}{TV Show:Derek}{TV Episode #:2}{TV Network:Channel 4}{TV Episode ID:102}{TV Season:1}{Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  445.  
  446. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  447.  
  448. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Long Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  449.  
  450. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  451.  
  452. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Rating:TV-MA}{Rating Annotation:}{Studio:}{Cast:Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein}{Director:Ricky Gervais}{Codirector:}{Producers:}{Screenwriters:Ricky Gervais}{Lyrics:}{Copyright:}{contentID:174501448}{HD Video:0}{Gapless:0}{Content Rating:}{Media Kind:TV Show}'
  453. + [[ optimizeFile -eq 0 ]]
  454. + '/Applications/Batch Rip Actions for Automator.app/Contents/MacOS/SublerCLI' -o '/Users/toe/Downloads/Derek - S01E02.mp4' -t '{Artwork:/tmp/addTvTags_45339/Derek-1.jpg}{Name:Episode 2}{Artist:Derek}{Album Artist:Derek}{Album:Derek, Season 1}{Grouping:}{Composer:}{Comments:}{Genre:Drama}{Release Date:2013-02-06}{Track #:2}{Disk #:1/1}{TV Show:Derek}{TV Episode #:2}{TV Network:Channel 4}{TV Episode ID:102}{TV Season:1}{Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  455.  
  456. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  457.  
  458. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Long Description:It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
  459.  
  460. Derek knows exactly what he wants: JLS, Susan Boyle and Stacey Solomon for music, and vol-au-vents, sausage rolls and chicken Kiev for food.
  461.  
  462. And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.}{Rating:TV-MA}{Rating Annotation:}{Studio:}{Cast:Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein}{Director:Ricky Gervais}{Codirector:}{Producers:}{Screenwriters:Ricky Gervais}{Lyrics:}{Copyright:}{contentID:174501448}{HD Video:0}{Gapless:0}{Content Rating:}{Media Kind:TV Show}'
  463. + '[' '
  464. 400' -lt 100 ']'
  465. + osascript -e 'set theFile to POSIX file "/Users/toe/Downloads/Derek - S01E02.mp4"' -e 'tell application "Finder" to update theFile'
  466. + returnList='/Users/toe/Downloads/Derek - S01E02.mp4|'
  467. + cleanUpTmpFiles
  468. + '[' -e /tmp/addTvTags_45339 ']'
  469. + rm -rfd /tmp/addTvTags_45339
  470. + read theFile
  471.  
  472. # Display script completed notification
  473. displayNotificationCount=`echo "$returnList" | tr '|' '\n' | grep -v "^$" | grep -c ""`
  474. echo "$returnList" | tr '|' '\n' | grep -v "^$" | grep -c ""
  475. ++ echo '/Users/toe/Downloads/Derek - S01E02.mp4|'
  476. ++ tr '|' '\n'
  477. ++ grep -v '^$'
  478. ++ grep -c ''
  479. + displayNotificationCount=1
  480. displayNotification "Batch Rip Actions for Automator" "Add TV Tags" "${displayNotificationCount} item(s) were processed."
  481. + displayNotification 'Batch Rip Actions for Automator' 'Add TV Tags' '1 item(s) were processed.'
  482. + cat
  483. + osascript -l AppleScript
  484.  
  485. # Restore standard output & return output files
  486. exec 1>&6 6>&-
  487. + exec
  488. echo "$returnList" | tr '|' '\n' | grep -v "^$"
  489. + echo '/Users/toe/Downloads/Derek - S01E02.mp4|'
  490. + tr '|' '\n'
  491. + grep -v '^$'
  492. exit 0
  493. + exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement