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) {
String s = musicService.getRestUrl(context, null, false) + id;
String s = musicService.getRestUrl(context, null, false, null) + id;
return name + "-" + s.hashCode() + ".ser";
}
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";
}
@ -672,7 +672,7 @@ public class CachedMusicService implements MusicService {
private void checkSettingsChanged(Context 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)) {
cachedMusicFolders.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
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";
MusicDirectory entryDir = FileUtil.deserialize(context, cacheName, MusicDirectory.class);

View File

@ -15,7 +15,7 @@ public final class SyncUtil {
private static void checkRestURL(Context 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)) {
syncedPlaylists = null;
url = newURL;
@ -72,7 +72,7 @@ public final class SyncUtil {
}
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) {
@ -84,7 +84,7 @@ public final class SyncUtil {
}
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 {