for element in matches do
var unique_id = element.unique_id(config)
- if local_path.to_path.exists then
- # Do not redownload a file (we assume that the file name is unique by itself)
- if sys.verbose then print "File exists, skipping {element}"
- continue
- else if history.has(unique_id) then
+ if history.has(unique_id) then
# Do not download a file that is not unique according to `unique_id`
if not element.is_unique_exception(config) then
# We make some exceptions
end
for dir in source_folder.files do if dir.stat.is_dir then
- folder_names.add dir.to_s
+ folder_names.add dir.filename
end
end
fun to_rss_elements: Array[Element]
do
var xml = to_xml
+ if xml isa XMLError then
+ print_error "RSS Parse Error: {xml.message}:{xml.location or else "null"}"
+ return new Array[Element]
+ end
var items = xml["rss"].first["channel"].first["item"]
var elements = new Array[Element]