1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-21 23:38:50 -05:00

Rebuild index only if there's new files

This commit is contained in:
Reinhard Pointner 2019-05-09 03:16:10 +07:00
parent f58cffda34
commit ff92d0cf33

View File

@ -43,6 +43,8 @@ void createIndexFile(db) {
void build(ids, section, db, query) {
def files = []
ids.each{ id ->
def original = getOriginalPath(section, id)
def thumb = getThumbnailPath(section, id)
@ -90,11 +92,15 @@ void build(ids, section, db, query) {
if (original.length() > 0 && !thumb.exists()) {
createThumbnail(original, thumb)
files << thumb
ls thumb
}
}
createIndexFile(section)
if (files) {
createIndexFile(section)
}
}