Skip to content

Commit

Permalink
Merge pull request #558 from wutschel/albumview
Browse files Browse the repository at this point in the history
Bugfix: Show correct title in fullscreen album view
Bugfix: Show correct albumartist in album view
  • Loading branch information
kambala-decapitator committed Jan 16, 2022
2 parents 3ce733d + e649dfc commit d9978c9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
21 changes: 14 additions & 7 deletions XBMC Remote/AppDelegate.m
Expand Up @@ -1246,6 +1246,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"rating",
@"playcount",
@"artist",
@"albumartist",
@"albumid",
@"file",
@"fanart"]
Expand Down Expand Up @@ -1343,6 +1344,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"rating",
@"playcount",
@"artist",
@"albumartist",
@"albumid",
@"file",
@"fanart"]
Expand All @@ -1364,6 +1366,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"rating",
@"playcount",
@"artist",
@"albumartist",
@"albumid",
@"file",
@"fanart"]
Expand All @@ -1385,6 +1388,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"rating",
@"playcount",
@"artist",
@"albumartist",
@"albumid",
@"file",
@"fanart"]
Expand Down Expand Up @@ -1472,7 +1476,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"playlistid": @0,
@"row9": @"songid",
@"row10": @"file",
@"row11": @"artist"
@"row11": @"albumartist"
},

@{
Expand Down Expand Up @@ -1539,7 +1543,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"playlistid": @0,
@"row9": @"songid",
@"row10": @"file",
@"row11": @"artist"
@"row11": @"albumartist"
},

@{},
Expand All @@ -1557,7 +1561,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"playlistid": @0,
@"row9": @"songid",
@"row10": @"file",
@"row11": @"artist"
@"row11": @"albumartist"
},

@{},
Expand All @@ -1575,7 +1579,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"playlistid": @0,
@"row9": @"songid",
@"row10": @"file",
@"row11": @"artist"
@"row11": @"albumartist"
},

@{},
Expand Down Expand Up @@ -1711,6 +1715,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"rating",
@"playcount",
@"artist",
@"albumartist",
@"albumid",
@"file",
@"fanart"]
Expand All @@ -1730,6 +1735,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"rating",
@"playcount",
@"artist",
@"albumartist",
@"albumid",
@"file",
@"fanart"],
Expand Down Expand Up @@ -1793,7 +1799,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"playlistid": @0,
@"row9": @"songid",
@"row10": @"file",
@"row11": @"artist"
@"row11": @"albumartist"
},

@{
Expand All @@ -1809,7 +1815,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"playlistid": @0,
@"row9": @"songid",
@"row10": @"file",
@"row11": @"artist"
@"row11": @"albumartist"
},

@{},
Expand Down Expand Up @@ -1922,6 +1928,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"rating",
@"playcount",
@"artist",
@"albumartist",
@"albumid",
@"file",
@"fanart"]
Expand Down Expand Up @@ -1957,7 +1964,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
@"playlistid": @0,
@"row9": @"songid",
@"row10": @"file",
@"row11": @"artist"
@"row11": @"albumartist"
}
];

Expand Down
16 changes: 10 additions & 6 deletions XBMC Remote/DetailViewController.m
Expand Up @@ -1142,7 +1142,7 @@ - (void)viewChild:(NSIndexPath*)indexPath item:(NSDictionary*)item displayPoint:
nil], @"parameters",
parameters[@"disableFilterParameter"], @"disableFilterParameter",
libraryRowHeight, @"rowHeight", libraryThumbWidth, @"thumbWidth",
item[@"label"], @"label",
parameters[@"label"], @"label",
[NSDictionary dictionaryWithDictionary:parameters[@"itemSizes"]], @"itemSizes",
[NSString stringWithFormat:@"%d", [parameters[@"FrodoExtraArt"] boolValue]], @"FrodoExtraArt",
[NSString stringWithFormat:@"%d", [parameters[@"enableLibraryCache"] boolValue]], @"enableLibraryCache",
Expand All @@ -1166,6 +1166,7 @@ - (void)viewChild:(NSIndexPath*)indexPath item:(NSDictionary*)item displayPoint:
if (parameters[@"parameters"][@"albumartistsonly"]) {
newParameters[0][@"albumartistsonly"] = parameters[@"parameters"][@"albumartistsonly"];
}
MenuItem.subItem.mainLabel = item[@"label"];
mainMenu *newMenuItem = [MenuItem.subItem copy];
[[newMenuItem mainParameters] replaceObjectAtIndex:choosedTab withObject:newParameters];
newMenuItem.chooseTab = choosedTab;
Expand Down Expand Up @@ -1214,11 +1215,12 @@ - (void)viewChild:(NSIndexPath*)indexPath item:(NSDictionary*)item displayPoint:
parameters[@"parameters"][@"media"], @"media",
parameters[@"parameters"][@"sort"], @"sort",
parameters[@"parameters"][@"file_properties"], @"file_properties",
nil], @"parameters", item[@"label"], @"label", @"nocover_filemode", @"defaultThumb", filemodeRowHeight, @"rowHeight", filemodeThumbWidth, @"thumbWidth", @"icon_song", @"fileThumb",
nil], @"parameters", parameters[@"label"], @"label", @"nocover_filemode", @"defaultThumb", filemodeRowHeight, @"rowHeight", filemodeThumbWidth, @"thumbWidth", @"icon_song", @"fileThumb",
[NSDictionary dictionaryWithDictionary:parameters[@"itemSizes"]], @"itemSizes",
[NSString stringWithFormat:@"%d", [parameters[@"enableCollectionView"] boolValue]], @"enableCollectionView",
parameters[@"disableFilterParameter"], @"disableFilterParameter",
nil];
MenuItem.mainLabel = item[@"label"];
mainMenu *newMenuItem = [MenuItem copy];
[[newMenuItem mainParameters] replaceObjectAtIndex:choosedTab withObject:newParameters];
newMenuItem.chooseTab = choosedTab;
Expand Down Expand Up @@ -1274,14 +1276,15 @@ - (void)viewChild:(NSIndexPath*)indexPath item:(NSDictionary*)item displayPoint:
parameters[@"parameters"][@"media"], @"media",
parameters[@"parameters"][@"sort"], @"sort",
parameters[@"parameters"][@"file_properties"], @"file_properties",
nil], @"parameters", item[@"label"], @"label", @"nocover_filemode", @"defaultThumb", filemodeRowHeight, @"rowHeight", filemodeThumbWidth, @"thumbWidth",
nil], @"parameters", parameters[@"label"], @"label", @"nocover_filemode", @"defaultThumb", filemodeRowHeight, @"rowHeight", filemodeThumbWidth, @"thumbWidth",
[NSDictionary dictionaryWithDictionary:parameters[@"itemSizes"]], @"itemSizes",
[NSString stringWithFormat:@"%d", [parameters[@"enableCollectionView"] boolValue]], @"enableCollectionView",
parameters[@"disableFilterParameter"], @"disableFilterParameter",
nil];
if ([item[@"family"] isEqualToString:@"sectionid"] || [item[@"family"] isEqualToString:@"categoryid"]) {
newParameters[0][@"level"] = @"expert";
}
MenuItem.subItem.mainLabel = item[@"label"];
mainMenu *newMenuItem = [MenuItem.subItem copy];
[[newMenuItem mainParameters] replaceObjectAtIndex:choosedTab withObject:newParameters];
newMenuItem.chooseTab = choosedTab;
Expand Down Expand Up @@ -2600,7 +2603,7 @@ - (UIView*)tableView:(UITableView*)tableView viewForHeaderInSection:(NSInteger)s
artist.font = [UIFont systemFontOfSize:artistFontSize];
artist.adjustsFontSizeToFitWidth = YES;
artist.minimumScaleFactor = 9.0 / artistFontSize;
artist.text = item[@"genre"];
artist.text = [Utilities getStringFromItem:item[@"albumartist"]];
[albumDetailView addSubview:artist];

albumLabel.backgroundColor = UIColor.clearColor;
Expand Down Expand Up @@ -3679,12 +3682,13 @@ - (void)exploreItem:(NSDictionary*)item {
mutableProperties, @"file_properties",
nil], @"parameters",
libraryRowHeight, @"rowHeight", libraryThumbWidth, @"thumbWidth",
item[@"label"], @"label", @"nocover_filemode", @"defaultThumb", filemodeRowHeight, @"rowHeight", filemodeThumbWidth, @"thumbWidth",
parameters[@"label"], @"label", @"nocover_filemode", @"defaultThumb", filemodeRowHeight, @"rowHeight", filemodeThumbWidth, @"thumbWidth",
[NSDictionary dictionaryWithDictionary:parameters[@"itemSizes"]], @"itemSizes",
[NSString stringWithFormat:@"%d", [parameters[@"enableCollectionView"] boolValue]], @"enableCollectionView",
@"Files.GetDirectory", @"exploreCommand",
parameters[@"disableFilterParameter"], @"disableFilterParameter",
nil];
MenuItem.subItem.mainLabel = item[@"label"];
mainMenu *newMenuItem = [MenuItem.subItem copy];
[[newMenuItem mainParameters] replaceObjectAtIndex:choosedTab withObject:newParameters];
newMenuItem.chooseTab = choosedTab;
Expand Down Expand Up @@ -4987,7 +4991,7 @@ - (void)displayData {
numResults = (int)self.richResults.count;
NSDictionary *parameters = [Utilities indexKeyedDictionaryFromArray:[self.detailItem mainParameters][choosedTab]];

NSString *labelText = parameters[@"label"];
NSString *labelText = [self.detailItem mainLabel];
if (@available(iOS 11.0, *)) {
self.navigationItem.backButtonTitle = labelText;
if (!albumView) {
Expand Down

0 comments on commit d9978c9

Please sign in to comment.