git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix remotelib for pg sending
[fanfix.git]
/
supported
/
BasicSupportHelper.java
diff --git
a/supported/BasicSupportHelper.java
b/supported/BasicSupportHelper.java
index 41716df4e4d17952cd0e77aeac28eee20e837aca..b5c7bb9cdee9ccaf96c1de6c38eeb4aaa76a9537 100644
(file)
--- a/
supported/BasicSupportHelper.java
+++ b/
supported/BasicSupportHelper.java
@@
-26,10
+26,9
@@
public class BasicSupportHelper {
* @return the cover if any, or NULL
*/
public Image getDefaultCover(String subject) {
* @return the cover if any, or NULL
*/
public Image getDefaultCover(String subject) {
- if (subject != null && !subject.isEmpty()
- && Instance.getCoverDir() != null) {
+ if (subject != null && !subject.isEmpty() && Instance.getInstance().getCoverDir() != null) {
try {
try {
- File fileCover = new File(Instance.getCoverDir(), subject);
+ File fileCover = new File(Instance.get
Instance().get
CoverDir(), subject);
return getImage(null, fileCover.toURI().toURL(), subject);
} catch (MalformedURLException e) {
}
return getImage(null, fileCover.toURI().toURL(), subject);
} catch (MalformedURLException e) {
}
@@
-81,7
+80,7
@@
public class BasicSupportHelper {
}
InputStream in = null;
try {
}
InputStream in = null;
try {
- in = Instance.getCache().open(url, support, true);
+ in = Instance.get
Instance().get
Cache().open(url, support, true);
return new Image(in);
} catch (IOException e) {
} finally {
return new Image(in);
} catch (IOException e) {
} finally {
@@
-156,8
+155,7
@@
public class BasicSupportHelper {
// try for URLs
try {
for (String ext : getImageExt(true)) {
// try for URLs
try {
for (String ext : getImageExt(true)) {
- if (Instance.getCache()
- .check(new URL(line + ext), true)) {
+ if (Instance.getInstance().getCache().check(new URL(line + ext), true)) {
url = new URL(line + ext);
break;
}
url = new URL(line + ext);
break;
}
@@
-168,7
+166,7
@@
public class BasicSupportHelper {
for (String ext : getImageExt(true)) {
try {
url = new URL(line + ext);
for (String ext : getImageExt(true)) {
try {
url = new URL(line + ext);
- Instance.getCache().refresh(url, support, true);
+ Instance.get
Instance().get
Cache().refresh(url, support, true);
break;
} catch (IOException e) {
// no image with this ext
break;
} catch (IOException e) {
// no image with this ext
@@
-184,7
+182,7
@@
public class BasicSupportHelper {
// refresh the cached file
if (url != null) {
try {
// refresh the cached file
if (url != null) {
try {
- Instance.getCache().refresh(url, support, true);
+ Instance.get
Instance().get
Cache().refresh(url, support, true);
} catch (IOException e) {
// woops, broken image
url = null;
} catch (IOException e) {
// woops, broken image
url = null;
@@
-206,7
+204,7
@@
public class BasicSupportHelper {
public String fixAuthor(String author) {
if (author != null) {
for (String suffix : new String[] { " ", ":" }) {
public String fixAuthor(String author) {
if (author != null) {
for (String suffix : new String[] { " ", ":" }) {
- for (String byString : Instance.getConfig().getList(Config.CONF_BYS)) {
+ for (String byString : Instance.get
Instance().get
Config().getList(Config.CONF_BYS)) {
byString += suffix;
if (author.toUpperCase().startsWith(byString.toUpperCase())) {
author = author.substring(byString.length()).trim();
byString += suffix;
if (author.toUpperCase().startsWith(byString.toUpperCase())) {
author = author.substring(byString.length()).trim();