Directory captions
This commit is contained in:
parent
bec21c49dd
commit
2607138d2a
2 changed files with 4 additions and 2 deletions
|
|
@ -4,3 +4,4 @@ file.fra_jakt.jpg.caption: Lorem ipsum "dolor sit amet", consectetur adipisicing
|
||||||
dir.portraits.hidden=false
|
dir.portraits.hidden=false
|
||||||
sort=date desc
|
sort=date desc
|
||||||
file.salmon.avi.caption: Videos can have captions too.
|
file.salmon.avi.caption: Videos can have captions too.
|
||||||
|
dir.problemcases.caption: Directories can have captions too.
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ public class DirectoryEntry extends EntryWithChildren<Entry> {
|
||||||
thumbnail.setDuration(duration);
|
thumbnail.setDuration(duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (key.startsWith("dir.") && !key.endsWith(".hidden")) {
|
} else if (key.startsWith("dir.") && !key.endsWith(".hidden") && !key.endsWith(".caption")) {
|
||||||
String name = key.substring("dir.".length());
|
String name = key.substring("dir.".length());
|
||||||
boolean hidden = Boolean.parseBoolean(props.getProperty("dir." + name + ".hidden"));
|
boolean hidden = Boolean.parseBoolean(props.getProperty("dir." + name + ".hidden"));
|
||||||
if (!hidden) {
|
if (!hidden) {
|
||||||
|
|
@ -189,7 +189,8 @@ public class DirectoryEntry extends EntryWithChildren<Entry> {
|
||||||
Date fileDate = dir.getEarliest();
|
Date fileDate = dir.getEarliest();
|
||||||
if (fileDate != null && fileDate.before(oldest)) {
|
if (fileDate != null && fileDate.before(oldest)) {
|
||||||
oldest = fileDate;
|
oldest = fileDate;
|
||||||
}
|
}
|
||||||
|
dir.setCaption(props.getProperty("dir." + name + ".caption"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue