From d24fe143f62f6937c0566a1b6cb91875ab8c3a4b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 30 Jun 2016 10:49:52 -0400 Subject: [PATCH] update packaging --- .../Api/DashboardService.cs | 12 ------- .../Api/PackageCreator.cs | 36 ------------------- 2 files changed, 48 deletions(-) diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 08d5d73f2..1a227126e 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -524,18 +524,6 @@ namespace MediaBrowser.WebDashboard.Api await DumpFile(filename, Path.Combine(destination, filename), mode, culture, appVersion).ConfigureAwait(false); } - - var excludeFiles = new List(); - - if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase)) - { - excludeFiles.Add("supporterkey.html"); - } - - foreach (var file in excludeFiles) - { - _fileSystem.DeleteFile(Path.Combine(destination, file)); - } } private async Task DumpFile(string resourceVirtualPath, string destinationFilePath, string mode, string culture, string appVersion) diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index 883c02914..4c353c413 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -258,7 +258,6 @@ namespace MediaBrowser.WebDashboard.Api if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase)) { - html = ModifyForCordova(html); } else if (!string.IsNullOrWhiteSpace(path) && !string.Equals(path, "index.html", StringComparison.OrdinalIgnoreCase)) { @@ -339,41 +338,6 @@ namespace MediaBrowser.WebDashboard.Api return text.Substring(0, pos) + replace + text.Substring(pos + search.Length); } - private string ModifyForCordova(string html) - { - // Replace CORDOVA_REPLACE_SUPPORTER_SUBMIT_START - html = ReplaceBetween(html, "", "", "${ButtonPurchase}"); - - return html; - } - - private string ReplaceBetween(string html, string startToken, string endToken, string newHtml) - { - var start = html.IndexOf(startToken, StringComparison.OrdinalIgnoreCase); - - if (start == -1) - { - return html; - } - - var end = html.IndexOf(endToken, start, StringComparison.OrdinalIgnoreCase); - - if (end == -1) - { - return html; - } - - string result = html.Substring(start, end - start); - html = html.Replace(result, newHtml); - - return ReplaceBetween(html, startToken, endToken, newHtml); - } - - private string GetLocalizationToken(string phrase) - { - return "${" + phrase + "}"; - } - /// /// Gets the meta tags. ///