1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-14 13:25:10 -05:00
filebot/build-data/build-data-import.sh

29 lines
890 B
Bash
Raw Normal View History

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"
if [[ "${FILE##*.}" == "gz" ]]; then
2016-02-05 10:21:13 -05:00
gunzip -k -f "$FILE"
fi
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
fetch osdb.txt 'http://www.opensubtitles.org/addons/export_movie.php' +5
2015-05-11 15:47:02 -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