diff options
| author | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-05 04:27:13 -0800 |
|---|---|---|
| committer | Tim Hobbs <jesus.tesh@gmail.com> | 2014-03-05 04:27:13 -0800 |
| commit | 482fde658746750075ff8a562ca1fb88f1739ef4 (patch) | |
| tree | 7bd5084ffa6be20a4533eb37d94f852f2d888a84 /MediaBrowser.ServerApplication | |
| parent | 604f971477da4dca5247f7d531323175ad044150 (diff) | |
| parent | 9396f16aed2f304789324afc83e0c9f385c5f00a (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Conflicts:
MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
Diffstat (limited to 'MediaBrowser.ServerApplication')
| -rw-r--r-- | MediaBrowser.ServerApplication/ApplicationHost.cs | 63 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs | 24 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/LibraryViewer.cs | 13 |
3 files changed, 81 insertions, 19 deletions
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index 73f99cda1..479e07ee6 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -336,6 +336,51 @@ namespace MediaBrowser.ServerApplication { // Not there, no big deal } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "fanart-movies"), true); + } + catch (IOException) + { + // Not there, no big deal + } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "fanart-music"), true); + } + catch (IOException) + { + // Not there, no big deal + } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "fanart-tv"), true); + } + catch (IOException) + { + // Not there, no big deal + } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "tmdb-people"), true); + } + catch (IOException) + { + // Not there, no big deal + } + + try + { + Directory.Delete(Path.Combine(ApplicationPaths.DataPath, "tvdb-v3"), true); + } + catch (IOException) + { + // Not there, no big deal + } }); } @@ -812,18 +857,30 @@ namespace MediaBrowser.ServerApplication HasUpdateAvailable = _hasUpdateAvailable, SupportsAutoRunAtStartup = SupportsAutoRunAtStartup, TranscodingTempPath = ApplicationPaths.TranscodingTempPath, - IsRunningAsService = IsRunningAsService + IsRunningAsService = IsRunningAsService, + ServerName = string.IsNullOrWhiteSpace(ServerConfigurationManager.Configuration.ServerName) ? Environment.MachineName : ServerConfigurationManager.Configuration.ServerName }; } private readonly CultureInfo _usCulture = new CultureInfo("en-US"); private string GetWanAddress() { - var ip = WanAddressEntryPoint.WanAddress; + var ip = ServerConfigurationManager.Configuration.WanDdns; + + if (string.IsNullOrWhiteSpace(ip)) + { + ip = WanAddressEntryPoint.WanAddress; + } if (!string.IsNullOrEmpty(ip)) { - return "http://" + ip + ":" + ServerConfigurationManager.Configuration.HttpServerPortNumber.ToString(_usCulture); + if (!ip.StartsWith("http://", StringComparison.OrdinalIgnoreCase) && + !ip.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) + { + ip = "http://" + ip; + } + + return ip + ":" + ServerConfigurationManager.Configuration.HttpServerPortNumber.ToString(_usCulture); } return null; diff --git a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs index c560a5b91..c4f529754 100644 --- a/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs +++ b/MediaBrowser.ServerApplication/FFMpeg/FFMpegDownloadInfo.cs @@ -11,6 +11,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg { // Windows builds: http://ffmpeg.zeranoe.com/builds/ // Linux builds: http://ffmpeg.gusari.org/static/ + // OS X builds: http://ffmpegmac.net/ public static string Version = ffmpegOsType("Version"); @@ -31,7 +32,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg switch (arg) { case "Version": - return "20140105"; + return "20140304"; case "FFMpegFilename": return "ffmpeg.exe"; case "FFProbeFilename": @@ -68,7 +69,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg switch (arg) { case "Version": - return "linux_x86_20140118"; + return "20140304"; case "FFMpegFilename": return "ffmpeg"; case "FFProbeFilename": @@ -84,7 +85,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg switch (arg) { case "Version": - return "linux_x86_64_20140118"; + return "20140304"; case "FFMpegFilename": return "ffmpeg"; case "FFProbeFilename": @@ -97,7 +98,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg } // Unsupported Unix platform return ""; - #endif +#endif } return ""; } @@ -111,8 +112,8 @@ namespace MediaBrowser.ServerApplication.FFMpeg case PlatformID.Win32NT: return new[] { - "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20140105-git-70937d9-win32-static.7z", - "https://www.dropbox.com/s/oghurnp5zh292ry/ffmpeg-20140105-git-70937d9-win32-static.7z?dl=1" + "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20140304-git-f34cceb-win32-static.7z", + "https://www.dropbox.com/s/6brdetuzbld93jk/ffmpeg-20140304-git-f34cceb-win32-static.7z?dl=1" }; #if __MonoCS__ @@ -121,7 +122,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg { return new[] { - "https://copy.com/IB0W4efS6t9A/ffall-2.1.1.tar.gz?download=1" + "https://www.dropbox.com/s/n188rxbulqem8ry/ffmpeg-osx-20131121.gz?dl=1" }; } @@ -131,8 +132,8 @@ namespace MediaBrowser.ServerApplication.FFMpeg { return new[] { - "http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.2014-01-18.tar.gz", - "https://www.dropbox.com/s/b7nkg71sil812hp/ffmpeg.static.32bit.2014-01-04.tar.gz?dl=1" + "http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.2014-03-04.tar.gz", + "https://www.dropbox.com/s/0l76mcauqqkta31/ffmpeg.static.32bit.2014-03-04.tar.gz?dl=1" }; } @@ -140,7 +141,8 @@ namespace MediaBrowser.ServerApplication.FFMpeg { return new[] { - "http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-01-18.tar.gz" + "http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-03-04.tar.gz", + "https://www.dropbox.com/s/9wlxz440mdejuqe/ffmpeg.static.64bit.2014-03-04.tar.gz?dl=1" }; } @@ -148,7 +150,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg //No Unix version available return new string[] {}; - #endif +#endif } return new string[] {}; } diff --git a/MediaBrowser.ServerApplication/LibraryViewer.cs b/MediaBrowser.ServerApplication/LibraryViewer.cs index 2bf51be4a..a8eda801b 100644 --- a/MediaBrowser.ServerApplication/LibraryViewer.cs +++ b/MediaBrowser.ServerApplication/LibraryViewer.cs @@ -84,7 +84,8 @@ namespace MediaBrowser.ServerApplication { treeView1.Nodes.Clear(); - IEnumerable<BaseItem> children = _currentUser.Name == "Physical" ? new[] { _libraryManager.RootFolder } : _libraryManager.RootFolder.GetChildren(_currentUser, true); + var isPhysical = _currentUser.Name == "Physical"; + IEnumerable<BaseItem> children = isPhysical ? new[] { _libraryManager.RootFolder } : _libraryManager.RootFolder.GetChildren(_currentUser, true); children = OrderByName(children, _currentUser); foreach (Folder folder in children) @@ -94,9 +95,9 @@ namespace MediaBrowser.ServerApplication var node = new TreeNode { Tag = currentFolder }; - var subChildren = currentFolder.GetChildren(_currentUser, true); + var subChildren = isPhysical ? currentFolder.Children : currentFolder.GetChildren(_currentUser, true); subChildren = OrderByName(subChildren, _currentUser); - AddChildren(node, subChildren, _currentUser); + AddChildren(node, subChildren, _currentUser, isPhysical); node.Text = currentFolder.Name + " (" + node.Nodes.Count + ")"; @@ -110,7 +111,7 @@ namespace MediaBrowser.ServerApplication /// <param name="parent">The parent.</param> /// <param name="children">The children.</param> /// <param name="user">The user.</param> - private void AddChildren(TreeNode parent, IEnumerable<BaseItem> children, User user) + private void AddChildren(TreeNode parent, IEnumerable<BaseItem> children, User user, bool isPhysical) { foreach (var item in children) { @@ -120,7 +121,9 @@ namespace MediaBrowser.ServerApplication { var prefs = _displayPreferencesManager.GetDisplayPreferences(subFolder.DisplayPreferencesId, user.Id, "LibraryExplorer"); - AddChildren(node, OrderBy(subFolder.GetChildren(user, true), user, prefs.SortBy), user); + var subChildren = isPhysical ? subFolder.Children : subFolder.GetChildren(_currentUser, true); + + AddChildren(node, OrderBy(subChildren, user, prefs.SortBy), user, isPhysical); node.Text = item.Name + " (" + node.Nodes.Count + ")"; } else |
