1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-16 14:25:02 -05:00

* optimize build-data

This commit is contained in:
Reinhard Pointner 2015-05-11 18:45:02 +00:00
parent ac28c2b681
commit 4834d33d2d
2 changed files with 5 additions and 3 deletions

View File

@ -120,7 +120,7 @@ new File('osdb.txt').eachLine('UTF-8'){
// 0 IDMovie, 1 IDMovieImdb, 2 MovieName, 3 MovieYear, 4 MovieKind, 5 MoviePriority
if (fields.size() == 6 && fields[1] ==~ /\d+/ && fields[3] ==~ /\d{4}/) {
if (fields[4] ==~ /movie|tv.series/ && isValidMovieName(fields[2]) && (fields[3] as int) >= 1970 && (fields[5] as int) >= 100) {
osdb << [fields[1] as int, fields[2], fields[3] as int, fields[4] == /movie/ ? 'm' : fields[4] == /tv series/ ? 's' : '?', fields[5] as int]
osdb << [fields[1] as int, fields[2], fields[3] as int, fields[4] == /movie/ ? 'm' : fields[4] == /tv series/ ? 's' : '?', 0]
}
}
}

View File

@ -1,5 +1,6 @@
#!/bin/sh
# initialize dump files if necessary
for DUMP in "omdb.zip" "tvdb.zip" "anidb.gz" "osdb.gz"
do
if [ ! -f "$DUMP" ]; then
@ -8,7 +9,7 @@ do
done
echo 'Fetch OMDB dump'
if test "`find omdb.zip -mtime +20`"; then
if test "`find omdb.zip -mtime +30`"; then
curl -L -o omdb.zip -z omdb.zip "http://beforethecode.com/projects/omdb/download.aspx?e=reinhard.pointner%40gmail.com&tsv=movies"
unzip -o omdb.zip
fi
@ -22,10 +23,11 @@ fi
echo 'Fetch AniDB dump'
if test "`find anidb.gz -mtime +5`"; then
curl -L -o anidb.gz -z anidb.gz "http://anidb.net/api/anime-titles.dat.gz"
gunzip -c anidb.gz > anidb.txt
fi
echo 'Fetch OSDB dump'
if test "`find osdb.gz -mtime +20`"; then
if test "`find osdb.gz -mtime +30`"; then
curl -L -o osdb.gz -z osdb.gz "http://www.opensubtitles.org/addons/export_movie.php" -sH 'Accept-encoding: gzip'
gunzip -c osdb.gz > osdb.txt
fi