Skip to content

Commit 5aae600

Browse files
committed
Each user profiles need a dedicated cacheKey
This ensures the App's cached library content matches the content reachable for the active user profile.
1 parent f2ef875 commit 5aae600

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

XBMC Remote/DetailViewController.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,17 @@ - (NSString*)getCacheKey:(NSString*)fieldA parameters:(NSMutableDictionary*)fiel
354354
// Which version does the serer have?
355355
NSString *serverVersion = [NSString stringWithFormat:@"%d.%d", serverMajorVersion, serverMinorVersion];
356356

357+
// Which user profile is active?
358+
NSString *currentProfile = [NSString stringWithFormat:@"%@", AppDelegate.instance.currentProfile];
359+
357360
// Which App version are we running?
358361
NSString *appVersion = [Utilities getAppVersionString];
359362

360363
// Which JSON request's results do we cache??
361364
NSString *jsonRequest = [NSString stringWithFormat:@"%@ %@", fieldA, fieldB];
362365

363366
// Get SHA256 hash for the combination given above
364-
NSString *text = [NSString stringWithFormat:@"%@%@%@%@", serverInfo, serverVersion, appVersion, jsonRequest];
367+
NSString *text = [NSString stringWithFormat:@"%@%@%@%@%@", serverInfo, serverVersion, currentProfile, appVersion, jsonRequest];
365368
return [text SHA256String];
366369
}
367370

0 commit comments

Comments
 (0)