aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/CachedMusicService.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/service/CachedMusicService.java b/src/github/daneren2005/dsub/service/CachedMusicService.java
index bd43fbed..31280b19 100644
--- a/src/github/daneren2005/dsub/service/CachedMusicService.java
+++ b/src/github/daneren2005/dsub/service/CachedMusicService.java
@@ -511,13 +511,15 @@ public class CachedMusicService implements MusicService {
public User getUser(boolean refresh, String username, Context context, ProgressListener progressListener) throws Exception {
User result = null;
- if(!refresh) {
- result = FileUtil.deserialize(context, getCacheName(context, "user-" + username), User.class);
- }
-
- if(result == null) {
+ try {
result = musicService.getUser(refresh, username, context, progressListener);
FileUtil.serialize(context, result, getCacheName(context, "user-" + username));
+ } catch(Exception e) {
+ // Don't care
+ }
+
+ if(result == null && !refresh) {
+ result = FileUtil.deserialize(context, getCacheName(context, "user-" + username), User.class);
}
return result;