Pārlūkot izejas kodu

Plex: display a correct title in the navigation bar

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Pierre SAGASPE 11 gadi atpakaļ
vecāks
revīzija
c5664a01d4

+ 1 - 1
Sources/VLCLocalPlexFolderListViewController.m

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

+ 2 - 0
Sources/VLCPlexParser.m

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