...
 
Commits (203)
......@@ -12,7 +12,7 @@
font-weight: 300; }
</style>
<div style="text-align:left; border:solid transparent 1px; padding:0.5em 1em 0.5em 1em; overflow:auto; font-size:20pt; font-family: -apple-system; color:#1f1f1f"; A:link {text-decoration: none; color:#1f1f1f}>
<p align="center">Copyright &copy; 2013-2015 VideoLAN and authors<br /><br />Written by Tobias Conradi and Felix Paul Kühne</a>,<br /><br /> based on VLC for iOS by Felix Paul Kühne</a>, Carola Nitz</a>, Pierre Sagaspe</a>, Marc Etcheverry</a>, Gleb Pinigin</a>, Tobias Conradi</a>, Jean-Baptiste Kempf</a>, Tam&aacute;s T&iacute;m&aacute;r</a>, <br />with additions by Fabio Ritrovato, Riccardo Angius, Diego Fernando Nieto, Martin Storsjö, Luis Fernandes, Sylver Bruneau, Filipe Cabecinhas, Ahmad M. Harb, Ulrich Trampe, Steven Kabbes, Tim Byrne and Winston Weinert.</p>
<p align="center">Copyright &copy; 2013-2016 VideoLAN and authors<br /><br />Written by Tobias Conradi and Felix Paul Kühne</a>,<br /><br /> based on VLC for iOS by Felix Paul Kühne</a>, Carola Nitz</a>, Pierre Sagaspe</a>, Marc Etcheverry</a>, Gleb Pinigin</a>, Tobias Conradi</a>, Jean-Baptiste Kempf</a>, Tam&aacute;s T&iacute;m&aacute;r</a>, <br />with additions by Fabio Ritrovato, Riccardo Angius, Diego Fernando Nieto, Martin Storsjö, Luis Fernandes, Sylver Bruneau, Filipe Cabecinhas, Ahmad M. Harb, Ulrich Trampe, Steven Kabbes, Tim Byrne and Winston Weinert.</p>
<p align="center">We would like to thank the following people for tests, ideas and translations:<br />
Phan Anh, Helena Arndt, Andriy Bandura, Luca Barbato, Ana Coronel, Keiji Costantini, Ludovic Fauvet, Roberto Ferraro, David González, Marián Hikaník, Christian Kosim, Alexander Lakhin, Freya Lindhorst, Adrien Maglo, Fumio Nakayama, Savvas Nesseris, Ilkka Ollakka, Alexandre Perraud, Vincenzo Reale, Anton Regnander, Thomas De Rocker, Mario Siegmann, Yaron Shahrabani, Michał Trzebiatowski, Kaya Zeren, Transifex VLC project team<br />
<br />
......@@ -23,10 +23,10 @@ VideoLAN, VLC and VLC media player are internationally registered trademarks of
<p align="center">VLC for tvOS makes use of the following libraries, fonts and frameworks:</p>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;<b>MobileVLCKit</b>
<br />Copyright &copy; 2007-2015 Pierre d&rsquo;Herbemont, Felix Paul K&uuml;hne, Faustino E. Osuna, et al. - LGPLv2.1 or later
<br />Copyright &copy; 2007-2016 Pierre d&rsquo;Herbemont, Felix Paul K&uuml;hne, Faustino E. Osuna, et al. - LGPLv2.1 or later
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;<b>libvlc</b>
<br />Copyright &copy; 1996-2015 VideoLAN and VLC Authors - LGPLv2.1 or later
<br />Copyright &copy; 1996-2016 VideoLAN and VLC Authors - LGPLv2.1 or later
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;<b>Box iOS SDK v2</b>
<br />Copyright &copy; 2014, Box, Inc. - Apache 2 License
......@@ -74,7 +74,7 @@ Copyright &copy; 2012-2015 Bit Stadium GmbH - MIT License<br />
<br />Copyright &copy; 2000-2015 the libav developers - LGPLv2.1 or later
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;<b>liBDSM</b>
<br />Copyright &copy; 2014-2015 VideoLabs SAS and contributors - LGPLv2.1 or later
<br />Copyright &copy; 2014-2016 VideoLabs SAS and contributors - LGPLv2.1 or later
<br /><br />
&nbsp;&nbsp;&nbsp;&nbsp;<b>libdvbpsi</b>
<br />Copyright &copy; 2001-2015 VideoLAN and authors - LGPLv2.1 or later
......
......@@ -51,7 +51,9 @@
kVLCSettingPlaybackForwardSkipLength : kVLCSettingPlaybackForwardSkipLengthDefaultValue,
kVLCSettingPlaybackBackwardSkipLength : kVLCSettingPlaybackBackwardSkipLengthDefaultValue,
kVLCSettingFTPTextEncoding : kVLCSettingFTPTextEncodingDefaultValue,
kVLCSettingWiFiSharingIPv6 : kVLCSettingWiFiSharingIPv6DefaultValue};
kVLCSettingWiFiSharingIPv6 : kVLCSettingWiFiSharingIPv6DefaultValue,
kVLCAutomaticallyPlayNextItem : @(YES),
kVLCSettingDownloadArtwork : @(YES)};
[defaults registerDefaults:appDefaults];
}
......
......@@ -17,11 +17,13 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>1.0.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>100.6</string>
<string>107.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......
......@@ -110,8 +110,11 @@
trackCell.selectionMarkerVisible = isSelected;
NSDictionary *description = self.mediaPlayer.titleDescriptions[row];
NSString *tileName = [NSString stringWithFormat:@"%@ (%@)", description[VLCTitleDescriptionName], [[VLCTime timeWithNumber:description[VLCTitleDescriptionDuration]] stringValue]];
trackCell.titleLabel.text = tileName;
NSString *title = description[VLCTitleDescriptionName];
if (title == nil)
title = [NSString stringWithFormat:@"%@ %li", NSLocalizedString(@"TITLE", nil), row];
NSString *titleName = [NSString stringWithFormat:@"%@ (%@)", title, [[VLCTime timeWithNumber:description[VLCTitleDescriptionDuration]] stringValue]];
trackCell.titleLabel.text = titleName;
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
......@@ -138,9 +141,15 @@
BOOL isSelected = player.currentChapterIndex == row;
trackCell.selectionMarkerVisible = isSelected;
NSDictionary *description = [player chapterDescriptionsOfTitle:player.currentTitleIndex][row];
NSString *chapterTitle = [NSString stringWithFormat:@"%@ (%@)", description[VLCChapterDescriptionName], [[VLCTime timeWithNumber:description[VLCChapterDescriptionDuration]] stringValue]];
trackCell.titleLabel.text = chapterTitle;
NSArray *chapterDescriptions = [player chapterDescriptionsOfTitle:player.currentTitleIndex];
if (row < chapterDescriptions.count) {
NSDictionary *description = chapterDescriptions[row];
NSString *chapter = description[VLCChapterDescriptionName];
if (chapter == nil)
chapter = [NSString stringWithFormat:@"%@ %li", NSLocalizedString(@"CHAPTER", nil), row];
NSString *chapterTitle = [NSString stringWithFormat:@"%@ (%@)", chapter, [[VLCTime timeWithNumber:description[VLCChapterDescriptionDuration]] stringValue]];
trackCell.titleLabel.text = chapterTitle;
}
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
......
......@@ -11,7 +11,12 @@
#import "VLCPlaybackInfoPanelTVViewController.h"
@interface VLCPlaybackInfoRateTVViewController : VLCPlaybackInfoPanelTVViewController
@property (nonatomic, weak) IBOutlet UISegmentedControl *segmentedControl;
- (IBAction)segmentedControlChanged:(UISegmentedControl *)sender;
@interface VLCPlaybackInfoPlaybackTVViewController : VLCPlaybackInfoPanelTVViewController
@property (nonatomic, weak) IBOutlet UISegmentedControl *rateControl;
@property (nonatomic, weak) IBOutlet UILabel *rateLabel;
@property (nonatomic, weak) IBOutlet UISegmentedControl *repeatControl;
@property (nonatomic, weak) IBOutlet UILabel *repeatLabel;
- (IBAction)rateControlChanged:(UISegmentedControl *)sender;
- (IBAction)repeatControlChanged:(UISegmentedControl *)sender;
@end
......@@ -9,26 +9,26 @@
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
#import "VLCPlaybackInfoRateTVViewController.h"
@interface VLCPlaybackInfoRateTVViewController ()
#import "VLCPlaybackInfoPlaybackTVViewController.h"
@interface VLCPlaybackInfoPlaybackTVViewController ()
@property (nonatomic) NSArray<NSNumber*> *possibleRates;
@end
@implementation VLCPlaybackInfoRateTVViewController
@implementation VLCPlaybackInfoPlaybackTVViewController
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.title = NSLocalizedString(@"PLAYBACK_SPEED", nil);
self.title = NSLocalizedString(@"PLAYBACK", nil);
}
return self;
}
- (CGSize)preferredContentSize
{
return CGSizeMake(CGRectGetWidth(self.view.bounds), 100);
return CGSizeMake(CGRectGetWidth(self.view.bounds), 200);
}
+ (BOOL)shouldBeVisibleForPlaybackController:(VLCPlaybackController *)vpc
......@@ -55,22 +55,36 @@
formatter.maximumFractionDigits = 2;
formatter.minimumFractionDigits = 2;
UISegmentedControl *segmentedControl = self.segmentedControl;
[segmentedControl removeAllSegments];
UISegmentedControl *rateControl = self.rateControl;
[rateControl removeAllSegments];
[self.possibleRates enumerateObjectsUsingBlock:^(NSNumber * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
NSString *title = [formatter stringFromNumber:obj];
[segmentedControl insertSegmentWithTitle:title atIndex:idx animated:NO];
[rateControl insertSegmentWithTitle:title atIndex:idx animated:NO];
}];
self.rateLabel.text = NSLocalizedString(@"PLAYBACK_SPEED", nil);
UISegmentedControl *repeatControl = self.repeatControl;
[repeatControl removeAllSegments];
[repeatControl insertSegmentWithTitle:NSLocalizedString(@"REPEAT_DISABLED", nil)
atIndex:0 animated:NO];
[repeatControl insertSegmentWithTitle:NSLocalizedString(@"REPEAT_SINGLE", nil)
atIndex:1 animated:NO];
[repeatControl insertSegmentWithTitle:NSLocalizedString(@"REPEAT_FOLDER", nil)
atIndex:2 animated:NO];
self.repeatLabel.text = NSLocalizedString(@"REPEAT_MODE", nil);
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self updateSegmentedControl];
[self updateRateControl];
[self updateRepeatControl];
}
- (void)updateSegmentedControl
- (void)updateRateControl
{
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
float currentRate = vpc.playbackRate;
......@@ -78,14 +92,54 @@
NSInteger currentIndex = [self.possibleRates indexOfObjectPassingTest:^BOOL(NSNumber * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
return ABS(obj.floatValue-currentRate)<0.2;
}];
self.segmentedControl.selectedSegmentIndex = currentIndex;
self.segmentedControl.enabled = vpc.mediaPlayer.isSeekable;
UISegmentedControl *rateControl = self.rateControl;
rateControl.selectedSegmentIndex = currentIndex;
rateControl.enabled = vpc.mediaPlayer.isSeekable;
}
- (IBAction)segmentedControlChanged:(UISegmentedControl *)sender
- (IBAction)rateControlChanged:(UISegmentedControl *)sender
{
float newRate = self.possibleRates[sender.selectedSegmentIndex].floatValue;
[VLCPlaybackController sharedInstance].playbackRate = newRate;
}
- (void)updateRepeatControl
{
NSUInteger selectedIndex;
VLCRepeatMode repeatMode = [VLCPlaybackController sharedInstance].repeatMode;
switch (repeatMode) {
case VLCRepeatCurrentItem:
selectedIndex = 1;
break;
case VLCRepeatAllItems:
selectedIndex = 2;
break;
case VLCDoNotRepeat:
default:
selectedIndex = 0;
break;
}
self.repeatControl.selectedSegmentIndex = selectedIndex;
}
-(IBAction)repeatControlChanged:(UISegmentedControl *)sender
{
VLCRepeatMode repeatMode;
switch (sender.selectedSegmentIndex) {
case 1:
repeatMode = VLCRepeatCurrentItem;
break;
case 2:
repeatMode = VLCRepeatAllItems;
break;
case 0:
default:
repeatMode = VLCDoNotRepeat;
break;
}
[VLCPlaybackController sharedInstance].repeatMode = repeatMode;
}
@end
......@@ -10,7 +10,7 @@
*****************************************************************************/
#import "VLCPlaybackInfoTVViewController.h"
#import "VLCPlaybackInfoRateTVViewController.h"
#import "VLCPlaybackInfoPlaybackTVViewController.h"
#import "VLCPlaybackInfoMediaInfoTVViewController.h"
#import "VLCPlaybackInfoTVAnimators.h"
#import "VLCPlaybackInfoTracksTVViewController.h"
......@@ -55,7 +55,7 @@
_allTabViewControllers = @[[[VLCPlaybackInfoChaptersTVViewController alloc] initWithNibName:nil bundle:nil],
[[VLCPlaybackInfoTracksTVViewController alloc] initWithNibName:nil bundle:nil],
[[VLCPlaybackInfoRateTVViewController alloc] initWithNibName:nil bundle:nil],
[[VLCPlaybackInfoPlaybackTVViewController alloc] initWithNibName:nil bundle:nil],
[[VLCPlaybackInfoMediaInfoTVViewController alloc] initWithNibName:nil bundle:nil],
];
......
......@@ -97,27 +97,54 @@
@implementation VLCPlaybackInfoTracksDataSourceAudio
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return self.mediaPlayer.numberOfAudioTracks;
return self.mediaPlayer.numberOfAudioTracks + 1;
}
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath
{
VLCPlaybackInfoTVCollectionViewCell *trackCell = (VLCPlaybackInfoTVCollectionViewCell*)cell;
NSInteger row = indexPath.row;
BOOL isSelected = [self.mediaPlayer.audioTrackIndexes[row] intValue] == self.mediaPlayer.currentAudioTrackIndex;
trackCell.selectionMarkerVisible = isSelected;
NSArray *audioTrackIndexes = self.mediaPlayer.audioTrackIndexes;
NSString *trackName;
trackCell.titleLabel.font = [UIFont boldSystemFontOfSize:29.];
NSString *trackName = self.mediaPlayer.audioTrackNames[row];
if (trackName != nil) {
if ([trackName isEqualToString:@"Disable"])
trackName = NSLocalizedString(@"DISABLE_LABEL", nil);
if (row >= audioTrackIndexes.count) {
if ([[NSUserDefaults standardUserDefaults] boolForKey:kVLCSettingUseSPDIF]) {
trackName = [@"✓ " stringByAppendingString:NSLocalizedString(@"USE_SPDIF", nil)];
trackCell.titleLabel.font = [UIFont boldSystemFontOfSize:29.];
} else
trackName = NSLocalizedString(@"USE_SPDIF", nil);
} else {
BOOL isSelected = [audioTrackIndexes[row] intValue] == self.mediaPlayer.currentAudioTrackIndex;
trackCell.selectionMarkerVisible = isSelected;
trackName = self.mediaPlayer.audioTrackNames[row];
if (trackName != nil) {
if ([trackName isEqualToString:@"Disable"])
trackName = NSLocalizedString(@"DISABLE_LABEL", nil);
}
}
trackCell.titleLabel.text = trackName;
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
self.mediaPlayer.currentAudioTrackIndex = [self.mediaPlayer.audioTrackIndexes[indexPath.row] intValue];
NSArray *audioTrackIndexes = self.mediaPlayer.audioTrackIndexes;
NSInteger row = indexPath.row;
if (row >= audioTrackIndexes.count) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
BOOL bValue = ![defaults boolForKey:kVLCSettingUseSPDIF];
[[VLCPlaybackController sharedInstance].mediaPlayer performSelector:@selector(setPassthroughAudio:) withObject:@(bValue)];
[defaults setBool:bValue forKey:kVLCSettingUseSPDIF];
[defaults synchronize];
/* restart the audio output */
int currentAudioTrackIndex = self.mediaPlayer.currentAudioTrackIndex;
self.mediaPlayer.currentAudioTrackIndex = -1;
self.mediaPlayer.currentAudioTrackIndex = currentAudioTrackIndex;
} else {
self.mediaPlayer.currentAudioTrackIndex = [audioTrackIndexes[row] intValue];
}
[collectionView reloadData];
}
......@@ -128,6 +155,7 @@
{
return self.mediaPlayer.numberOfSubtitlesTracks + 1;
}
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath
{
VLCPlaybackInfoTVCollectionViewCell *trackCell = (VLCPlaybackInfoTVCollectionViewCell*)cell;
......@@ -137,7 +165,7 @@
if (row >= spuTitleIndexes.count) {
trackName = NSLocalizedString(@"DOWNLOAD_SUBS_FROM_OSO", nil);
} else {
BOOL isSelected = [self.mediaPlayer.videoSubTitlesIndexes[row] intValue] == self.mediaPlayer.currentVideoSubTitleIndex;
BOOL isSelected = [spuTitleIndexes[row] intValue] == self.mediaPlayer.currentVideoSubTitleIndex;
trackCell.selectionMarkerVisible = isSelected;
trackName = self.mediaPlayer.videoSubTitlesNames[row];
......
......@@ -59,9 +59,13 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self
selector:@selector(playbackDidStop:)
selector:@selector(playbackDidStop)
name:VLCPlaybackControllerPlaybackDidStop
object:nil];
[center addObserver:self
selector:@selector(playbackDidStop)
name:VLCPlaybackControllerPlaybackDidFail
object:nil];
_movieView.userInteractionEnabled = NO;
......@@ -154,8 +158,6 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
[vpc recoverDisplayedMetadata];
vpc.videoOutputView = nil;
vpc.videoOutputView = self.movieView;
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)viewWillDisappear:(BOOL)animated
......@@ -177,6 +179,7 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
[fileManager removeItemAtPath:tempSubsDirPath error:nil];
[super viewWillDisappear:animated];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (BOOL)canBecomeFirstResponder
......@@ -619,6 +622,11 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
{
if (self.bottomOverlayView.alpha == 0.0) {
[self animatePlaybackControlsToVisibility:YES];
// We need an additional update here because in some cases (e.g. when the playback was
// paused or started buffering), the transport bar is only updated when it is visible
// and if the playback is interrupted, no updates of the transport bar are triggered.
[self updateTransportBarPosition];
}
[self hidePlaybackControlsIfNeededAfterDelay];
}
......@@ -666,7 +674,7 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
self.audioView.hidden = YES;
}
- (void)playbackDidStop:(NSNotification *)aNotification
- (void)playbackDidStop
{
[self dismissViewControllerAnimated:YES completion:nil];
}
......@@ -681,6 +689,11 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
[self updateActivityIndicatorForState:currentState];
if (controller.isPlaying) {
// we sometimes don't set the vout correctly if playback stops and restarts without dismising and redisplaying the VC
// hence, manually reset the vout container here if it doesn't have sufficient children
if (self.movieView.subviews.count < 2) {
controller.videoOutputView = self.movieView;
}
[self hidePlaybackControlsIfNeededAfterDelay];
} else {
[self showPlaybackControlsIfNeededForUserInteraction];
......@@ -772,17 +785,23 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
#pragma mark -
- (void)playbackPositionUpdated:(VLCPlaybackController *)controller
- (void)updateTransportBarPosition
{
VLCPlaybackController *controller = [VLCPlaybackController sharedInstance];
VLCMediaPlayer *mediaPlayer = controller.mediaPlayer;
VLCTransportBar *transportBar = self.transportBar;
transportBar.remainingTimeLabel.text = [[mediaPlayer remainingTime] stringValue];
transportBar.markerTimeLabel.text = [[mediaPlayer time] stringValue];
transportBar.playbackFraction = mediaPlayer.position;
}
- (void)playbackPositionUpdated:(VLCPlaybackController *)controller
{
// FIXME: hard coded state since the state in mediaPlayer is incorrectly still buffering
[self updateActivityIndicatorForState:VLCMediaPlayerStatePlaying];
if (self.bottomOverlayView.alpha != 0.0) {
VLCTransportBar *transportBar = self.transportBar;
transportBar.remainingTimeLabel.text = [[mediaPlayer remainingTime] stringValue];
transportBar.markerTimeLabel.text = [[mediaPlayer time] stringValue];
transportBar.playbackFraction = mediaPlayer.position;
[self updateTransportBarPosition];
}
}
......
......@@ -42,6 +42,16 @@
<real>4</real>
</array>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>AutomaticallyPlayNextItem</string>
<key>Title</key>
<string>SETTINGS_NETWORK_PLAY_ALL</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
......@@ -418,6 +428,22 @@
<key>DefaultValue</key>
<integer>5</integer>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>SETTINGS_ARTWORK</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>SETTINGS_DOWNLOAD_ARTWORK</string>
<key>Key</key>
<string>download-artwork</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
......
......@@ -418,6 +418,22 @@
<key>DefaultValue</key>
<integer>5</integer>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>SETTINGS_ARTWORK</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>SETTINGS_DOWNLOAD_ARTWORK</string>
<key>Key</key>
<string>download-artwork</string>
<key>DefaultValue</key>
<true/>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
......@@ -14,8 +14,10 @@
@interface VLCDeletionCapableViewController : UIViewController
@property (nonatomic, weak) IBOutlet UIView *deleteHintView;
@property (nonatomic, weak, nullable) IBOutlet UIView *deleteHintView;
@property (nonatomic, readonly, nullable) NSIndexPath *indexPathToDelete;
@property (nonatomic, readonly, nullable) NSString *itemToDelete;
- (void)deleteFileAtIndex:(NSIndexPath * _Nullable)indexPathToDelete;
@end
......@@ -70,7 +70,9 @@
- (void)deleteFileAtIndex:(NSIndexPath *)indexPathToDelete
{
// NO-OP, implemented by subclass
[self.hintTimer invalidate];
self.hintTimer = nil;
[self animateDeletHintToVisibility:NO];
}
- (void)animateDeletHintToVisibility:(BOOL)visible
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="10089" systemVersion="15C50" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10072.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCFullscreenMovieTVViewController">
......@@ -110,14 +110,17 @@
<rect key="frame" x="0.0" y="0.0" width="1920" height="886"/>
<color key="backgroundColor" white="0.0" alpha="0.20000000000000001" colorSpace="calibratedWhite"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Please wait" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yaX-qU-D4t">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Please wait" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" highlighted="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yaX-qU-D4t">
<rect key="frame" x="815" y="506" width="289" height="69"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<color key="textColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="calibratedRGB"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
<color key="shadowColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<size key="shadowOffset" width="0.0" height="2"/>
</label>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="UcH-Yc-Sd0">
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" misplaced="YES" hidesWhenStopped="YES" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="UcH-Yc-Sd0">
<rect key="frame" x="928" y="583" width="64" height="64"/>
<color key="tintColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
</activityIndicatorView>
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SzB-KN-vRr" customClass="VLCFrostedGlasView">
<rect key="frame" x="0.0" y="886" width="1920" height="194"/>
......
......@@ -158,9 +158,12 @@
return nil;
}
NSString *ret;
NSString *ret = nil;
@synchronized(_recentURLs) {
ret = _recentURLs[indexPathToDelete.item];
NSInteger index = indexPathToDelete.item;
if (index < _recentURLs.count) {
ret = _recentURLs[index];
}
}
return ret;
}
......@@ -171,7 +174,7 @@
UITableViewCell *focusedCell = [self.previouslyPlayedStreamsTableView cellForRowAtIndexPath:self.currentlyFocusedIndexPath];
if (editing) {
[focusedCell.layer addAnimation:[CAAnimation vlc_wiggleAnimation]
[focusedCell.layer addAnimation:[CAAnimation vlc_wiggleAnimationwithSoftMode:YES]
forKey:VLCWiggleAnimationKey];
} else {
[focusedCell.layer removeAnimationForKey:VLCWiggleAnimationKey];
......@@ -180,6 +183,7 @@
- (void)deleteFileAtIndex:(NSIndexPath *)indexPathToDelete
{
[super deleteFileAtIndex:indexPathToDelete];
if (!indexPathToDelete) {
return;
}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCPlaybackInfoPlaybackTVViewController">
<connections>
<outlet property="preferredFocusedView" destination="a34-9y-ZcI" id="Xa7-Zq-uyz"/>
<outlet property="rateControl" destination="a34-9y-ZcI" id="vdn-Ol-Wku"/>
<outlet property="rateLabel" destination="Rae-ci-cH1" id="6lL-fK-x8a"/>
<outlet property="repeatControl" destination="LT2-wc-v4T" id="OjM-05-0XT"/>
<outlet property="repeatLabel" destination="IrS-i0-38G" id="06Y-eM-986"/>
<outlet property="view" destination="vgW-9U-IlZ" id="527-h1-jOO"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" placeholderIntrinsicWidth="1920" placeholderIntrinsicHeight="100" id="vgW-9U-IlZ">
<rect key="frame" x="0.0" y="0.0" width="1920" height="256"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" axis="vertical" distribution="fillProportionally" alignment="center" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="XnY-7I-cWB">
<rect key="frame" x="0.0" y="20" width="1920" height="158"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xtb-Ho-wRT">
<rect key="frame" x="693" y="0.0" width="535" height="69"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750" text="Playback rate" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rae-ci-cH1">
<rect key="frame" x="-91" y="12" width="232" height="46"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<segmentedControl opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="a34-9y-ZcI" userLabel="Rate Control">
<rect key="frame" x="161" y="0.0" width="354" height="70"/>
<color key="backgroundColor" white="0.0" alpha="0.10000000000000001" colorSpace="calibratedWhite"/>
<segments>
<segment title="First"/>
<segment title="Second"/>
</segments>
<connections>
<action selector="rateControlChanged:" destination="-1" eventType="valueChanged" id="IS1-73-uYu"/>
</connections>
</segmentedControl>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="a34-9y-ZcI" secondAttribute="bottom" id="DLD-cb-7Ie"/>
<constraint firstItem="Rae-ci-cH1" firstAttribute="centerY" secondItem="a34-9y-ZcI" secondAttribute="centerY" id="H3u-bt-GQU"/>
<constraint firstItem="Rae-ci-cH1" firstAttribute="leading" secondItem="xtb-Ho-wRT" secondAttribute="leading" priority="200" constant="20" id="MRB-u0-9Oq"/>
<constraint firstAttribute="trailing" secondItem="a34-9y-ZcI" secondAttribute="trailing" priority="500" constant="20" symbolic="YES" id="XpK-y3-ikU"/>
<constraint firstItem="a34-9y-ZcI" firstAttribute="top" secondItem="xtb-Ho-wRT" secondAttribute="top" id="Yv9-EY-Mae"/>
<constraint firstItem="a34-9y-ZcI" firstAttribute="leading" secondItem="Rae-ci-cH1" secondAttribute="trailing" constant="20" id="xvy-Tv-Lch"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BkR-2u-SR9">
<rect key="frame" x="693" y="89" width="535" height="69"/>
<subviews>
<segmentedControl opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="LT2-wc-v4T" userLabel="Repeat Control">
<rect key="frame" x="161" y="0.0" width="354" height="70"/>
<color key="backgroundColor" white="0.0" alpha="0.10000000000000001" colorSpace="calibratedWhite"/>
<segments>
<segment title="First"/>
<segment title="Second"/>
</segments>
<connections>
<action selector="repeatControlChanged:" destination="-1" eventType="valueChanged" id="o1Y-Hy-I8D"/>
</connections>
</segmentedControl>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750" text="Repeat" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IrS-i0-38G">
<rect key="frame" x="20" y="12" width="121" height="46"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="IrS-i0-38G" firstAttribute="leading" secondItem="BkR-2u-SR9" secondAttribute="leading" priority="200" constant="20" id="B7k-6N-0ko"/>
<constraint firstAttribute="bottom" secondItem="LT2-wc-v4T" secondAttribute="bottom" id="HUc-mt-yf9"/>
<constraint firstItem="IrS-i0-38G" firstAttribute="centerY" secondItem="LT2-wc-v4T" secondAttribute="centerY" id="K1r-bM-tLv"/>
<constraint firstItem="LT2-wc-v4T" firstAttribute="leading" secondItem="IrS-i0-38G" secondAttribute="trailing" constant="20" id="Qbm-kO-Yal"/>
<constraint firstAttribute="trailing" secondItem="LT2-wc-v4T" secondAttribute="trailing" priority="500" constant="20" symbolic="YES" id="RvR-wy-oVN"/>
<constraint firstItem="LT2-wc-v4T" firstAttribute="top" secondItem="BkR-2u-SR9" secondAttribute="top" id="mo7-kq-DgH"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="IrS-i0-38G" firstAttribute="trailing" secondItem="Rae-ci-cH1" secondAttribute="trailing" id="cUn-w6-TMI"/>
</constraints>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="XnY-7I-cWB" secondAttribute="bottom" priority="750" constant="20" id="3uy-JU-177"/>
<constraint firstItem="XnY-7I-cWB" firstAttribute="top" secondItem="vgW-9U-IlZ" secondAttribute="top" constant="20" id="5Wz-2L-dur"/>
<constraint firstAttribute="trailing" secondItem="XnY-7I-cWB" secondAttribute="trailing" id="YD5-wc-TLW"/>
<constraint firstItem="XnY-7I-cWB" firstAttribute="leading" secondItem="vgW-9U-IlZ" secondAttribute="leading" id="vVf-cu-fWD"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="94" y="-1683"/>
</view>
</objects>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9527.1" systemVersion="15B42" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9525.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCPlaybackInfoRateTVViewController">
<connections>
<outlet property="preferredFocusedView" destination="a34-9y-ZcI" id="Xa7-Zq-uyz"/>
<outlet property="segmentedControl" destination="a34-9y-ZcI" id="ob8-jh-Cvo"/>
<outlet property="view" destination="vgW-9U-IlZ" id="527-h1-jOO"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" placeholderIntrinsicWidth="1920" placeholderIntrinsicHeight="100" id="vgW-9U-IlZ">
<rect key="frame" x="0.0" y="0.0" width="1920" height="100"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="a34-9y-ZcI">
<rect key="frame" x="783" y="16" width="354" height="70"/>
<color key="backgroundColor" white="0.0" alpha="0.10000000000000001" colorSpace="calibratedWhite"/>
<segments>
<segment title="First"/>
<segment title="Second"/>
</segments>
<connections>
<action selector="segmentedControlChanged:" destination="-1" eventType="valueChanged" id="rh8-Qo-MRd"/>
</connections>
</segmentedControl>
</subviews>
<constraints>
<constraint firstItem="a34-9y-ZcI" firstAttribute="top" relation="greaterThanOrEqual" secondItem="vgW-9U-IlZ" secondAttribute="top" id="9aM-8g-ySI"/>
<constraint firstItem="a34-9y-ZcI" firstAttribute="centerX" secondItem="vgW-9U-IlZ" secondAttribute="centerX" id="FTw-3L-I11"/>
<constraint firstItem="a34-9y-ZcI" firstAttribute="centerX" secondItem="vgW-9U-IlZ" secondAttribute="centerX" id="cNR-R4-nbS"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="a34-9y-ZcI" secondAttribute="bottom" id="jlh-7n-G5J"/>
<constraint firstItem="a34-9y-ZcI" firstAttribute="centerY" secondItem="vgW-9U-IlZ" secondAttribute="centerY" id="qK1-gY-HdN"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="94" y="-1761.5"/>
</view>
</objects>
</document>
......@@ -21,4 +21,6 @@ extern NSString *const VLCRemoteBrowsingTVCellIdentifier;
@property (nonatomic, weak) IBOutlet UILabel *titleLabel;
@property (nonatomic, weak) IBOutlet UILabel *subtitleLabel;
@property (nonatomic) BOOL downloadArtwork;
@end
......@@ -46,6 +46,7 @@ NSString *const VLCRemoteBrowsingTVCellIdentifier = @"VLCRemoteBrowsingTVCell";
[self.thumbnailImageView cancelLoading];
self.title = nil;
self.subtitle = nil;
self.downloadArtwork = NO;
}
- (void)setCouldBeAudioOnlyMedia:(BOOL)couldBeAudioOnlyMedia
......@@ -64,7 +65,7 @@ NSString *const VLCRemoteBrowsingTVCellIdentifier = @"VLCRemoteBrowsingTVCell";
[self.thumbnailImageView setImageWithURL:thumbnailURL];
} else {
NSString *searchString = self.title;
if (searchString != nil && !_isDirectory) {
if (searchString != nil && !_isDirectory && _downloadArtwork) {
[_artworkProvider searchForArtworkForVideoRelatedString:searchString];
}
}
......@@ -83,7 +84,7 @@ NSString *const VLCRemoteBrowsingTVCellIdentifier = @"VLCRemoteBrowsingTVCell";
- (void)setTitle:(NSString *)title
{
self.titleLabel.text = title;
if (title != nil && !_isDirectory) {
if (title != nil && !_isDirectory && _downloadArtwork) {
[_artworkProvider searchForArtworkForVideoRelatedString:title];
}
}
......
......@@ -222,9 +222,12 @@
return nil;
}
NSString *ret;
NSString *ret = nil;
@synchronized(_discoveredFiles) {
ret = _discoveredFiles[indexPathToDelete.item];
NSInteger index = indexPathToDelete.item;
if (index < _discoveredFiles.count) {
ret = _discoveredFiles[index];
}
}
return ret;
}
......@@ -235,7 +238,7 @@
UICollectionViewCell *focusedCell = [self.cachedMediaCollectionView cellForItemAtIndexPath:self.currentlyFocusedIndexPath];
if (editing) {
[focusedCell.layer addAnimation:[CAAnimation vlc_wiggleAnimation]
[focusedCell.layer addAnimation:[CAAnimation vlc_wiggleAnimationwithSoftMode:NO]
forKey:VLCWiggleAnimationKey];
} else {
[focusedCell.layer removeAnimationForKey:VLCWiggleAnimationKey];
......@@ -244,6 +247,7 @@
- (void)deleteFileAtIndex:(NSIndexPath *)indexPathToDelete
{
[super deleteFileAtIndex:indexPathToDelete];
if (!indexPathToDelete) {
return;
}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9531" systemVersion="15B42" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="10089" systemVersion="15C50" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10072.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCRemotePlaybackViewController">
......@@ -66,8 +66,8 @@ http://192.168.1.1</string>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N4Q-4c-bh0">
<rect key="frame" x="762" y="344" width="397" height="75"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
<rect key="frame" x="748" y="344" width="425" height="77"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleCallout"/>
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
<state key="normal" title="Enable Remote Playback"/>
<connections>
......
......@@ -16,6 +16,8 @@
@interface VLCServerBrowsingTVViewController : VLCRemoteBrowsingCollectionViewController <VLCNetworkServerBrowserDelegate>
@property (nonatomic) BOOL downloadArtwork;
- (instancetype)initWithServerBrowser:(id<VLCNetworkServerBrowser>)serverBrowser;
@end
......@@ -19,6 +19,8 @@
@interface VLCServerBrowsingTVViewController ()
{
UILabel *_nothingFoundLabel;
NSIndexPath *_currentFocus;
BOOL _focusChangeAllowed;
}
@property (nonatomic, readonly) id<VLCNetworkServerBrowser>serverBrowser;
@property (nonatomic) VLCServerBrowsingController *browsingController;
......@@ -36,6 +38,11 @@
_browsingController = [[VLCServerBrowsingController alloc] initWithViewController:self serverBrowser:serverBrowser];
self.title = serverBrowser.title;
self.downloadArtwork = [[NSUserDefaults standardUserDefaults] boolForKey:kVLCSettingDownloadArtwork];
_currentFocus = [NSIndexPath indexPathForRow:0 inSection:0];
_focusChangeAllowed = YES;
}
return self;
}
......@@ -128,10 +135,18 @@
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath
{
id<VLCNetworkServerBrowserItem> item = self.serverBrowser.items[indexPath.row];
NSArray *items = self.serverBrowser.items;
NSInteger row = indexPath.row;
if (row < items.count) {
id<VLCNetworkServerBrowserItem> item = items[row];
if ([cell isKindOfClass:[VLCRemoteBrowsingTVCell class]]) {
((VLCRemoteBrowsingTVCell *) cell).downloadArtwork = self.downloadArtwork;
}
if ([cell conformsToProtocol:@protocol(VLCRemoteBrowsingCell)]) {
[self.browsingController configureCell:(id<VLCRemoteBrowsingCell>)cell withItem:item];
if ([cell conformsToProtocol:@protocol(VLCRemoteBrowsingCell)]) {
[self.browsingController configureCell:(id<VLCRemoteBrowsingCell>)cell withItem:item];
}
}
}
......@@ -142,8 +157,31 @@
// would make sence if item came from search which isn't
// currently the case on the TV
const BOOL singlePlayback = NO;
const BOOL singlePlayback = ![[NSUserDefaults standardUserDefaults] boolForKey:kVLCAutomaticallyPlayNextItem];
[self didSelectItem:item index:row singlePlayback:singlePlayback];
}