From 72a303ea14d734bddea0ad0d8814e07b9bd4e08b Mon Sep 17 00:00:00 2001 From: Roberto Guanciale Date: Sun, 10 Nov 2013 18:21:52 +0000 Subject: [PATCH] restored hosted version --- hostedapp/manifest.json | 19 ++++++++++++++++++- hostedapp/manifest_dell.json | 6 +++--- hostedapp/manifest_git.json | 2 +- src/appcache | 2 +- src/index.html | 1 + src/js/mep-feature-tracks.js | 2 +- src/js/opensubtitle.js | 10 +++++++--- 7 files changed, 32 insertions(+), 10 deletions(-) mode change 120000 => 100644 hostedapp/manifest.json diff --git a/hostedapp/manifest.json b/hostedapp/manifest.json deleted file mode 120000 index 1f4a4b2..0000000 --- a/hostedapp/manifest.json +++ /dev/null @@ -1 +0,0 @@ -manifest_git.json \ No newline at end of file diff --git a/hostedapp/manifest.json b/hostedapp/manifest.json new file mode 100644 index 0000000..5fdf6f5 --- /dev/null +++ b/hostedapp/manifest.json @@ -0,0 +1,18 @@ +{ + "name": "Subtitle Videoplayer Hosted", + "version": "1.6.0", + "manifest_version": 2, + "icons": { + "16": "camera.png", + "128": "camera.png" + }, + "app": { + "urls": [ + "https://subtitlevideoplayer.appspot.com/static/ChromeOsSubtitle/src/" + ], + "launch": { + "web_url": "https://subtitlevideoplayer.appspot.com/static/ChromeOsSubtitle/src/index.html" + } + }, + "offline_enabled": true +} \ No newline at end of file diff --git a/hostedapp/manifest_dell.json b/hostedapp/manifest_dell.json index 0f46a02..3aec464 100644 --- a/hostedapp/manifest_dell.json +++ b/hostedapp/manifest_dell.json @@ -1,6 +1,6 @@ { "name": "Subtitle Videoplayer Hosted", - "version": "1.4.0", + "version": "1.6.0", "manifest_version": 2, "icons": { "16": "camera.png", @@ -8,10 +8,10 @@ }, "app": { "urls": [ - "http://localhost" + "http://localhost:8080/static/ChromeOsSubtitle/src/" ], "launch": { - "web_url": "http://localhost:8000/content/index.html" + "web_url": "http://localhost:8080/static/ChromeOsSubtitle/src/index.html" } }, "offline_enabled": true diff --git a/hostedapp/manifest_git.json b/hostedapp/manifest_git.json index ebae08d..5fdf6f5 100644 --- a/hostedapp/manifest_git.json +++ b/hostedapp/manifest_git.json @@ -1,6 +1,6 @@ { "name": "Subtitle Videoplayer Hosted", - "version": "1.5.0", + "version": "1.6.0", "manifest_version": 2, "icons": { "16": "camera.png", diff --git a/src/appcache b/src/appcache index c9a3d43..224a9bf 100644 --- a/src/appcache +++ b/src/appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# version 1.6.0.z.1 +# version 1.6.0.z.4 background.png index.html mediaelementplayer.min.css diff --git a/src/index.html b/src/index.html index 933ea2d..216d763 100644 --- a/src/index.html +++ b/src/index.html @@ -1,4 +1,5 @@ + Subtitle Videoplayer diff --git a/src/js/mep-feature-tracks.js b/src/js/mep-feature-tracks.js index df70e8a..5f1186c 100644 --- a/src/js/mep-feature-tracks.js +++ b/src/js/mep-feature-tracks.js @@ -1,5 +1,5 @@ -zip.workerScriptsPath = mediaelement_url + "/lib/zip.js/WebContent/"; +zip.workerScriptsPath = mediaelement_url + "lib/zip.js/WebContent/"; (function($) { diff --git a/src/js/opensubtitle.js b/src/js/opensubtitle.js index 86dec39..f829d98 100644 --- a/src/js/opensubtitle.js +++ b/src/js/opensubtitle.js @@ -1,4 +1,11 @@ var packaged_app = (window.location.origin.indexOf("chrome-extension") == 0); +var host = "http://api.opensubtitles.org/xml-rpc"; +if (!packaged_app) { + if (window.location.origin.indexOf("localhost") == 0) + host = "http://localhost:8080/xml-rpc"; + else + host = window.location.origin + "/xml-rpc"; +} function b64toBlob(b64Data, contentType, sliceSize) { contentType = contentType || ''; @@ -80,9 +87,6 @@ var openSubsLang = [ var t = this; - var host = "http://api.opensubtitles.org/xml-rpc"; - if (!packaged_app) - host = "http://localhost:8080/xml-rpc"; var service = new rpc.ServiceProxy(host, { sanitize: false, protocol: "XML-RPC",