handle another error
This commit is contained in:
parent
62f666dd4e
commit
84534740f4
1 changed files with 8 additions and 8 deletions
|
|
@ -36,12 +36,12 @@
|
||||||
# option to write an m3u file after fetching the mp3s
|
# option to write an m3u file after fetching the mp3s
|
||||||
"m3u" => '/Users/ward/dv.m3u',
|
"m3u" => '/Users/ward/dv.m3u',
|
||||||
},
|
},
|
||||||
"tagesschau" => {
|
# "tagesschau" => {
|
||||||
"rss" => 'http://www.tagesschau.de/export/podcast',
|
# "rss" => 'http://www.tagesschau.de/export/podcast',
|
||||||
"savedir" => '/Users/ward/ipod_sync/[books]/Tagesschau',
|
# "savedir" => '/Users/ward/ipod_sync/[books]/Tagesschau',
|
||||||
# delete files that aren't in the rss anylonger
|
# # delete files that aren't in the rss anylonger
|
||||||
"delete" => true,
|
# "delete" => true,
|
||||||
},
|
# },
|
||||||
"pennradio" => {
|
"pennradio" => {
|
||||||
"rss" => 'http://www.923freefm.com/pages/podcast/80.rss',
|
"rss" => 'http://www.923freefm.com/pages/podcast/80.rss',
|
||||||
# %%DATE%% is a magic word here, gets replaced by the pubdate in
|
# %%DATE%% is a magic word here, gets replaced by the pubdate in
|
||||||
|
|
@ -115,8 +115,8 @@ def getenclosure(podcast, item)
|
||||||
File.symlink("#{@podcasts[podcast]["savedir"]}/#{filename}", "#{@podcasts[podcast]["linkdir"]}/#{filename}")
|
File.symlink("#{@podcasts[podcast]["savedir"]}/#{filename}", "#{@podcasts[podcast]["linkdir"]}/#{filename}")
|
||||||
end
|
end
|
||||||
return "#{@podcasts[podcast]["savedir"]}/#{filename}"
|
return "#{@podcasts[podcast]["savedir"]}/#{filename}"
|
||||||
rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ECONNREFUSED
|
rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, Net::HTTPFatalError
|
||||||
puts " error fetching, skipping"
|
puts " error #{$!} fetching, skipping"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return "#{@podcasts[podcast]["savedir"]}/#{filename}"
|
return "#{@podcasts[podcast]["savedir"]}/#{filename}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue