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:
parent
f58cffda34
commit
ff92d0cf33
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user