Commit 9b53ce8b authored by Carola Nitz's avatar Carola Nitz

VLCFullscreenMovieTVViewController: fix not parsing Metadata correctly on tvOS

closes #334
parent 2848a7dd
......@@ -16,6 +16,7 @@
#import "VLCHTTPUploaderController.h"
#import "VLCSiriRemoteGestureRecognizer.h"
#import "VLCNetworkImageView.h"
#import "VLCMetaData.h"
typedef NS_ENUM(NSInteger, VLCPlayerScanState)
{
......@@ -831,28 +832,25 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
}
}
- (void)displayMetadataForPlaybackController:(VLCPlaybackController *)controller
title:(NSString *)title
artwork:(UIImage *)artwork
artist:(NSString *)artist
album:(NSString *)album
audioOnly:(BOOL)audioOnly
- (void)displayMetadataForPlaybackController:(VLCPlaybackController *)controller metadata:(VLCMetaData *)metadata
{
NSString *title = metadata.title;
NSString *artist = metadata.artist;
NSString *albumName = metadata.albumName;
self.titleLabel.text = title;
if (audioOnly) {
if (metadata.isAudioOnly) {
self.audioArtworkImageView.image = nil;
self.audioDescriptionTextView.hidden = YES;
[self stopAudioDescriptionAnimation];
if (artist != nil && album != nil) {
if (artist != nil && albumName != nil) {
[UIView animateWithDuration:.3 animations:^{
self.audioArtistLabel.text = artist;
self.audioArtistLabel.hidden = NO;
self.audioAlbumNameLabel.text = album;
self.audioAlbumNameLabel.text = albumName;
self.audioAlbumNameLabel.hidden = NO;
}];
APLog(@"Audio-only track meta changed, tracing artist '%@' and album '%@'", artist, album);
APLog(@"Audio-only track meta changed, tracing artist '%@' and album '%@'", artist, albumName);
} else if (artist != nil) {
[UIView animateWithDuration:.3 animations:^{
self.audioArtistLabel.text = artist;
......
/*****************************************************************************
* VLC for iOS
*****************************************************************************
* Copyright (c) 2017 VideoLAN. All rights reserved.
* Copyright (c) 2017-2018 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Carola Nitz <caro # videolan.org>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment