Fix broken getRESTUrl() calls from other Util classes.

This commit is contained in:
dddddd-mmmmmm 2019-03-01 15:37:52 +11:00
parent 13ffabdb20
commit 05ce1509ec
3 changed files with 7 additions and 7 deletions

View File

@ -640,12 +640,12 @@ public class CachedMusicService implements MusicService {
} }
private String getCacheName(Context context, String name, String id) { private String getCacheName(Context context, String name, String id) {
String s = musicService.getRestUrl(context, null, false) + id; String s = musicService.getRestUrl(context, null, false, null) + id;
return name + "-" + s.hashCode() + ".ser"; return name + "-" + s.hashCode() + ".ser";
} }
private String getCacheName(Context context, String name) { private String getCacheName(Context context, String name) {
String s = musicService.getRestUrl(context, null, false); String s = musicService.getRestUrl(context, null, false, null);
return name + "-" + s.hashCode() + ".ser"; return name + "-" + s.hashCode() + ".ser";
} }
@ -672,7 +672,7 @@ public class CachedMusicService implements MusicService {
private void checkSettingsChanged(Context context) { private void checkSettingsChanged(Context context) {
int instance = musicService.getInstance(context); int instance = musicService.getInstance(context);
String newUrl = musicService.getRestUrl(context, null, false); String newUrl = musicService.getRestUrl(context, null, false, null);
if (!Util.equals(newUrl, restUrl)) { if (!Util.equals(newUrl, restUrl)) {
cachedMusicFolders.clear(); cachedMusicFolders.clear();
cachedIndexes.clear(); cachedIndexes.clear();

View File

@ -292,7 +292,7 @@ public class FileUtil {
} }
// Do a special lookup since 4.7+ doesn't match artist/album to entry.getPath // Do a special lookup since 4.7+ doesn't match artist/album to entry.getPath
String s = Util.getRestUrl(context, null, false) + entry.getId(); String s = Util.getRestUrl(context, null, false, null) + entry.getId();
String cacheName = "album-" + s.hashCode() + ".ser"; String cacheName = "album-" + s.hashCode() + ".ser";
MusicDirectory entryDir = FileUtil.deserialize(context, cacheName, MusicDirectory.class); MusicDirectory entryDir = FileUtil.deserialize(context, cacheName, MusicDirectory.class);

View File

@ -15,7 +15,7 @@ public final class SyncUtil {
private static void checkRestURL(Context context) { private static void checkRestURL(Context context) {
int instance = Util.getActiveServer(context); int instance = Util.getActiveServer(context);
String newURL = Util.getRestUrl(context, null, instance, false); String newURL = Util.getRestUrl(context, null, instance, false, null);
if (url == null || !url.equals(newURL)) { if (url == null || !url.equals(newURL)) {
syncedPlaylists = null; syncedPlaylists = null;
url = newURL; url = newURL;
@ -72,7 +72,7 @@ public final class SyncUtil {
} }
private static String getPlaylistSyncFile(Context context, int instance) { private static String getPlaylistSyncFile(Context context, int instance) {
return "sync-playlist-" + (Util.getRestUrl(context, null, instance, false)).hashCode() + ".ser"; return "sync-playlist-" + (Util.getRestUrl(context, null, instance, false, null)).hashCode() + ".ser";
} }
public static void removeMostRecentSyncFiles(Context context) { public static void removeMostRecentSyncFiles(Context context) {
@ -84,7 +84,7 @@ public final class SyncUtil {
} }
private static String getMostRecentSyncFile(Context context, int instance) { private static String getMostRecentSyncFile(Context context, int instance) {
return "sync-most_recent-" + (Util.getRestUrl(context, null, instance, false)).hashCode() + ".ser"; return "sync-most_recent-" + (Util.getRestUrl(context, null, instance, false, null)).hashCode() + ".ser";
} }
public static class SyncSet implements Serializable { public static class SyncSet implements Serializable {