Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamesuta committed Dec 2, 2016
1 parent 7ceca6d commit 5cf2a69
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ group=com.kamesuta.mc
modid=signpic
modname=SignPicture
version_major=2
version_minor=5
version_micro=1
version_minor=6
version_micro=0.beta
version_minecraft=1.7.10
version_forge=10.13.4.1558-1.7.10
version_minforge=10.13.4.1558
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ public CacheData createBlank() {
};
}

public String getURL() {
return this.cacheio.get().url;
}

public ContentCache setURL(final String url) {
this.cacheio.get().url = url;
this.cacheio.save();
return this;
}

public String getMime() {
return this.cacheio.get().mime;
}
Expand Down Expand Up @@ -73,6 +83,10 @@ public static class CacheData implements IData {
* format version
*/
public int format = FormatVersion;
/**
* content End URL
*/
public String url;
/**
* content MIME type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void communicate() {
final String endid = ContentLocation.hash(end);
this.content.meta.setCacheID(endid);
final ContentCache cachemeta = new ContentCache(ContentLocation.cachemetaLocation(endid));
cachemeta.setDirty(false);
cachemeta.setURL(end);

final File cachefile = ContentLocation.cacheLocation(endid);
if (cachemeta.isAvailable()&&!cachemeta.isDirty()&&cachefile.exists()) {
Expand All @@ -76,6 +76,8 @@ public void communicate() {
return;
}

cachemeta.setDirty(false);

final HttpEntity entity = response.getEntity();
cachemeta.setMime(ContentType.getOrDefault(entity).getMimeType());

Expand Down

0 comments on commit 5cf2a69

Please sign in to comment.