2015-05-11 06:35:45 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-02-05 10:21:10 -05:00
|
|
|
fetch()
|
|
|
|
{
|
2016-02-05 10:21:13 -05:00
|
|
|
FILE="$1"
|
|
|
|
LINK="$2"
|
|
|
|
TIME="$3"
|
2015-05-11 06:35:45 -04:00
|
|
|
|
2016-02-05 10:21:13 -05:00
|
|
|
echo "Fetch $FILE"
|
|
|
|
if [ ! -f "$FILE" ] || test "`find $FILE -mtime $TIME`"; then
|
2016-11-15 06:29:47 -05:00
|
|
|
curl -L -o "$FILE" -z "$FILE" --retry 5 "$LINK"
|
2016-02-11 13:55:22 -05:00
|
|
|
|
|
|
|
if [[ "${FILE##*.}" == "gz" ]]; then
|
2016-02-05 10:21:13 -05:00
|
|
|
gunzip -k -f "$FILE"
|
|
|
|
fi
|
2016-02-11 13:55:22 -05:00
|
|
|
if [[ "${FILE##*.}" == "zip" ]]; then
|
2016-04-10 00:55:51 -04:00
|
|
|
7z e -y "$FILE"
|
2016-02-05 10:21:13 -05:00
|
|
|
fi
|
|
|
|
fi
|
2016-02-05 10:21:10 -05:00
|
|
|
}
|
2015-05-11 06:35:45 -04:00
|
|
|
|
2016-02-05 10:21:10 -05:00
|
|
|
fetch anidb.txt.gz 'http://anidb.net/api/anime-titles.dat.gz' +5
|
|
|
|
fetch tvdb.zip 'http://thetvdb.com/api/58B4AA94C59AD656/updates/updates_all.zip' +5
|
|
|
|
fetch omdb.zip 'http://beforethecode.com/projects/omdb/download.aspx?e=reinhard.pointner%40gmail.com&tsv=movies' +30
|
2016-05-15 12:26:22 -04:00
|
|
|
fetch osdb.txt 'http://www.opensubtitles.org/addons/export_movie.php' +5
|
2015-05-11 15:47:02 -04:00
|
|
|
|
2016-05-15 12:26:22 -04:00
|
|
|
fetch anime-list.xml 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list.xml' +5
|
|
|
|
fetch anime-movieset-list.xml 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-movieset-list.xml' +5
|