Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc-ios
  • gsoc/GSoC2018/bubu/vlc-ios
  • bubu/vlc-ios
  • chamander/vlc-ios
  • fkuehne/vlc-ios
  • Yakuzzza/vlc-ios
  • nishiths23/vlc-ios
  • alexkusssha/vlc-ios
  • jay18001/vlc-ios
  • hoangduc67/vlc-ios
  • gsoc/gsoc2019/robwayne/vlc-ios
  • groschoppsteven/vlc-ios
  • tguillem/vlc-ios
  • ePirat/vlc-ios
  • cerezo074/vlc-ios
  • edrflt/vlc-ios
  • Zirkovskij/vlc-ios
  • bakroistvan/vlc-ios
  • heidlerjustin/vlc-ios
  • W1ns/vlc-ios
  • karpun.ksv122454/vlc-ios
  • adtrevor/vlc-ios
  • rrangel3584/vlc-ios
  • Ggjgg/vlc-ios
  • tanenyi/vlc-ios
  • tmsblgh/vlc-ios
  • gale4004/vlc-ios
  • abytom/vlc-ios
  • rubendelapena/vlc-ios
  • DanielaRocha6/vlc-ios
  • kuznetsov-m/vlc-ios
  • dcodesuport/vlc-ios
  • gsoc/gsoc2020/swapnanildholg/vlc-ios
  • alexandre-janniaux/vlc-ios
  • zhkzte/vlc-ios
  • elbrujo1987/vlc-ios
  • PJStation/vlc-ios
  • diogo.simao-marques/vlc-ios
  • lalo-azamar/vlc-ios
  • dnicolson/vlc-ios
  • megan30/vlc-ios
  • yreifschneider/vlc-ios
  • pushpinderpalsingh/vlc-ios
  • jfarmer/vlc-ios
  • malekBarkaoui/vlc-ios
  • m/vlc-ios
  • zuzuweasly/vlc-ios
  • beingsparsh/vlc-ios
  • anubhavsingh19/vlc-ios
  • SnailMS/vlc-ios
  • dariustancode/vlc-ios
  • chandan.309kr/vlc-ios
  • umxprime/vlc-ios
  • vlcone/vlc-ios
  • bsidhom/vlc-ios
  • DeveshBisen/vlc-ios
  • denissparrow12/vlc-ios
  • antonianemi/vlc-ios
  • fieldsmonroe433/vlc-ios
  • antonviljoen9/vlc-ios
  • greenscgea/vlc-ios
  • keyseltmelanie/vlc-ios
  • collectionbylawrencejason/vlc-ios
  • aofsurachet1983/vlc-ios
  • archi.fahim/vlc-ios
  • XuanTung95/vlc-ios
  • nasirhemed/vlc-ios
  • ke994780/vlc-ios
  • kiwiren6666/vlc-ios
  • walikelas90/vlc-ios
  • ikeuzochukwu6/vlc-ios
  • NOTAG/vlc-ios
  • tatoonorth418/vlc-ios
  • deutschkiller72/vlc-ios
  • alexnwayne/vlc-ios
  • kiku.masa.mune00/vlc-ios
  • onfire4g05/vlc-ios
  • ass1ngl33y/vlc-ios
  • berrylcm/vlc-ios
  • ugotmjke46/vlc-ios
  • lehmacdj/vlc-ios
  • Prabal/vlc-ios
  • protechq88/vlc-ios
  • KDOT2EAZY/vlc-ios
  • king7532/vlc-ios
  • uniqueunicorn333/vlc-ios
  • Againreallly/vlc-ios
  • mztea928/vlc-ios
  • pabloluna.bella/vlc-ios
  • EshanSingh-ES/vlc-ios
  • arditx02/vlc-ios
  • tomas23prenosil/vlc-ios
  • yonat/vlc-ios
  • whatsupmf09/vlc-ios
  • Perklone/vlc-ios
  • vettrecompetitive/vlc-ios
  • ojaidi.905/vlc-ios
  • reubot/vlc-ios
  • loegue1910/vlc-ios
  • jeffmarshall/vlc-ios
  • pup.ragnarok.1984/vlc-ios
  • aviwad/vlc-ios
  • ashishami2002/vlc-ios
  • Sumou/vlc-ios
  • iampratik/vlc-ios
  • Sliem/vlc-ios
  • Apeng/vlc-ios
  • ibrahimcetin/vlc-ios
  • Aperence/vlc-ios
  • Truls/vlc-ios
  • Nilsjoberl/vlc-ios
  • Naruyoko/vlc-ios
  • borisgolovnev/vlc-ios
  • christianbilodeau/vlc-ios
  • liamjwang/vlc-ios
  • surajeet310/vlc-ios
  • craig_r/vlc-ios
  • labala/vlc-ios
  • arthurnorat/vlc-ios
  • 0xfee1de4d/vlc-ios
  • harlanhaskins/vlc-ios
  • rae/vlc-ios
  • gremlinflat/vlc-ios
  • robbiedeane/vlc-ios
124 results
Show changes
Commits on Source (13)
......@@ -78,16 +78,6 @@
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>MLDecrapifyTitles</string>
<key>Title</key>
<string>SETTINGS_DECRAPIFY</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
......@@ -610,6 +600,32 @@
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>SETTINGS_MEDIA_LIBRARY</string>
</dict>
<dict>
<key>DefaultValue</key>
<integer>0</integer>
<key>Type</key>
<string>IASKButtonSpecifier</string>
<key>Key</key>
<string>forceMediaLibraryRescan</string>
<key>Title</key>
<string>SETTINGS_MEDIA_LIBRARY_RESCAN</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>MLDecrapifyTitles</string>
<key>Title</key>
<string>SETTINGS_DECRAPIFY</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
......
......@@ -10,16 +10,6 @@
<key>Title</key>
<string>SETTINGS_GENERIC_TITLE</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>MLDecrapifyTitles</string>
<key>Title</key>
<string>SETTINGS_DECRAPIFY</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
......@@ -584,6 +574,22 @@
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>SETTINGS_MEDIA_LIBRARY</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>MLDecrapifyTitles</string>
<key>Title</key>
<string>SETTINGS_DECRAPIFY</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
......
......@@ -17,7 +17,6 @@
"SETTINGS_PASSCODE_LOCK" = "Passcode Lock";
"SETTINGS_PASSCODE_LOCK_ALLOWTOUCHID" = "Allow Touch ID for unlock";
"SETTINGS_PASSCODE_LOCK_ALLOWFACEID" = "Allow Face ID for unlock";
"SETTINGS_DECRAPIFY" = "Optimize item names for display";
"SETTINGS_VIDEO_FULLSCREEN" = "Play video in fullscreen";
"SETTINGS_CONTINUE_VIDEO_PLAYBACK" = "Continue video playback";
"SETTINGS_CONTINUE_AUDIO_PLAYBACK" = "Continue audio playback";
......@@ -87,6 +86,10 @@
"SETTINGS_SEND_FEEDBACK" = "Send Feedback";
"SETTINGS_SEND_RATING" = "Please Rate VLC for iOS";
"SETTINGS_MEDIA_LIBRARY" = "Media library";
"SETTINGS_MEDIA_LIBRARY_RESCAN" = "Force VLC to rescan the media library";
"SETTINGS_DECRAPIFY" = "Optimize item names for display";
"SETTINGS_FILE_SYNC" = "File Synchronization";
"SETTINGS_WIFISHARING_IPv6" = "IPv6 support for WiFi Sharing";
"SETTINGS_UNLINK_DROPBOX" = "Unlink from Dropbox";
......
......@@ -68,6 +68,7 @@
"BUTTON_CONTINUE" = "Continue";
"BUTTON_SET" = "Set";
"BUTTON_RESET" = "Reset";
"BUTTON_RESCAN" = "Rescan";
"PRIVATE_PLAYBACK_TOGGLE" = "Private Playback";
"SCAN_SUBTITLE_TOGGLE" = "Scan for Subtitles (http-only)";
......@@ -386,3 +387,7 @@
/* MediaMoreOptionsActionSheet */
"EQUALIZER_CELL_TITLE" = "Equalizer";
"MORE_OPTIONS_HEADER_TITLE" = "Video Options";
/* Settings - Force rescan alert */
"FORCE_RESCAN_TITLE" = "Force media library rescan";
"FORCE_RESCAN_MESSAGE" = "Do you want to force VLC to rescan your media library?\nIt could take some time.";
......@@ -332,6 +332,10 @@ extension MediaLibraryService {
medialib.reload()
}
@objc func forceRescan() {
medialib.forceRescan()
}
@objc func reindexAllMediaForSpotlight() {
media(ofType: .video).forEach { $0.updateCoreSpotlightEntry() }
media(ofType: .audio).forEach { $0.updateCoreSpotlightEntry() }
......
......@@ -51,12 +51,24 @@
self.artworkImage = [media thumbnailImage];
self.isAudioOnly = [media subtype] == VLCMLMediaSubtypeAlbumTrack;
} else { // We're streaming something
self.artworkImage = nil;
self.trackNumber = nil;
self.artist = nil;
self.albumName = nil;
BOOL isDarktheme = PresentationTheme.current == PresentationTheme.darkTheme;
self.artworkImage = isDarktheme ? [UIImage imageNamed:@"song-placeholder-dark"]
: [UIImage imageNamed:@"song-placeholder-white"];
[self fillFromMetaDict:mediaPlayer];
self.title = [[mediaPlayer.media url] lastPathComponent];
}
[self checkIsAudioOnly:mediaPlayer];
if (self.isAudioOnly) {
if (self.artworkImage) {
if (self.artist)
self.title = [self.title stringByAppendingFormat:@" — %@", self.artist];
if (self.albumName)
self.title = [self.title stringByAppendingFormat:@" — %@", self.albumName];
}
if (self.title.length < 1)
self.title = [[mediaPlayer.media url] lastPathComponent];
}
[self updatePlaybackRate:mediaPlayer];
......
......@@ -194,11 +194,12 @@
NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *filePath = [searchPaths[0] stringByAppendingFormat:@"/%@", file.name];
[self loadFile:file intoPath:filePath];
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStarted)])
[self.delegate operationWithProgressInformationStarted];
[self loadFile:file intoPath:[self createPotentialPathFrom:filePath]];
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStarted)])
[self.delegate operationWithProgressInformationStarted];
});
_downloadInProgress = YES;
}
#endif
......@@ -263,8 +264,11 @@
}
CGFloat progress = (CGFloat)bytesReceived / (CGFloat)expectedTotalBytes;
if ([self.delegate respondsToSelector:@selector(currentProgressInformation:)])
[self.delegate currentProgressInformation:progress];
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.delegate respondsToSelector:@selector(currentProgressInformation:)])
[self.delegate currentProgressInformation:progress];
});
};
[[BoxSDK sharedSDK].filesManager downloadFileWithID:file.modelID outputStream:outputStream requestBuilder:nil success:successBlock failure:failureBlock progress:progressBlock];
......@@ -292,8 +296,11 @@
[formatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
NSString *remainingTime = [formatter stringFromDate:date];
if ([self.delegate respondsToSelector:@selector(updateRemainingTime:)])
[self.delegate updateRemainingTime:remainingTime];
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.delegate respondsToSelector:@selector(updateRemainingTime:)])
[self.delegate updateRemainingTime:remainingTime];
});
}
- (void)downloadSuccessful
......@@ -307,8 +314,10 @@
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self];
#endif
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped];
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped];
});
_downloadInProgress = NO;
[self _triggerNextDownload];
......@@ -317,8 +326,10 @@
- (void)downloadFailedWithError:(NSError*)error
{
APLog(@"BoxFile download failed with error %li", (long)error.code);
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped];
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped];
});
_downloadInProgress = NO;
[self _triggerNextDownload];
......
......@@ -51,9 +51,9 @@
self.controller.delegate = self;
#if TARGET_OS_IOS
self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Box"]];
self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"BoxCell"]];
[self.cloudStorageLogo setImage:[UIImage imageNamed:@"Box"]];
[self.cloudStorageLogo setImage:[UIImage imageNamed:@"box"]];
[self.cloudStorageLogo sizeToFit];
self.cloudStorageLogo.center = self.view.center;
......@@ -118,8 +118,7 @@
self.navigationController.navigationBar.prefersLargeTitles = NO;
}
if (!_listOfFiles || _listOfFiles.count == 0)
[self requestInformationForCurrentPath];
[self updateViewAfterSessionChange];
}
- (void)viewWillDisappear:(BOOL)animated
......@@ -136,7 +135,11 @@
- (void)mediaListUpdated
{
_listOfFiles = [[VLCBoxController sharedInstance].currentListFiles copy];
[self.tableView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO];
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView reloadData];
[super mediaListUpdated];
});
}
- (VLCCloudStorageTableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
......@@ -277,7 +280,8 @@
[ubiquitousStore setString:token forKey:kVLCStoreBoxCredentials];
[ubiquitousStore synchronize];
self.authorizationInProgress = YES;
[self updateViewAfterSessionChange];
[self performSelectorOnMainThread:@selector(updateViewAfterSessionChange)
withObject:nil waitUntilDone:NO];
self.authorizationInProgress = NO;
}
......
......@@ -197,6 +197,7 @@
self.folderTitleLabel.text = self.boxFile.name;
self.titleLabel.hidden = self.subtitleLabel.hidden = YES;
self.folderTitleLabel.hidden = NO;
self.downloadButton.hidden = YES;
} else {
NSString *title = self.boxFile.name;
self.titleLabel.text = title;
......
......@@ -101,11 +101,10 @@
VLCHTTPFileDownloaderTask *downloadTask = [[VLCHTTPFileDownloaderTask alloc] init];
downloadTask.url = url;
NSString *downloadFileName;
if (fileName) {
downloadFileName = [self createPotentialNameFromName:fileName];
} else {
downloadFileName = [url.lastPathComponent stringByRemovingPercentEncoding];
}
fileName = fileName ?: [url.lastPathComponent stringByRemovingPercentEncoding];
downloadFileName = [self createPotentialNameFromName:fileName];
if (downloadFileName.pathExtension.length == 0 || ![downloadFileName isSupportedFormat]) {
NSString *urlExtension = url.pathExtension;
......
......@@ -73,7 +73,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
BOOL _volumeGestureEnabled;
BOOL _playPauseGestureEnabled;
BOOL _brightnessGestureEnabled;
BOOL _seekGestureEnabled;
BOOL _swipeSeekGestureEnabled;
BOOL _closeGestureEnabled;
BOOL _variableJumpDurationEnabled;
BOOL _playbackWillClose;
......@@ -654,7 +654,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
_volumeGestureEnabled = [[defaults objectForKey:kVLCSettingVolumeGesture] boolValue];
_playPauseGestureEnabled = [[defaults objectForKey:kVLCSettingPlayPauseGesture] boolValue];
_brightnessGestureEnabled = [[defaults objectForKey:kVLCSettingBrightnessGesture] boolValue];
_seekGestureEnabled = [[defaults objectForKey:kVLCSettingSeekGesture] boolValue];
_swipeSeekGestureEnabled = [[defaults objectForKey:kVLCSettingSeekGesture] boolValue];
_closeGestureEnabled = [[defaults objectForKey:kVLCSettingCloseGesture] boolValue];
_variableJumpDurationEnabled = [[defaults objectForKey:kVLCSettingVariableJumpDuration] boolValue];
}
......@@ -1642,7 +1642,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
switch (_currentPanType) {
case VLCPanTypeSeek: {
if (!_seekGestureEnabled)
if (!_swipeSeekGestureEnabled)
return;
double timeRemainingDouble = (-[_vpc remainingTime].intValue*0.001);
int timeRemaining = timeRemainingDouble;
......@@ -1724,7 +1724,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
- (void)swipeRecognized:(UISwipeGestureRecognizer*)swipeRecognizer
{
if (!_seekGestureEnabled)
if (!_swipeSeekGestureEnabled)
return;
NSString *hudString = @" ";
......@@ -1807,9 +1807,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
- (void)doubleTapRecognized:(UITapGestureRecognizer *)tapRecognizer
{
if (!_seekGestureEnabled)
return;
CGFloat screenWidth = self.view.frame.size.width;
CGFloat backwardBoundary = screenWidth / 3.0;
CGFloat forwardBoundary = 2 * screenWidth / 3.0;
......
......@@ -216,6 +216,8 @@ NSString * const kVLCSectionTableHeaderViewIdentifier = @"VLCSectionTableHeaderV
if ([specifier.type isEqualToString: kIASKPSMultiValueSpecifier]) {
[self displayActionSheetFor:specifier];
} else if ([specifier.type isEqualToString: kIASKButtonSpecifier]) {
[self buttonTappedFor:specifier];
} else {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
}
......@@ -237,4 +239,32 @@ NSString * const kVLCSectionTableHeaderViewIdentifier = @"VLCSectionTableHeaderV
}];
}
- (void)buttonTappedFor:(IASKSpecifier *)specifier
{
__weak typeof(self) weakSelf = self;
if ([specifier.specifierDict[@"Key"] isEqual: @"forceMediaLibraryRescan"]) {
UIAlertController *alert = [UIAlertController
alertControllerWithTitle:NSLocalizedString(@"FORCE_RESCAN_TITLE", "")
message:NSLocalizedString(@"FORCE_RESCAN_MESSAGE", "")
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* rescanAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_RESCAN", "")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * action) {
__strong typeof(weakSelf) strongSelf = weakSelf;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
[strongSelf->_medialibraryService forceRescan];
});
}];
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_CANCEL", "")
style:UIAlertActionStyleCancel
handler:nil];
[alert addAction:cancelAction];
[alert addAction:rescanAction];
[self presentViewController:alert animated:YES completion:nil];
}
}
@end
......@@ -35,6 +35,8 @@ class VLCSettingsTableViewCell: UITableViewCell {
accessoryType = .disclosureIndicator
case kIASKPSMultiValueSpecifier:
accessoryType = .none
case kIASKButtonSpecifier:
accessoryType = .none
default:
assertionFailure("\(reuseIdentifier) has not been defined for VLCSettingsTableViewCell")
}
......@@ -57,6 +59,8 @@ class VLCSettingsTableViewCell: UITableViewCell {
configureMultiValue(specifier, settingsValue)
case kIASKOpenURLSpecifier:
break
case kIASKButtonSpecifier:
break
default:
assertionFailure("\(specifier.type() ?? "nil") has not been defined for VLCSettingsTableViewCell")
}
......