1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-17 23:05:03 -05:00
filebot/build-data/build-data-import.sh

31 lines
897 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
curl -L -o "$FILE" -z "$FILE" "$LINK"
if [[ "${FILE##*.}" == "gz" ]]; then
2016-02-05 10:21:13 -05:00
gunzip -k -f "$FILE"
fi
if [[ "${FILE##*.}" == "zip" ]]; then
2016-02-05 10:21:13 -05:00
unzip -o "$FILE"
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' +30
2015-05-11 15:47:02 -04:00
2016-02-05 10:21:13 -05:00
fetch anime-list.xml 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list.xml' +30
fetch anime-movieset-list.xml 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-movieset-list.xml' +30
2015-05-11 15:51:32 -04:00
echo 'DONE'