mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-11 11:55:03 -05:00
Experiment with artwork thumbnail support
This commit is contained in:
parent
6239dbb1c8
commit
6398526b57
@ -22,10 +22,9 @@ File getOriginalPath(db, id) {
|
|||||||
|
|
||||||
|
|
||||||
File getThumbnailPath(db, id, scale) {
|
File getThumbnailPath(db, id, scale) {
|
||||||
def n = id as String
|
// e.g. 42.png or 42@2x.png
|
||||||
if (scale != 1) {
|
def n = scale == 1 ? id : id + '@' + scale + 'x'
|
||||||
n += '@' + scale + 'x'
|
|
||||||
}
|
|
||||||
return _args.outputPath.resolve("images/${db}/thumb/poster/${n}.png")
|
return _args.outputPath.resolve("images/${db}/thumb/poster/${n}.png")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,12 +60,12 @@ void build(ids, section, db, query) {
|
|||||||
def thumb = getThumbnailPath(section, id, scale)
|
def thumb = getThumbnailPath(section, id, scale)
|
||||||
|
|
||||||
if (thumb.exists()) {
|
if (thumb.exists()) {
|
||||||
log.finest "[SKIP] $id"
|
log.finest "[SKIP] $id @ $scale"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (original.length() == 0 && original.exists() && System.currentTimeMillis() - original.lastModified() > 90 * 24 * 60 * 60 * 1000) {
|
if (original.length() == 0 && original.exists() && System.currentTimeMillis() - original.lastModified() > 90 * 24 * 60 * 60 * 1000) {
|
||||||
log.finest "[SKIP] $id"
|
log.finest "[SKIP] $id @ $scale"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user