mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 00:08:51 -05:00
* optimize build-data
This commit is contained in:
parent
ac28c2b681
commit
4834d33d2d
@ -120,7 +120,7 @@ new File('osdb.txt').eachLine('UTF-8'){
|
|||||||
// 0 IDMovie, 1 IDMovieImdb, 2 MovieName, 3 MovieYear, 4 MovieKind, 5 MoviePriority
|
// 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.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) {
|
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]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# initialize dump files if necessary
|
||||||
for DUMP in "omdb.zip" "tvdb.zip" "anidb.gz" "osdb.gz"
|
for DUMP in "omdb.zip" "tvdb.zip" "anidb.gz" "osdb.gz"
|
||||||
do
|
do
|
||||||
if [ ! -f "$DUMP" ]; then
|
if [ ! -f "$DUMP" ]; then
|
||||||
@ -8,7 +9,7 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo 'Fetch OMDB dump'
|
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"
|
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
|
unzip -o omdb.zip
|
||||||
fi
|
fi
|
||||||
@ -22,10 +23,11 @@ fi
|
|||||||
echo 'Fetch AniDB dump'
|
echo 'Fetch AniDB dump'
|
||||||
if test "`find anidb.gz -mtime +5`"; then
|
if test "`find anidb.gz -mtime +5`"; then
|
||||||
curl -L -o anidb.gz -z anidb.gz "http://anidb.net/api/anime-titles.dat.gz"
|
curl -L -o anidb.gz -z anidb.gz "http://anidb.net/api/anime-titles.dat.gz"
|
||||||
|
gunzip -c anidb.gz > anidb.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Fetch OSDB dump'
|
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'
|
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
|
gunzip -c osdb.gz > osdb.txt
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user