Script Troubleshooting
Posted: 09 Apr 2012, 12:59
I'm attempting to make FileBot search a folder on my Mac with both TV shows and Movies, find subtitles and rename them, and then move them into separate folders for shows and movies and delete the old files. I've already created an automator script that copies all finished utorrent files into this folder so that it can keep seeding even though I rename the files (old files remain in another folder). This is my script.
Now when I execute the script in Terminal I get the following errors:
I'm not a very experienced coder, and I'd be fantastic if someone could help me out with this.
Code: Select all
//// filebot -script "path to local script" -trust-script <folder/with/files> [-non-strict]
// PERSONALIZED SETTINGS
def episodeFormat = "/Users/myname/Movies/Movies/TV/{n}{'/Season '+s}/{episode}"
def movieFormat = "/Users/myname/Movies/Movies/Movies/{movie}/{movie}"
def groups = args.getFiles().groupBy{
def tvs = detectSeriesName(it)
def mov = detectMovie(it, false)
println "$it.name [series: $tvs, movie: $mov]"
// DECIDE EPISODE VS MOVIE (IF NOT CLEAR)
if (tvs && mov) {
if (it.name =~ "(?i:$tvs - .+)" || parseEpisodeNumber(it.name) || parseDate(it.name)) {
println "Exclude Movie: $mov"
mov = null
} else if (detectMovie(it, true)) {
println "Exclude Series: $tvs"
tvs = null
}
}
return [tvs:tvs, mov:mov]
}
groups.each{ group, files ->
// EPISODE MODE
if (group.tvs && !group.mov) {
// fetch subtitles
files += getSubtitles(file:files)
// sort subs and episodes
return rename(file:files, db:'TVRage', format:'format:episodeFormat')
}
// MOVIE MODE
if (group.mov && !group.tvs) {
// fetch subtitles
files += getSubtitles(file:files)
// sort subs and movies
return rename(file:files, db:'TheMovieDB', format: 'format:movieFormat')
}
}
Code: Select all
Apr 09, 2012 2:43:32 PM com.dmurph.tracking.JGoogleAnalyticsTracker dispatchRequest
SEVERE: Error making tracking request
java.net.UnknownHostException: www.google-analytics.com
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:578)
at java.net.Socket.connect(Socket.java:527)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
at sun.net.www.http.HttpClient.New(HttpClient.java:290)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:976)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
at com.dmurph.tracking.JGoogleAnalyticsTracker.dispatchRequest(Unknown Source)
at com.dmurph.tracking.JGoogleAnalyticsTracker.access$100(Unknown Source)
at com.dmurph.tracking.JGoogleAnalyticsTracker$2.run(Unknown Source)
Apr 09, 2012 2:43:32 PM com.dmurph.tracking.JGoogleAnalyticsTracker dispatchRequest
SEVERE: Error making tracking request
java.net.UnknownHostException: www.google-analytics.com
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:578)
at java.net.Socket.connect(Socket.java:527)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
at sun.net.www.http.HttpClient.New(HttpClient.java:290)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:976)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
at com.dmurph.tracking.JGoogleAnalyticsTracker.dispatchRequest(Unknown Source)
at com.dmurph.tracking.JGoogleAnalyticsTracker.access$100(Unknown Source)
at com.dmurph.tracking.JGoogleAnalyticsTracker$2.run(Unknown Source)