The type of the thumbnail may be different from that of the entry
This commit is contained in:
parent
2607138d2a
commit
cce4db445d
3 changed files with 9 additions and 3 deletions
|
|
@ -154,7 +154,7 @@ public class DirectoryEntry extends EntryWithChildren<Entry> {
|
||||||
File f = new File(file, name);
|
File f = new File(file, name);
|
||||||
String type = props.getProperty("file." + name + ".type", "image");
|
String type = props.getProperty("file." + name + ".type", "image");
|
||||||
FileEntry entry = new FileEntry(this, f, type);
|
FileEntry entry = new FileEntry(this, f, type);
|
||||||
Thumbnail thumbnail = new Thumbnail(f);
|
Thumbnail thumbnail = new Thumbnail(f, type);
|
||||||
entry.setCaption(props.getProperty("file." + name + ".caption"));
|
entry.setCaption(props.getProperty("file." + name + ".caption"));
|
||||||
Date fileDate = sdf.parse(props.getProperty("file." + name + ".captureDate"));
|
Date fileDate = sdf.parse(props.getProperty("file." + name + ".captureDate"));
|
||||||
if (fileDate.before(oldest)) {
|
if (fileDate.before(oldest)) {
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,12 @@ public class Thumbnail {
|
||||||
int orientation;
|
int orientation;
|
||||||
String etag;
|
String etag;
|
||||||
String duration;
|
String duration;
|
||||||
|
String type;
|
||||||
|
|
||||||
|
|
||||||
public Thumbnail(File path) {
|
public Thumbnail(File path, String type) {
|
||||||
this.path = path;
|
this.path = path;
|
||||||
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -76,4 +78,8 @@ public class Thumbnail {
|
||||||
public void setDuration(String duration) {
|
public void setDuration(String duration) {
|
||||||
this.duration = duration;
|
this.duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ $D(function() {
|
||||||
var gridDiv = $("<div class=\"grid\">\n"
|
var gridDiv = $("<div class=\"grid\">\n"
|
||||||
+ " <span class=\"name\">" + entry.name + "</span><br/>\n"
|
+ " <span class=\"name\">" + entry.name + "</span><br/>\n"
|
||||||
+ " <div class=\"imgborder\"><a class=\"ss\" id=\"ent" + idx + "\" href=\"${base}" + entry.path + "?size=" + picSize + "\" title=\"" + entry.name + "\">"
|
+ " <div class=\"imgborder\"><a class=\"ss\" id=\"ent" + idx + "\" href=\"${base}" + entry.path + "?size=" + picSize + "\" title=\"" + entry.name + "\">"
|
||||||
+ "<img class=\"picture\" src=\"${base}" + (entry.type == "movie" ? entry.path + ".frame" : entry.path) + "?size=" + thmb + "\" border=\"0\" width=\"" + dim.w + "\" height=\"" + dim.h + "\"/></a></div>\n"
|
+ "<img class=\"picture\" src=\"${base}" + (entry.thumbtype == "movie" ? entry.path + ".frame" : entry.path) + "?size=" + thmb + "\" border=\"0\" width=\"" + dim.w + "\" height=\"" + dim.h + "\"/></a></div>\n"
|
||||||
+ "</div>\n");
|
+ "</div>\n");
|
||||||
|
|
||||||
var captionP = $("<p id=\"" + entry.name + "\" class=\"caption\"></p>\n");
|
var captionP = $("<p id=\"" + entry.name + "\" class=\"caption\"></p>\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue