1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00
filebot/build-data/build-data-import.sh

31 lines
896 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-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' +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'