Browse Source

Plex: display a correct title in the navigation bar

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Pierre SAGASPE 11 years ago
parent
commit
c5664a01d4
2 changed files with 3 additions and 1 deletions
  1. 1 1
      Sources/VLCLocalPlexFolderListViewController.m
  2. 2 0
      Sources/VLCPlexParser.m

+ 1 - 1
Sources/VLCLocalPlexFolderListViewController.m

@@ -84,7 +84,7 @@
     if ([_PlexServerPath isEqualToString:@""])
         titleValue = _PlexServerName;
     else
-        titleValue = [_PlexServerPath lastPathComponent];
+        titleValue = [_mutableObjectList[0] objectForKey:@"libTitle"];
 
     self.title = titleValue;
 

+ 2 - 0
Sources/VLCPlexParser.m

@@ -57,6 +57,8 @@
             [_dicoInfo setObject:[attributeDict objectForKey:@"friendlyName"] forKey:@"libTitle"];
         else if ([attributeDict objectForKey:@"title1"])
             [_dicoInfo setObject:[attributeDict objectForKey:@"title1"] forKey:@"libTitle"];
+        if ([attributeDict objectForKey:@"title2"])
+            [_dicoInfo setObject:[attributeDict objectForKey:@"title2"] forKey:@"libTitle"];
     } else if([elementName isEqualToString:@"Directory"]) {
         [_dicoInfo setObject:@"directory" forKey:@"container"];
         [_dicoInfo setObject:[attributeDict objectForKey:@"key"] forKey:@"key"];