The hotkey for showing track info now calls a different method that will hide the...
[MenuTunes.git] / NetworkObject.m
index 4473970..8721e98 100755 (executable)
@@ -24,6 +24,7 @@
 - (id)init
 {
     if ( (self = [super init]) ) {
+        _valid = YES;
         if (![self requiresPassword]) {
             _authenticated = YES;
         } else {
@@ -35,7 +36,7 @@
 
 - (ITMTRemote *)remote
 {
-    if (_authenticated) {
+    if (_authenticated && _valid) {
         return [[MainController sharedController] currentRemote];
     } else {
         return nil;
@@ -52,7 +53,7 @@
 
 - (BOOL)requiresPassword
 {
-    return [[NSUserDefaults standardUserDefaults] boolForKey:@"enableSharingPassword"];
+    return ([[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"] length] > 0);
 }
 
 - (BOOL)sendPassword:(NSData *)password
     }
 }
 
+- (void)invalidate
+{
+    _valid = NO;
+}
+
+- (void)makeValid
+{
+    _valid = YES;
+}
+
+- (BOOL)isValid
+{
+    return _valid;
+}
+
 @end