Browse Source

prepare an unread indicator in the media library

Felix Paul Kühne 12 years ago
parent
commit
80b3bfdb13

+ 1 - 0
AspenProject/VLCMovieViewController.m

@@ -97,6 +97,7 @@
     if (self.mediaItem) {
         self.title = [self.mediaItem title];
         [_mediaPlayer setMedia:[VLCMedia mediaWithURL:[NSURL URLWithString:self.mediaItem.url]]];
+        self.mediaItem.unread = @0;
     } else {
         [_mediaPlayer setMedia:[VLCMedia mediaWithURL:self.url]];
         self.title = @"Network Stream";

+ 2 - 0
AspenProject/VLCPlaylistGridView.m

@@ -53,6 +53,7 @@
         [_mediaObject removeObserver:self forKeyPath:@"fileSizeInBytes"];
         [_mediaObject removeObserver:self forKeyPath:@"title"];
         [_mediaObject removeObserver:self forKeyPath:@"thumbnailTimeouted"];
+        [_mediaObject removeObserver:self forKeyPath:@"unread"];
         [_mediaObject didHide];
 
         _mediaObject = mediaObject;
@@ -63,6 +64,7 @@
         [_mediaObject addObserver:self forKeyPath:@"fileSizeInBytes" options:0 context:nil];
         [_mediaObject addObserver:self forKeyPath:@"title" options:0 context:nil];
         [_mediaObject addObserver:self forKeyPath:@"thumbnailTimeouted" options:0 context:nil];
+        [_mediaObject addObserver:self forKeyPath:@"unread" options:0 context:nil];
         [_mediaObject willDisplay];
     }
 

+ 2 - 0
AspenProject/VLCPlaylistTableViewCell.m

@@ -41,6 +41,7 @@
         [_mediaObject removeObserver:self forKeyPath:@"fileSizeInBytes"];
         [_mediaObject removeObserver:self forKeyPath:@"title"];
         [_mediaObject removeObserver:self forKeyPath:@"thumbnailTimeouted"];
+        [_mediaObject removeObserver:self forKeyPath:@"unread"];
         [_mediaObject didHide];
 
         _mediaObject = mediaObject;
@@ -51,6 +52,7 @@
         [_mediaObject addObserver:self forKeyPath:@"fileSizeInBytes" options:0 context:nil];
         [_mediaObject addObserver:self forKeyPath:@"title" options:0 context:nil];
         [_mediaObject addObserver:self forKeyPath:@"thumbnailTimeouted" options:0 context:nil];
+        [_mediaObject addObserver:self forKeyPath:@"unread" options:0 context:nil];
         [_mediaObject willDisplay];
     }