Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [18:55:27] hb_init: starting libhb thread
- HandBrake 0.9.9 (2013051800) - Darwin x86_64 - http://handbrake.fr
- 8 CPUs detected
- Opening /Users/toe/Downloads/Derek - S01E02.mp4...
- [18:55:27] hb_scan: path=/Users/toe/Downloads/Derek - S01E02.mp4, title_index=0
- libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/toe/Downloads/Derek - S01E02.mp4/BDMV/index.bdmv
- libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/toe/Downloads/Derek - S01E02.mp4/BDMV/BACKUP/index.bdmv
- libbluray/bluray.c:1725: nav_get_title_list(/Users/toe/Downloads/Derek - S01E02.mp4) failed (0x103009e00)
- [18:55:27] bd: not a bd - trying as a stream/file instead
- libdvdnav: Using dvdnav version 4.1.3
- libdvdread: Encrypted DVD support unavailable.
- libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
- libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
- libdvdread: Can't open file VIDEO_TS.IFO.
- libdvdnav: vm: failed to read VIDEO_TS.IFO
- [18:55:27] dvd: not a dvd - trying as a stream/file instead
- [mov,mp4,m4a,3gp,3g2,mj2 @ 0x102000800] moov atom not found
- [18:55:27] hb_stream_open: open /Users/toe/Downloads/Derek - S01E02.mp4 failed
- [18:55:27] scan: unrecognized file type
- [18:55:27] libhb: scan thread found 0 valid title(s)
- No title found.
- HandBrake has exited.
- ===== Log file.=======
- /Users/toe/Downloads/Derek - S01E02.mp4
- /private/tmp/addTvTags_45339/Derek-1.jpg
- /private/tmp/addTvTags_45339/Derek-1.jpg
- ; fi
- if [[ ! "${backupFile}" ]]; then backupFile=0; fi
- if [[ ! "${removeTags}" ]]; then removeTags=0; fi
- if [[ ! "${useFileNameForSearch}" ]]; then useFileNameForSearch=0; fi
- if [[ ! "${addTags}" ]]; then addTags=0; fi
- if [[ ! "${sortOrder}" ]]; then sortOrder=0; fi
- if [[ sortOrder -eq 0 ]]; then sortOrder="default"; fi
- if [[ sortOrder -eq 1 ]]; then sortOrder="dvd"; fi
- if [[ ! -x "$mp4infoPath" || ! -x "$mp4tagsPath" || ! -x "$mp4artPath" || ! -x "$mp4chapsPath" || ! -x "$atomicParsleyPath" || ! -x "$sublerCliPath" ]]; then
- displayAlert "Error: Add TV Tags" "The Command Line Tools needed for this action could not be found. Please reinstall Batch Rip Actions for Automator."
- exit 1
- fi
- fileExt=`basename "$theFile" | sed 's|.*\.||'`
- fileName=`basename "$theFile" .${fileExt} | tr '_' ' ' | sed 's| ([0-9]*)||'`
- fileNameWithExt=`basename "$theFile"`
- movieName=`basename "$theFile" ".${fileExt}"`
- outputDir=`dirname "$theFile"`
- setLabelColor "$theFile" "0" &
- # Create Temp Folder
- sourceTmpFolder="/tmp/addTvTags_$scriptPID"
- mkdir $sourceTmpFolder
- # Backup File
- if [[ backupFile -eq 1 ]]; then
- cp "$theFile" "${outputDir}/${movieName}-backup-${scriptPID}.${fileExt}"
- fi
- if [[ addTags -eq 1 || renameFile -eq 1 ]]; then
- if [[ "$fileExt" = "mp4" || "$fileExt" = "m4v" ]]; then
- if [[ useFileNameForSearch -eq 1 ]]; then
- if echo "$theFile" | egrep '.* - S[0-9]{2}E[0-9]{2}\....' ; then
- season_episode=$(basename "$theFile" | sed -e 's/\./ /g' -e 's/.*\([Ss][0-9][0-9][Ee][0-9][0-9]\).*/\1/')
- seasonNum=$(echo $season_episode | awk -F[Ee] '{print $1}'| awk -F[Ss] '{print $2}' | sed 's|^0||')
- episodeNum=$(echo $season_episode | awk -F[Ee] '{print $2}' | sed 's|^0||')
- episodeID=`echo $season_episode | sed -e 's|.*[Ee]||' -e "s|^|${seasonNum}|"`
- seriesName=$(basename "$theFile" | sed -e 's/\./ /g' -e 's/ [Ss][0-9][0-9][Ee][0-9][0-9].*//' -e 's|\ \-$||')
- searchTerm=$(echo "$seriesName" | sed -e 's|\ |+|g' -e 's|\ \-\ |:\ |g' -e "s|\'|%27|g")
- tvdbGetTvTags
- else
- displayAlert "Error: Add TV Tags (Filename)" "File Naming Convention. Cannot parse the filename. Rename your file: TV Show Name - S##E##.m4v"
- cleanUpTmpFiles
- break 1
- fi
- else
- searchForTvTags
- tvdbGetTvTags
- fi
- if sed '1q;d' "$episodeXml" | grep '>' > /dev/null ; then
- if [[ renameFile -eq 1 ]]; then
- renameTvItem
- fi
- if [[ removeTags -eq 1 ]]; then
- "$atomicParsleyPath" "$theFile" --overWrite --metaEnema
- fi
- if [[ addTags -eq 1 ]]; then
- addiTunesTagsTV
- fi
- osascript -e "set theFile to POSIX file \"$theFile\"" -e 'tell application "Finder" to update theFile'
- else
- if [[ useFileNameForSearch -eq 1 ]]; then
- setLabelColor "$theFile" "1" &
- 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."
- else
- setLabelColor "$theFile" "1" &
- 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."
- fi
- cleanUpTmpFiles
- break 1
- fi
- else
- 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."
- cleanUpTmpFiles
- break 1
- fi
- elif [[ removeTags -eq 1 && addTags -eq 0 && renameFile -eq 0 ]]; then
- "$atomicParsleyPath" "$theFile" --overWrite --metaEnema
- else
- displayAlert "Error: Error: Add TV Tags" "No workflow options selected. Please check your workflow options in Automator."
- cleanUpTmpFiles
- exit 1
- fi
- returnList="${returnList}${theFile}|"
- cleanUpTmpFiles
- done
- + read theFile
- + [[ ! -n 0 ]]
- + [[ ! -n 0 ]]
- + [[ ! -n 0 ]]
- + [[ ! -n 0 ]]
- + [[ ! -n 1 ]]
- + [[ ! -n 1 ]]
- + [[ ! -n 0 ]]
- + [[ sortOrder -eq 0 ]]
- + sortOrder=default
- + [[ sortOrder -eq 1 ]]
- + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4info ]]
- + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4tags ]]
- + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4art ]]
- + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4chaps ]]
- + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/AtomicParsley ]]
- + [[ ! -x /Applications/Batch Rip Actions for Automator.app/Contents/MacOS/SublerCLI ]]
- basename "$theFile" | sed 's|.*\.||'
- ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4'
- ++ sed 's|.*\.||'
- + fileExt=mp4
- basename "$theFile" .${fileExt} | tr '_' ' ' | sed 's| ([0-9]*)||'
- ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4' .mp4
- ++ tr _ ' '
- ++ sed 's| ([0-9]*)||'
- + fileName='Derek - S01E02'
- basename "$theFile"
- ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4'
- + fileNameWithExt='Derek - S01E02.mp4'
- basename "$theFile" ".${fileExt}"
- ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4' .mp4
- + movieName='Derek - S01E02'
- dirname "$theFile"
- ++ dirname '/Users/toe/Downloads/Derek - S01E02.mp4'
- + outputDir=/Users/toe/Downloads
- + sourceTmpFolder=/tmp/addTvTags_45339
- + mkdir /tmp/addTvTags_45339
- + setLabelColor '/Users/toe/Downloads/Derek - S01E02.mp4' 0
- + 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'
- + [[ backupFile -eq 1 ]]
- + [[ addTags -eq 1 ]]
- + [[ mp4 = \m\p\4 ]]
- + [[ useFileNameForSearch -eq 1 ]]
- + echo '/Users/toe/Downloads/Derek - S01E02.mp4'
- + egrep '.* - S[0-9]{2}E[0-9]{2}\....'
- basename "$theFile" | sed -e 's/\./ /g' -e 's/.*\([Ss][0-9][0-9][Ee][0-9][0-9]\).*/\1/'
- ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4'
- ++ sed -e 's/\./ /g' -e 's/.*\([Ss][0-9][0-9][Ee][0-9][0-9]\).*/\1/'
- + season_episode=S01E02
- echo $season_episode | awk -F[Ee] '{print $1}'| awk -F[Ss] '{print $2}' | sed 's|^0||'
- ++ echo S01E02
- ++ awk '-F[Ee]' '{print $1}'
- ++ awk '-F[Ss]' '{print $2}'
- ++ sed 's|^0||'
- + seasonNum=1
- echo $season_episode | awk -F[Ee] '{print $2}' | sed 's|^0||'
- ++ echo S01E02
- ++ awk '-F[Ee]' '{print $2}'
- ++ sed 's|^0||'
- + episodeNum=2
- echo $season_episode | sed -e 's|.*[Ee]||' -e "s|^|${seasonNum}|"
- ++ echo S01E02
- ++ sed -e 's|.*[Ee]||' -e 's|^|1|'
- + episodeID=102
- basename "$theFile" | sed -e 's/\./ /g' -e 's/ [Ss][0-9][0-9][Ee][0-9][0-9].*//' -e 's|\ \-$||'
- ++ basename '/Users/toe/Downloads/Derek - S01E02.mp4'
- ++ sed -e 's/\./ /g' -e 's/ [Ss][0-9][0-9][Ee][0-9][0-9].*//' -e 's|\ \-$||'
- + seriesName=Derek
- echo "$seriesName" | sed -e 's|\ |+|g' -e 's|\ \-\ |:\ |g' -e "s|\'|%27|g"
- ++ echo Derek
- ++ sed -e 's|\ |+|g' -e 's|\ \-\ |:\ |g' -e 's|\'\''|%27|g'
- + searchTerm=Derek
- + tvdbGetTvTags
- + seriesXml=/tmp/addTvTags_45339/Derek-S1.xml
- + '[' '!' -e /tmp/addTvTags_45339/Derek-S1.xml ']'
- $curlCmd "http://www.thetvdb.com/api/9F21AC232F30F34D/mirrors.xml" | "$xpathPath" "//mirrorpath/text()" 2>/dev/null
- ++ curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://www.thetvdb.com/api/9F21AC232F30F34D/mirrors.xml
- ++ /usr/bin/xpath '//mirrorpath/text()'
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 100 147 0 147 0 0 258 0 --:--:-- --:--:-- --:--:-- 258
- + tvdbMirror=http://thetvdb.com
- $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}'
- ++ curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 'http://thetvdb.com/api/GetSeries.php?seriesname=Derek'
- ++ /usr/bin/xpath //seriesid
- ++ awk 'NR==1 {print $1}'
- ++ awk '-F>' '{print $2}'
- ++ awk '-F<' '{print $1}'
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 100 698 0 698 0 0 2467 0 --:--:-- --:--:-- --:--:-- 2475
- + series_id=257630
- + curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://thetvdb.com/api/9F21AC232F30F34D/series/257630/en.xml
- + iconv -f ISO-8859-1 -t UTF-8
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 100 711 0 711 0 0 2312 0 --:--:-- --:--:-- --:--:-- 2308
- + cat /tmp/addTvTags_45339/Derek-S1.xml
- + egrep -B 9999999 -m1 '</Data>'
- + /usr/bin/xmllint --recover --nsclean --format --output /tmp/addTvTags_45339/Derek-S1.xml -
- + bannerXml=/tmp/addTvTags_45339/Derek-banners.xml
- + '[' '!' -e /tmp/addTvTags_45339/Derek-banners.xml ']'
- + iconv -f ISO-8859-1 -t UTF-8
- + curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://thetvdb.com/api/9F21AC232F30F34D/series/257630/banners.xml
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 100 656 0 656 0 0 4909 0 --:--:-- --:--:-- --:--:-- 4932
- + cat /tmp/addTvTags_45339/Derek-banners.xml
- + egrep -B 9999999 -m1 '</Banners>'
- + /usr/bin/xmllint --recover --nsclean --format --output '' -
- I/O error : No such file or directory
- I/O error : No such file or directory
- + episodeXml=/tmp/addTvTags_45339/Derek-S01E02.xml
- + '[' '!' -e /tmp/addTvTags_45339/Derek-S01E02.xml ']'
- + '[' default = default ']'
- + curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://thetvdb.com/api/9F21AC232F30F34D/series/257630/default/1/2/en.xml
- + iconv -f ISO-8859-1 -t UTF-8
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 100 776 0 776 0 0 5013 0 --:--:-- --:--:-- --:--:-- 5038
- + grep '<title>404 Not Found</title>'
- + cat /tmp/addTvTags_45339/Derek-S01E02.xml
- + egrep -B 9999999 -m1 '</Data>'
- + /usr/bin/xmllint --recover --nsclean --format --output /tmp/addTvTags_45339/Derek-S01E02.xml -
- + sed '1q;d' /tmp/addTvTags_45339/Derek-S01E02.xml
- + grep '>'
- + [[ renameFile -eq 1 ]]
- + [[ removeTags -eq 1 ]]
- + [[ addTags -eq 1 ]]
- + addiTunesTagsTV
- "$xpathPath" "$episodeXml" "//EpisodeName/text()" 2>/dev/null
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//EpisodeName/text()'
- + episodeName='Episode 2'
- "$xpathPath" "$seriesXml" "//SeriesName/text()" 2>/dev/null
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//SeriesName/text()'
- + showName=Derek
- "$xpathPath" "$seriesXml" "//Network/text()" 2>/dev/null
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//Network/text()'
- + tvNetwork='Channel 4'
- "$xpathPath" "$seriesXml" "//ContentRating/text()" 2>/dev/null
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//ContentRating/text()'
- + tvRating=TV-MA
- "$xpathPath" "$episodeXml" "//FirstAired/text()" 2>/dev/null
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//FirstAired/text()'
- + releaseDate=2013-02-06
- "$xpathPath" "$episodeXml" "//Overview/text()" 2>/dev/null
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//Overview/text()'
- + episodeDesc='It'\''s Derek'\''s 50th birthday; what better way to celebrate than with a party at Broadhill retirement home?
- 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.
- And there'\''s a new addition to the staff: community service worker Vicky, who'\''s convinced she looks like Victoria Beckham.'
- "$xpathPath" "$seriesXml" "//Genre/text()" 2>/dev/null
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//Genre/text()'
- + genreList='|Comedy|Drama|'
- "$xpathPath" "$seriesXml" "//Actors/text()" 2>/dev/null | sed -e 's_^\|__' -e 's_\|$__' -e's|\||, |g'
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S1.xml '//Actors/text()'
- ++ sed -e 's_^\|__' -e 's_\|$__' '-es|\||, |g'
- + movieActors='Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl'
- "$xpathPath" "$episodeXml" "//GuestStars/text()" 2>/dev/null | sed -e 's_^\|__' -e 's_\|$__' -e's|\||, |g'
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//GuestStars/text()'
- ++ sed -e 's_^\|__' -e 's_\|$__' '-es|\||, |g'
- + movieGuests='Holli Dempsey, Brett Goldstein'
- + '[' '!' 'Holli Dempsey, Brett Goldstein' = '' ']'
- + movieActors='Ricky Gervais, Kerry Godliman, Karl Pilkington, David Earl, Holli Dempsey, Brett Goldstein'
- "$xpathPath" "$episodeXml" "//Director/text()" 2>/dev/null | sed -e 's_^\|__' -e 's_\|$__' -e's|\||, |g'
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//Director/text()'
- ++ sed -e 's_^\|__' -e 's_\|$__' '-es|\||, |g'
- + movieDirector='Ricky Gervais'
- "$xpathPath" "$episodeXml" "//Writer/text()" 2>/dev/null | sed -e 's_^\|__' -e 's_\|$__' -e's|\||, |g'
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-S01E02.xml '//Writer/text()'
- ++ sed -e 's_^\|__' -e 's_\|$__' '-es|\||, |g'
- + movieWriters='Ricky Gervais'
- date "+%Y-%m-%d %H:%M:%S"
- ++ date '+%Y-%m-%d %H:%M:%S'
- + purchaseDate='2014-05-14 20:33:28'
- + echo '|Comedy|Drama|'
- + grep Animation
- + echo '|Comedy|Drama|'
- + grep Science-Fiction
- + echo '|Comedy|Drama|'
- + grep Fantasy
- + echo '|Comedy|Drama|'
- + grep Horror
- + echo '|Comedy|Drama|'
- + grep '\(Action\|Adventure\|Disaster\)'
- + echo '|Comedy|Drama|'
- + grep Musical
- + echo '|Comedy|Drama|'
- + grep Documentary
- + echo '|Comedy|Drama|'
- + grep Sport
- + echo '|Comedy|Drama|'
- + grep Western
- + echo '|Comedy|Drama|'
- + grep '\(Thriller\|Suspense\)'
- + echo '|Comedy|Drama|'
- + grep '\(Drama\|Historical\|Political\|Crime\|Mystery\)'
- + movieGenre=Drama
- + tvPoster=/tmp/addTvTags_45339/Derek-1.jpg
- + '[' '!' -e /tmp/addTvTags_45339/Derek-1.jpg ']'
- "$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/|"
- ++ /usr/bin/xpath /tmp/addTvTags_45339/Derek-banners.xml /
- ++ tr -d '\n '
- ++ sed 's|</Banner>|</Banner>\||g'
- ++ tr '|' '\n'
- ++ egrep 'Season>1</Season'
- ++ awk '-F<BannerPath>' '{print $2}'
- ++ awk '-F</BannerPath>' '{print $1}'
- ++ sed 's|^|http://thetvdb.com/banners/|'
- + getTvPoster='http://thetvdb.com/banners/seasons/257630-1.jpg
- http://thetvdb.com/banners/seasons/257630-1-2.jpg'
- + for eachURL in '$getTvPoster'
- + curl -L --compressed --connect-timeout 30 --max-time 60 --retry 1 http://thetvdb.com/banners/seasons/257630-1.jpg
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 100 153k 100 153k 0 0 307k 0 --:--:-- --:--:-- --:--:-- 307k
- sips -g pixelWidth "$tvPoster" | sed 's|.*[^0-9+]||'
- ++ sips -g pixelWidth /tmp/addTvTags_45339/Derek-1.jpg
- ++ sed 's|.*[^0-9+]||'
- + imgIntegrityTest='
- 400'
- + '[' '
- 400' -gt 100 ']'
- + resizeImage /tmp/addTvTags_45339/Derek-1.jpg
- + sips -Z 600W600H /tmp/addTvTags_45339/Derek-1.jpg --out /tmp/addTvTags_45339/Derek-1.jpg
- <CGColor 0x7fe07c0028e0> [<CGColorSpace 0x7fe07a500c50> (kCGColorSpaceDeviceRGB)] ( 0 0 0 1 )
- + break 1
- + '[' '!' -e /tmp/addTvTags_45339/Derek-1.jpg ']'
- "$mp4infoPath" "$theFile" | egrep "1.*video" | awk -F,\ '{print $4}' | sed 's|\ @.*||'
- ++ '/Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4info' '/Users/toe/Downloads/Derek - S01E02.mp4'
- ++ egrep '1.*video'
- ++ awk '-F, ' '{print $4}'
- ++ sed 's|\ @.*||'
- + getResolution=720x404
- echo "$getResolution" | sed 's|x.*||'
- ++ echo 720x404
- ++ sed 's|x.*||'
- + pixelWidth=720
- echo "$getResolution" | sed 's|.*x||'
- ++ echo 720x404
- ++ sed 's|.*x||'
- + pixelHeight=404
- + [[ pixelWidth -gt 1279 ]]
- + [[ pixelHeight -gt 719 ]]
- + hdFileTest=0
- "$mp4infoPath" "$theFile" | grep -i "Content ID" | sed 's|.* ||'
- ++ '/Applications/Batch Rip Actions for Automator.app/Contents/MacOS/mp4info' '/Users/toe/Downloads/Derek - S01E02.mp4'
- ++ grep -i 'Content ID'
- ++ sed 's|.* ||'
- + cnidNum=
- + [[ -z '' ]]
- echo $(( 10000+($RANDOM)%(20000-10000+1) ))$(( 1000+($RANDOM)%(9999-1000+1) ))
- ++ echo 174501448
- + cnidNum=174501448
- + 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?
- 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.
- 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?
- 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.
- 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}'
- substituteISO88591 "$(echo "$sublerArgs")"
- echo "$sublerArgs"
- +++ 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?
- 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.
- 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?
- 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.
- 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}'
- ++ 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?
- 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.
- 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?
- 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.
- 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}'
- echo "$1" | sed "s|\'|\\\'|g"
- +++ 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?
- 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.
- 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?
- 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.
- 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}'
- +++ sed 's|\'\''|\\'\''|g'
- ++ 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?
- 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.
- 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?
- 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.
- 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}'
- ++ 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?
- 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.
- 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?
- 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.
- 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'\'');'
- + 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?
- 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.
- 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?
- 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.
- 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}'
- + [[ optimizeFile -eq 0 ]]
- + '/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?
- 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.
- 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?
- 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.
- 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}'
- + '[' '
- 400' -lt 100 ']'
- + osascript -e 'set theFile to POSIX file "/Users/toe/Downloads/Derek - S01E02.mp4"' -e 'tell application "Finder" to update theFile'
- + returnList='/Users/toe/Downloads/Derek - S01E02.mp4|'
- + cleanUpTmpFiles
- + '[' -e /tmp/addTvTags_45339 ']'
- + rm -rfd /tmp/addTvTags_45339
- + read theFile
- # Display script completed notification
- displayNotificationCount=`echo "$returnList" | tr '|' '\n' | grep -v "^$" | grep -c ""`
- echo "$returnList" | tr '|' '\n' | grep -v "^$" | grep -c ""
- ++ echo '/Users/toe/Downloads/Derek - S01E02.mp4|'
- ++ tr '|' '\n'
- ++ grep -v '^$'
- ++ grep -c ''
- + displayNotificationCount=1
- displayNotification "Batch Rip Actions for Automator" "Add TV Tags" "${displayNotificationCount} item(s) were processed."
- + displayNotification 'Batch Rip Actions for Automator' 'Add TV Tags' '1 item(s) were processed.'
- + cat
- + osascript -l AppleScript
- # Restore standard output & return output files
- exec 1>&6 6>&-
- + exec
- echo "$returnList" | tr '|' '\n' | grep -v "^$"
- + echo '/Users/toe/Downloads/Derek - S01E02.mp4|'
- + tr '|' '\n'
- + grep -v '^$'
- exit 0
- + exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement