diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-20 01:12:44 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-20 01:12:44 +0100 |
| commit | 924ec0c191b66520f7ec7d3f6dc556e06305846b (patch) | |
| tree | 66197620f989feee22031affaf2cc420b1f6d91b /Emby.Server.Implementations | |
| parent | bb8df8dfa0f84f6ccc8d3d3352f8a611e156e65a (diff) | |
Revert Jellyfin.Versioning, Update all versions and user agents.
Diffstat (limited to 'Emby.Server.Implementations')
4 files changed, 13 insertions, 29 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index f186ccdaa..91ba3903d 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -47,7 +47,6 @@ using Emby.Server.Implementations.Threading; using Emby.Server.Implementations.TV; using Emby.Server.Implementations.Updates; using Emby.Server.Implementations.Xml; -using Jellyfin.Versioning; using MediaBrowser.Api; using MediaBrowser.Common; using MediaBrowser.Common.Configuration; @@ -430,28 +429,20 @@ namespace Emby.Server.Implementations _validAddressResults.Clear(); } - private Version _version; - /// <summary> - /// Gets the current application version - /// </summary> - /// <value>The application version.</value> - public Version ApplicationVersion => _version ?? (_version = ApplicationExtendedVersion.ApiVersion); - - private Version _serverVersion; + private Version _applicationVersion; /// <summary> /// Gets the current application server version /// </summary> /// <value>The application server version.</value> - public Version ApplicationServerVersion => _serverVersion ?? (_serverVersion = typeof(ApplicationHost).Assembly.GetName().Version); + public Version ApplicationVersion => _applicationVersion ?? (_applicationVersion = typeof(ApplicationHost).Assembly.GetName().Version); + + public string ApplicationSemanticVersion => ApplicationVersion.ToString(3); - private ExtendedVersion _extendedVersion; /// <summary> /// Gets the current application server version /// </summary> /// <value>The application server version.</value> - public ExtendedVersion ApplicationExtendedVersion => _extendedVersion ?? - (_extendedVersion = typeof(ApplicationHost).Assembly.GetCustomAttributes(typeof(AssemblyExtendedVersion), false) - .Cast<AssemblyExtendedVersion>().FirstOrDefault().ExtendedVersion); + public string ApplicationUserAgent => Name + "/" + ApplicationSemanticVersion; private string _productName; /// <summary> @@ -478,7 +469,7 @@ namespace Emby.Server.Implementations /// Gets the name. /// </summary> /// <value>The name.</value> - public string Name => "Emby Server"; + public string Name => "Jellyfin"; private static Tuple<Assembly, string> GetAssembly(Type type) { @@ -1028,9 +1019,7 @@ namespace Emby.Server.Implementations protected string GetDefaultUserAgent() { - var name = FormatAttribute(Name); - - return name + "/" + ApplicationVersion; + return ApplicationUserAgent; } private static string FormatAttribute(string str) @@ -1044,7 +1033,7 @@ namespace Emby.Server.Implementations if (string.IsNullOrWhiteSpace(result)) { - result = "Emby"; + result = "Jellyfin"; } return result; @@ -1849,9 +1838,7 @@ namespace Emby.Server.Implementations { HasPendingRestart = HasPendingRestart, IsShuttingDown = IsShuttingDown, - Version = ApplicationVersion.ToString(), - ServerVersion = ApplicationServerVersion.ToString(), - ExtendedVersion = ApplicationExtendedVersion, + Version = ApplicationSemanticVersion, ProductName = ApplicationProductName, WebSocketPortNumber = HttpPort, CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(), @@ -1898,9 +1885,7 @@ namespace Emby.Server.Implementations var wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false); return new PublicSystemInfo { - Version = ApplicationVersion.ToString(), - ServerVersion = ApplicationServerVersion.ToString(), - ExtendedVersion = ApplicationExtendedVersion, + Version = ApplicationSemanticVersion, Id = SystemId, OperatingSystem = EnvironmentInfo.OperatingSystem.ToString(), WanAddress = wanAddress, diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 843718756..5a0e1da4d 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -3,7 +3,6 @@ <ItemGroup> <ProjectReference Include="..\Emby.Naming\Emby.Naming.csproj" /> <ProjectReference Include="..\Emby.Notifications\Emby.Notifications.csproj" /> - <ProjectReference Include="..\Jellyfin.Versioning\Jellyfin.Versioning.csproj" /> <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" /> <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj" /> <ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" /> @@ -31,7 +30,7 @@ </ItemGroup> <ItemGroup> - <Compile Include="..\Jellyfin.Versioning\SharedVersion.cs" /> + <Compile Include="..\SharedVersion.cs" /> </ItemGroup> <PropertyGroup> diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index d3066e916..0bbffb824 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -38,7 +38,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings _appHost = appHost; } - private string UserAgent => "Emby/" + _appHost.ApplicationVersion; + private string UserAgent => _appHost.ApplicationUserAgent; private static List<string> GetScheduleRequestDates(DateTime startDateUtc, DateTime endDateUtc) { diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs index c77559c75..7d6c0f67b 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs @@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts Url = url, CancellationToken = cancellationToken, // Some data providers will require a user agent - UserAgent = _appHost.FriendlyName + "/" + _appHost.ApplicationVersion + UserAgent = _appHost.ApplicationSemanticVersion }); } return Task.FromResult(_fileSystem.OpenRead(url)); |
