diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index fefdc904ff76c40eb279d14daa888954812fd4cc..03ac0f46ab675e26c318ff6f455148907d05a787 100644 Binary files a/Resources/en.lproj/Localizable.strings and b/Resources/en.lproj/Localizable.strings differ diff --git a/Sources/VLCHTTPConnection.m b/Sources/VLCHTTPConnection.m index 53359223c06bca4d5a36a0a86a1feff65d9fbe67..3f09a055336ae75f5cd1822846d78202f8450301 100644 --- a/Sources/VLCHTTPConnection.m +++ b/Sources/VLCHTTPConnection.m @@ -45,7 +45,7 @@ { // Add support for POST if ([method isEqualToString:@"POST"] && [path isEqualToString:@"/upload.json"]) - return YES; + return YES; return [super supportsMethod:method atPath:path]; } @@ -369,30 +369,31 @@ fileResponse.contentType = @"text/html"; } #else -#warning FIXME UIDevice *currentDevice = [UIDevice currentDevice]; NSString *deviceModel = [currentDevice model]; NSString *filePath = [self filePathForURI:path]; NSString *documentRoot = [config documentRoot]; NSString *relativePath = [filePath substringFromIndex:[documentRoot length]]; - NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE", nil), + NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE_ATV", nil), @"WEBINTF_DROPFILES" : NSLocalizedString(@"WEBINTF_DROPFILES", nil), - @"WEBINTF_DROPFILES_LONG" : [NSString stringWithFormat:NSLocalizedString(@"WEBINTF_DROPFILES_LONG", nil), deviceModel], - @"WEBINTF_DOWNLOADFILES" : NSLocalizedString(@"WEBINTF_DOWNLOADFILES", nil), - @"WEBINTF_DOWNLOADFILES_LONG" : [NSString stringWithFormat: NSLocalizedString(@"WEBINTF_DOWNLOADFILES_LONG", nil), deviceModel]}; + @"WEBINTF_DROPFILES_LONG" : [NSString stringWithFormat:NSLocalizedString(@"WEBINTF_DROPFILES_LONG_ATV", nil), deviceModel]}; HTTPDynamicFileResponse *fileResponse; - if ([relativePath isEqualToString:@"/index.html"]) { - fileResponse = [[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path] - forConnection:self - separator:@"%%" - replacementDictionary:replacementDict]; - fileResponse.contentType = @"text/html"; + if ([relativePath isEqualToString:@"/index.html"]) { + fileResponse = [[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path] + forConnection:self + separator:@"%%" + replacementDictionary:replacementDict]; + fileResponse.contentType = @"text/html"; #endif return fileResponse; } else if ([relativePath isEqualToString:@"/style.css"]) { +#if TARGET_OS_IOS NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE", nil)}; +#else + NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE_ATV", nil)}; +#endif HTTPDynamicFileResponse *fileResponse = [[HTTPDynamicFileResponse alloc] initWithFilePath:[self filePathForURI:path] forConnection:self separator:@"%%" diff --git a/VLC for Apple TV/web/index.html b/VLC for Apple TV/web/index.html new file mode 100644 index 0000000000000000000000000000000000000000..fa2aacee8ab4c4b7f3b22e701ab66f252c8ce2da --- /dev/null +++ b/VLC for Apple TV/web/index.html @@ -0,0 +1,44 @@ + + + + + %%WEBINTF_TITLE%% + + + + + + + + + +
+
+ +
+
+

%%WEBINTF_DROPFILES%%

+

%%WEBINTF_DROPFILES_LONG%%

+
+ + +
+
+ +
+ + diff --git a/VLC for iOS.xcodeproj/project.pbxproj b/VLC for iOS.xcodeproj/project.pbxproj index 3b2bc89183451bc1a2221a5f21431c574bae30b0..386ec0108dc459d8122bd23a5e6335a4ebaf4668 100644 --- a/VLC for iOS.xcodeproj/project.pbxproj +++ b/VLC for iOS.xcodeproj/project.pbxproj @@ -107,6 +107,14 @@ 7D405ED01BEA11C1006ED886 /* VLCHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D30F3BD183AB24C00FFC021 /* VLCHTTPConnection.m */; }; 7D405ED31BEA11CD006ED886 /* VLCHTTPUploaderController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D30F3C1183AB24C00FFC021 /* VLCHTTPUploaderController.m */; }; 7D405ED41BEA150C006ED886 /* VLCActivityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D18F0A11B34522000651A30 /* VLCActivityManager.m */; }; + 7D405ED51BEA1F56006ED886 /* Raleway.woff in Resources */ = {isa = PBXBuildFile; fileRef = 7D32B383185E293D006CA474 /* Raleway.woff */; }; + 7D405ED61BEA1F56006ED886 /* jquery-1.10.1.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629E1765E90C0011611A /* jquery-1.10.1.min.js */; }; + 7D405ED71BEA1F56006ED886 /* jquery.fileupload.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629F1765E90C0011611A /* jquery.fileupload.js */; }; + 7D405ED81BEA1F56006ED886 /* jquery.iframe-transport.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC862A01765E90C0011611A /* jquery.iframe-transport.js */; }; + 7D405ED91BEA1F56006ED886 /* jquery.ui.widget.js in Resources */ = {isa = PBXBuildFile; fileRef = 7AC862A11765E90C0011611A /* jquery.ui.widget.js */; }; + 7D405EDA1BEA1F56006ED886 /* style.css in Resources */ = {isa = PBXBuildFile; fileRef = 7AC8629B1765DC560011611A /* style.css */; }; + 7D405EDB1BEA1F56006ED886 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 7D00161A17704DAC00649F27 /* main.js */; }; + 7D405EE21BEA1FAD006ED886 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 7D405EE11BEA1FAD006ED886 /* index.html */; }; 7D4408591BDA8DCA0080FB42 /* VLCBoxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 41CD69591A29D72600E60BCE /* VLCBoxController.m */; }; 7D44085A1BDA8DCE0080FB42 /* VLCBoxTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 41CD695B1A29D72600E60BCE /* VLCBoxTableViewController.m */; }; 7D4625881A5614A1001A80B4 /* VLCEqualizerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D4625871A5614A1001A80B4 /* VLCEqualizerView.m */; }; @@ -640,6 +648,7 @@ 7D3E52891BD7B5E100309D15 /* VLCCloudServicesTVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCCloudServicesTVViewController.m; sourceTree = ""; }; 7D3E528A1BD7B5E100309D15 /* VLCCloudServicesTVViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCCloudServicesTVViewController.xib; sourceTree = ""; }; 7D3EB013174A353E002062C2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 7D405EE11BEA1FAD006ED886 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = index.html; path = web/index.html; sourceTree = ""; }; 7D4136621896710500D7B4B2 /* si */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = si; path = si.lproj/Localizable.strings; sourceTree = ""; }; 7D4625861A5614A1001A80B4 /* VLCEqualizerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCEqualizerView.h; path = Sources/VLCEqualizerView.h; sourceTree = SOURCE_ROOT; }; 7D4625871A5614A1001A80B4 /* VLCEqualizerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCEqualizerView.m; path = Sources/VLCEqualizerView.m; sourceTree = SOURCE_ROOT; }; @@ -1739,6 +1748,7 @@ 7DEDD38B1BE936130053802C /* About Contents.html */, 7D2D7FD21BD2F109002D6B6D /* VLC for Apple TV.entitlements */, 7D13294E1BA1F10100BE647E /* Assets.xcassets */, + 7D405EE11BEA1FAD006ED886 /* index.html */, 7D1329501BA1F10100BE647E /* Info.plist */, 7DEC8BE81BD68BC9006E1093 /* Settings.bundle */, ); @@ -2348,8 +2358,11 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 7D405EDB1BEA1F56006ED886 /* main.js in Resources */, DD8095E51BE3F4240065D8E1 /* VLCPlaybackInfoTVViewController.xib in Resources */, + 7D405ED91BEA1F56006ED886 /* jquery.ui.widget.js in Resources */, 7D6069721BD94AD600AB765C /* VLCCloudStorageTableViewCell.xib in Resources */, + 7D405ED71BEA1F56006ED886 /* jquery.fileupload.js in Resources */, 7DEC8BDF1BD67899006E1093 /* VLCFullscreenMovieTVViewController.xib in Resources */, 7DEDD38C1BE936130053802C /* About Contents.html in Resources */, 7D4CAAFC1BDE548A00A08EF5 /* Localizable.strings in Resources */, @@ -2357,11 +2370,16 @@ 7DEDD38E1BE936F30053802C /* OpenSans-Regular.ttf in Resources */, DDEAECF61BDFEAFA00756C83 /* VLCLocalNetworkServerTVCell.xib in Resources */, DD8095EC1BE4F04E0065D8E1 /* VLCPlaybackInfoRateTVViewController.xib in Resources */, + 7D405ED61BEA1F56006ED886 /* jquery-1.10.1.min.js in Resources */, 7DEC8BE91BD68BC9006E1093 /* Settings.bundle in Resources */, + 7D405ED51BEA1F56006ED886 /* Raleway.woff in Resources */, + 7D405ED81BEA1F56006ED886 /* jquery.iframe-transport.js in Resources */, DD3EAC131BE26166003668DA /* VLCServerBrowsingTVCell.xib in Resources */, 7D3E528C1BD7B5E100309D15 /* VLCCloudServicesTVViewController.xib in Resources */, + 7D405EDA1BEA1F56006ED886 /* style.css in Resources */, 7D7EF3DB1BD56B5900CD4CEE /* VLCOpenNetworkStreamTVViewController.xib in Resources */, 7DDE41901BE9225A0065C53A /* VLCAboutViewController.xib in Resources */, + 7D405EE21BEA1FAD006ED886 /* index.html in Resources */, 7DEDD38D1BE936F30053802C /* SourceCodePro-Regular.ttf in Resources */, DD8095F31BE510770065D8E1 /* VLCPlaybackInfoAudioTVViewController.xib in Resources */, );