1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-18 07:15:07 -05:00
filebot/build-data/build-data-import.sh

38 lines
1.0 KiB
Bash
Raw Normal View History

2015-05-11 06:35:45 -04:00
#!/bin/sh
echo 'Fetch TVDB dump'
2015-05-11 15:47:02 -04:00
DUMP='tvdb.zip'
LINK='http://thetvdb.com/api/58B4AA94C59AD656/updates/updates_all.zip'
if [ ! -f "$DUMP" ] || test "`find $DUMP -mtime +5`"; then
curl -L -o "$DUMP" -z "$DUMP" "$LINK"
unzip -o "$DUMP"
2015-05-11 06:35:45 -04:00
fi
echo 'Fetch AniDB dump'
2015-05-11 15:47:02 -04:00
DUMP='anidb.gz'
TEXT='anidb.txt'
LINK='http://anidb.net/api/anime-titles.dat.gz'
if [ ! -f "$DUMP" ] || test "`find $DUMP -mtime +5`"; then
curl -L -o "$DUMP" -z "$DUMP" "$LINK"
gunzip -c "$DUMP" > "$TEXT"
2015-05-11 06:35:45 -04:00
fi
echo 'Fetch OSDB dump'
2015-05-11 15:47:02 -04:00
DUMP='osdb.gz'
TEXT='osdb.txt'
LINK='http://www.opensubtitles.org/addons/export_movie.php'
if [ ! -f "$DUMP" ] || test "`find $DUMP -mtime +30`"; then
curl -L -o "$DUMP" -z "$DUMP" "$LINK" -sH 'Accept-encoding: gzip'
gunzip -c "$DUMP" > "$TEXT"
fi
echo 'Fetch OMDB dump'
DUMP='omdb.zip'
LINK='http://beforethecode.com/projects/omdb/download.aspx?e=reinhard.pointner%40gmail.com&tsv=movies'
if [ ! -f "$DUMP" ] || test "`find $DUMP -mtime +30`"; then
curl -L -o "$DUMP" -z "$DUMP" "$LINK"
unzip -o "$DUMP"
2015-05-11 06:35:45 -04:00
fi
2015-05-11 15:51:32 -04:00
echo 'DONE'