mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-22 07:48:52 -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) {
|
void build(ids, section, db, query) {
|
||||||
|
def files = []
|
||||||
|
|
||||||
ids.each{ id ->
|
ids.each{ id ->
|
||||||
def original = getOriginalPath(section, id)
|
def original = getOriginalPath(section, id)
|
||||||
def thumb = getThumbnailPath(section, id)
|
def thumb = getThumbnailPath(section, id)
|
||||||
@ -90,11 +92,15 @@ void build(ids, section, db, query) {
|
|||||||
|
|
||||||
if (original.length() > 0 && !thumb.exists()) {
|
if (original.length() > 0 && !thumb.exists()) {
|
||||||
createThumbnail(original, thumb)
|
createThumbnail(original, thumb)
|
||||||
|
files << thumb
|
||||||
|
|
||||||
ls thumb
|
ls thumb
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (files) {
|
||||||
createIndexFile(section)
|
createIndexFile(section)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user