Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-iOS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
311
Issues
311
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-iOS
Commits
e21d42db
Commit
e21d42db
authored
Aug 04, 2017
by
Carola Nitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiny refactors
parent
0bd209b8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
22 deletions
+18
-22
Podfile.lock
Podfile.lock
+9
-4
Sources/VLCCloudServicesTableViewController.m
Sources/VLCCloudServicesTableViewController.m
+0
-1
Sources/VLCCloudStorageTableViewCell.m
Sources/VLCCloudStorageTableViewCell.m
+1
-2
Sources/VLCDropboxController.m
Sources/VLCDropboxController.m
+8
-15
No files found.
Podfile.lock
View file @
e21d42db
...
@@ -43,6 +43,7 @@ PODS:
...
@@ -43,6 +43,7 @@ PODS:
- OROpenSubtitleDownloader
- OROpenSubtitleDownloader
- MobileVLCKit-unstable (3.0.0a31)
- MobileVLCKit-unstable (3.0.0a31)
- NSData+Base64 (1.0.0)
- NSData+Base64 (1.0.0)
- ObjectiveDropboxOfficial (1.0)
- OBSlider (1.1.0)
- OBSlider (1.1.0)
- OROpenSubtitleDownloader (1.2.0):
- OROpenSubtitleDownloader (1.2.0):
- AFNetworking
- AFNetworking
...
@@ -50,7 +51,6 @@ PODS:
...
@@ -50,7 +51,6 @@ PODS:
- RESideMenu (4.0.7)
- RESideMenu (4.0.7)
- TVVLCKit-unstable (3.0.0a31)
- TVVLCKit-unstable (3.0.0a31)
- upnpx (1.4.0a2)
- upnpx (1.4.0a2)
- VLC-Dropbox-v1-SDK (1.3.14w)
- VLC-LiveSDK (5.7.0x)
- VLC-LiveSDK (5.7.0x)
- VLC-LXReorderableCollectionViewFlowLayout (0.1.3v)
- VLC-LXReorderableCollectionViewFlowLayout (0.1.3v)
- VLC-WhiteRaccoon (1.0.0)
- VLC-WhiteRaccoon (1.0.0)
...
@@ -70,12 +70,12 @@ DEPENDENCIES:
...
@@ -70,12 +70,12 @@ DEPENDENCIES:
- MediaLibraryKit-unstable
- MediaLibraryKit-unstable
- MetaDataFetcherKit (~> 0.1.8)
- MetaDataFetcherKit (~> 0.1.8)
- MobileVLCKit-unstable (= 3.0.0a31)
- MobileVLCKit-unstable (= 3.0.0a31)
- ObjectiveDropboxOfficial (from `git@github.com:TheHungryBu/dropbox-sdk-obj-c.git`)
- OBSlider (= 1.1.0)
- OBSlider (= 1.1.0)
- OROpenSubtitleDownloader (from `https://github.com/orta/OROpenSubtitleDownloader.git`, commit `0509eac2`)
- OROpenSubtitleDownloader (from `https://github.com/orta/OROpenSubtitleDownloader.git`, commit `0509eac2`)
- RESideMenu (~> 4.0.7)
- RESideMenu (~> 4.0.7)
- TVVLCKit-unstable (= 3.0.0a31)
- TVVLCKit-unstable (= 3.0.0a31)
- upnpx (~> 1.4.0a2)
- upnpx (~> 1.4.0a2)
- VLC-Dropbox-v1-SDK (= 1.3.14w)
- VLC-LiveSDK (= 5.7.0x)
- VLC-LiveSDK (= 5.7.0x)
- VLC-LXReorderableCollectionViewFlowLayout (= 0.1.3v)
- VLC-LXReorderableCollectionViewFlowLayout (= 0.1.3v)
- VLC-WhiteRaccoon
- VLC-WhiteRaccoon
...
@@ -89,6 +89,8 @@ EXTERNAL SOURCES:
...
@@ -89,6 +89,8 @@ EXTERNAL SOURCES:
InAppSettingsKit:
InAppSettingsKit:
:commit: 415ea6bb
:commit: 415ea6bb
:git: git://github.com/fkuehne/InAppSettingsKit.git
:git: git://github.com/fkuehne/InAppSettingsKit.git
ObjectiveDropboxOfficial:
:git: git@github.com:TheHungryBu/dropbox-sdk-obj-c.git
OROpenSubtitleDownloader:
OROpenSubtitleDownloader:
:commit: 0509eac2
:commit: 0509eac2
:git: https://github.com/orta/OROpenSubtitleDownloader.git
:git: https://github.com/orta/OROpenSubtitleDownloader.git
...
@@ -103,6 +105,9 @@ CHECKOUT OPTIONS:
...
@@ -103,6 +105,9 @@ CHECKOUT OPTIONS:
InAppSettingsKit:
InAppSettingsKit:
:commit: 415ea6bb
:commit: 415ea6bb
:git: git://github.com/fkuehne/InAppSettingsKit.git
:git: git://github.com/fkuehne/InAppSettingsKit.git
ObjectiveDropboxOfficial:
:commit: 26eb3491426dfe621ecaa33931f81d0fade60978
:git: git@github.com:TheHungryBu/dropbox-sdk-obj-c.git
OROpenSubtitleDownloader:
OROpenSubtitleDownloader:
:commit: 0509eac2
:commit: 0509eac2
:git: https://github.com/orta/OROpenSubtitleDownloader.git
:git: https://github.com/orta/OROpenSubtitleDownloader.git
...
@@ -123,18 +128,18 @@ SPEC CHECKSUMS:
...
@@ -123,18 +128,18 @@ SPEC CHECKSUMS:
MetaDataFetcherKit: 44c90defa89b3a72cef60e07ad9de37821dd7c5d
MetaDataFetcherKit: 44c90defa89b3a72cef60e07ad9de37821dd7c5d
MobileVLCKit-unstable: 4aad34f7ce764dc1b0113264efdbf25d2f7250f4
MobileVLCKit-unstable: 4aad34f7ce764dc1b0113264efdbf25d2f7250f4
NSData+Base64: 4e84902c4db907a15673474677e57763ef3903e4
NSData+Base64: 4e84902c4db907a15673474677e57763ef3903e4
ObjectiveDropboxOfficial: bd00111d92dda8a269c6ff502c97eddd4363d681
OBSlider: 490f108007bfdd5414a38650b211fe403a95b8a0
OBSlider: 490f108007bfdd5414a38650b211fe403a95b8a0
OROpenSubtitleDownloader: 154b8c08acbf8836b77ac259018dc8b5baef907e
OROpenSubtitleDownloader: 154b8c08acbf8836b77ac259018dc8b5baef907e
RESideMenu: f24c508404b49c667344c54aba7e590883533958
RESideMenu: f24c508404b49c667344c54aba7e590883533958
TVVLCKit-unstable: faba736b80c96056fe15b95bbd59bd8771a73bfc
TVVLCKit-unstable: faba736b80c96056fe15b95bbd59bd8771a73bfc
upnpx: 7cb9b092595086cdfeac2a670bd47ba5f5bd30c8
upnpx: 7cb9b092595086cdfeac2a670bd47ba5f5bd30c8
VLC-Dropbox-v1-SDK: 2c44006d149162697a6b10eb86455ea249c6b0b5
VLC-LiveSDK: c9566a9edde968f969138f84cfd40b540a109b3f
VLC-LiveSDK: c9566a9edde968f969138f84cfd40b540a109b3f
VLC-LXReorderableCollectionViewFlowLayout: 0204946967b746ca183835e854826290be06e2f4
VLC-LXReorderableCollectionViewFlowLayout: 0204946967b746ca183835e854826290be06e2f4
VLC-WhiteRaccoon: 1e7e59b0568959135a89d09c416d1e11a5d9a986
VLC-WhiteRaccoon: 1e7e59b0568959135a89d09c416d1e11a5d9a986
XKKeychain: 852ef663c56a7194c73d3c68e8d9d4f07b121d4f
XKKeychain: 852ef663c56a7194c73d3c68e8d9d4f07b121d4f
xmlrpc: 109bb21d15ed6d108b2c1ac5973a6a223a50f5f4
xmlrpc: 109bb21d15ed6d108b2c1ac5973a6a223a50f5f4
PODFILE CHECKSUM:
3b44843e2e928703f00ccf18a3cd816a9aa0403b
PODFILE CHECKSUM:
b05f5c34457e42711cea4ec78ea48f9d0207dec6
COCOAPODS: 1.2.1
COCOAPODS: 1.2.1
Sources/VLCCloudServicesTableViewController.m
View file @
e21d42db
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#import "VLCDocumentPickerController.h"
#import "VLCDocumentPickerController.h"
#import "VLCCloudServiceCell.h"
#import "VLCCloudServiceCell.h"
#import <BoxSDK/BoxSDK.h>
#import "VLCGoogleDriveController.h"
#import "VLCGoogleDriveController.h"
@interface
VLCCloudServicesTableViewController
()
@interface
VLCCloudServicesTableViewController
()
...
...
Sources/VLCCloudStorageTableViewCell.m
View file @
e21d42db
...
@@ -79,8 +79,7 @@
...
@@ -79,8 +79,7 @@
self
.
thumbnailView
.
image
=
[
UIImage
imageNamed
:
@"folder"
];
self
.
thumbnailView
.
image
=
[
UIImage
imageNamed
:
@"folder"
];
}
else
if
([
_dropboxFile
isKindOfClass
:[
DBFILESFileMetadata
class
]])
{
}
else
if
([
_dropboxFile
isKindOfClass
:[
DBFILESFileMetadata
class
]])
{
DBFILESFileMetadata
*
file
=
(
DBFILESFileMetadata
*
)
_dropboxFile
;
DBFILESFileMetadata
*
file
=
(
DBFILESFileMetadata
*
)
_dropboxFile
;
NSString
*
title
=
file
.
name
;
self
.
titleLabel
.
text
=
file
.
name
;
self
.
titleLabel
.
text
=
title
;
self
.
subtitleLabel
.
text
=
(
file
.
size
.
integerValue
>
0
)
?
[
NSByteCountFormatter
stringFromByteCount
:
file
.
size
.
longLongValue
countStyle
:
NSByteCountFormatterCountStyleFile
]
:
@""
;
self
.
subtitleLabel
.
text
=
(
file
.
size
.
integerValue
>
0
)
?
[
NSByteCountFormatter
stringFromByteCount
:
file
.
size
.
longLongValue
countStyle
:
NSByteCountFormatterCountStyleFile
]
:
@""
;
self
.
titleLabel
.
hidden
=
self
.
subtitleLabel
.
hidden
=
NO
;
self
.
titleLabel
.
hidden
=
self
.
subtitleLabel
.
hidden
=
NO
;
self
.
folderTitleLabel
.
hidden
=
YES
;
self
.
folderTitleLabel
.
hidden
=
YES
;
...
...
Sources/VLCDropboxController.m
View file @
e21d42db
...
@@ -104,10 +104,9 @@
...
@@ -104,10 +104,9 @@
-
(
BOOL
)
_supportedFileExtension
:(
NSString
*
)
filename
-
(
BOOL
)
_supportedFileExtension
:(
NSString
*
)
filename
{
{
if
([
filename
isSupportedMediaFormat
]
||
[
filename
isSupportedAudioMediaFormat
]
||
[
filename
isSupportedSubtitleFormat
])
return
[
filename
isSupportedMediaFormat
]
return
YES
;
||
[
filename
isSupportedAudioMediaFormat
]
||
[
filename
isSupportedSubtitleFormat
];
return
NO
;
}
}
-
(
NSString
*
)
_createPotentialNameFrom
:(
NSString
*
)
path
-
(
NSString
*
)
_createPotentialNameFrom
:(
NSString
*
)
path
...
@@ -181,18 +180,14 @@
...
@@ -181,18 +180,14 @@
_downloadInProgress
=
YES
;
_downloadInProgress
=
YES
;
}
}
-
(
void
)
streamFile
:(
DBFILESMetadata
*
)
file
currentNavigationController
:(
UINavigationController
*
)
navigationController
-
(
void
)
streamFile
:(
DBFILESMetadata
*
)
file
currentNavigationController
:(
UINavigationController
*
)
navigationController
{
{
if
(
!
[
file
isKindOfClass
:[
DBFILESFolderMetadata
class
]])
{
if
(
!
[
file
isKindOfClass
:[
DBFILESFolderMetadata
class
]])
{
_lastKnownNavigationController
=
navigationController
;
_lastKnownNavigationController
=
navigationController
;
NSString
*
path
=
file
.
pathLower
;
[
self
loadStreamFrom
:
file
.
pathLower
];
if
(
path
!=
nil
)
[
self
loadStreamFrom
:
path
];
}
}
}
}
# pragma mark - Dropbox API Request
# pragma mark - Dropbox API Request
-
(
void
)
listFiles
:(
NSString
*
)
path
-
(
void
)
listFiles
:(
NSString
*
)
path
...
@@ -221,9 +216,7 @@
...
@@ -221,9 +216,7 @@
return
;
return
;
}
}
// Need to replace all ' ' by '_' because it causes a `NSInvalidArgumentException ... destination path is nil` in the dropbox library.
// Need to replace all ' ' by '_' because it causes a `NSInvalidArgumentException ... destination path is nil` in the dropbox library.
if
([
destination
containsString
:
@" "
])
destination
=
[
destination
stringByReplacingOccurrencesOfString
:
@" "
withString
:
@"_"
];
destination
=
[
destination
stringByReplacingOccurrencesOfString
:
@" "
withString
:
@"_"
];
destination
=
[
self
_createPotentialNameFrom
:
destination
];
destination
=
[
self
_createPotentialNameFrom
:
destination
];
...
@@ -255,7 +248,7 @@
...
@@ -255,7 +248,7 @@
-
(
void
)
loadStreamFrom
:(
NSString
*
)
path
-
(
void
)
loadStreamFrom
:(
NSString
*
)
path
{
{
if
(
!
[
self
_supportedFileExtension
:[
path
lastPathComponent
]])
{
if
(
!
path
||
!
[
self
_supportedFileExtension
:[
path
lastPathComponent
]])
{
[
self
_handleError
:[
NSError
errorWithDomain
:
NSLocalizedString
(
@"FILE_NOT_SUPPORTED"
,
nil
)
code
:
415
userInfo
:
nil
]];
[
self
_handleError
:[
NSError
errorWithDomain
:
NSLocalizedString
(
@"FILE_NOT_SUPPORTED"
,
nil
)
code
:
415
userInfo
:
nil
]];
return
;
return
;
}
}
...
@@ -265,14 +258,14 @@
...
@@ -265,14 +258,14 @@
if
(
result
)
{
if
(
result
)
{
VLCPlaybackController
*
vpc
=
[
VLCPlaybackController
sharedInstance
];
VLCPlaybackController
*
vpc
=
[
VLCPlaybackController
sharedInstance
];
[
vpc
playURL
:[
NSURL
URLWithString
:
result
.
link
]
successCallback
:
nil
errorCallback
:
nil
];
[
vpc
playURL
:[
NSURL
URLWithString
:
result
.
link
]
successCallback
:
nil
errorCallback
:
nil
];
#if TARGET_OS_TV
#if TARGET_OS_TV
if
(
_lastKnownNavigationController
)
{
if
(
_lastKnownNavigationController
)
{
VLCFullscreenMovieTVViewController
*
movieVC
=
[
VLCFullscreenMovieTVViewController
fullscreenMovieTVViewController
];
VLCFullscreenMovieTVViewController
*
movieVC
=
[
VLCFullscreenMovieTVViewController
fullscreenMovieTVViewController
];
[
_lastKnownNavigationController
presentViewController
:
movieVC
[
_lastKnownNavigationController
presentViewController
:
movieVC
animated:
YES
animated:
YES
completion:
nil
];
completion:
nil
];
}
}
#endif
#endif
}
else
{
}
else
{
APLog
(
@"loadStream failed with network error %li and error tag %li"
,
(
long
)
networkError
.
statusCode
,
(
long
)
networkError
.
tag
);
APLog
(
@"loadStream failed with network error %li and error tag %li"
,
(
long
)
networkError
.
statusCode
,
(
long
)
networkError
.
tag
);
[
self
_handleError
:[
NSError
errorWithDomain
:
networkError
.
description
code
:
networkError
.
statusCode
.
integerValue
userInfo
:
nil
]];
[
self
_handleError
:[
NSError
errorWithDomain
:
networkError
.
description
code
:
networkError
.
statusCode
.
integerValue
userInfo
:
nil
]];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment