mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Added isservice to reported statistics
This commit is contained in:
parent
d39f8a1161
commit
1f6918117c
@ -171,6 +171,12 @@ namespace MediaBrowser.Common.Implementations
|
|||||||
/// <value>The name.</value>
|
/// <value>The name.</value>
|
||||||
public abstract string Name { get; }
|
public abstract string Name { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether this instance is running as service.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is running as service; otherwise, <c>false</c>.</value>
|
||||||
|
public abstract bool IsRunningAsService { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="BaseApplicationHost{TApplicationPathsType}"/> class.
|
/// Initializes a new instance of the <see cref="BaseApplicationHost{TApplicationPathsType}"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using System.Reflection;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Common.Configuration;
|
|
||||||
using MediaBrowser.Common.Net;
|
|
||||||
using MediaBrowser.Common.ScheduledTasks;
|
using MediaBrowser.Common.ScheduledTasks;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using System;
|
using System;
|
||||||
@ -74,7 +72,16 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
|
|||||||
|
|
||||||
progress.Report(0);
|
progress.Report(0);
|
||||||
var mac = NetworkManager.GetMacAddress();
|
var mac = NetworkManager.GetMacAddress();
|
||||||
var data = new Dictionary<string, string> { { "feature", ApplicationHost.Name }, { "mac", mac }, { "ver", ApplicationHost.ApplicationVersion.ToString() }, { "platform", Environment.OSVersion.VersionString } };
|
|
||||||
|
var data = new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "feature", ApplicationHost.Name },
|
||||||
|
{ "mac", mac },
|
||||||
|
{ "ver", ApplicationHost.ApplicationVersion.ToString() },
|
||||||
|
{ "platform", Environment.OSVersion.VersionString },
|
||||||
|
{ "isservice", ApplicationHost.IsRunningAsService.ToString().ToLower()}
|
||||||
|
};
|
||||||
|
|
||||||
await HttpClient.Post(Constants.Constants.MbAdminUrl + "service/registration/ping", data, CancellationToken.None).ConfigureAwait(false);
|
await HttpClient.Post(Constants.Constants.MbAdminUrl + "service/registration/ping", data, CancellationToken.None).ConfigureAwait(false);
|
||||||
progress.Report(100);
|
progress.Report(100);
|
||||||
|
|
||||||
@ -86,7 +93,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
|
|||||||
/// <value>The name.</value>
|
/// <value>The name.</value>
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get { return "Collect stats"; }
|
get { return "Collect anonymous usage stats"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -24,6 +24,12 @@ namespace MediaBrowser.Common
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
event EventHandler<GenericEventArgs<Version>> ApplicationUpdated;
|
event EventHandler<GenericEventArgs<Version>> ApplicationUpdated;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether this instance is running as service.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is running as service; otherwise, <c>false</c>.</value>
|
||||||
|
bool IsRunningAsService { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance has pending kernel reload.
|
/// Gets or sets a value indicating whether this instance has pending kernel reload.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -20,12 +20,6 @@ namespace MediaBrowser.Controller
|
|||||||
/// <value>The name of the web application.</value>
|
/// <value>The name of the web application.</value>
|
||||||
string WebApplicationName { get; }
|
string WebApplicationName { get; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance is running as service.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is running as service; otherwise, <c>false</c>.</value>
|
|
||||||
bool IsRunningAsService { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether [supports automatic run at startup].
|
/// Gets a value indicating whether [supports automatic run at startup].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -186,7 +186,7 @@ namespace MediaBrowser.ServerApplication
|
|||||||
}
|
}
|
||||||
|
|
||||||
private readonly bool _isRunningAsService;
|
private readonly bool _isRunningAsService;
|
||||||
public bool IsRunningAsService
|
public override bool IsRunningAsService
|
||||||
{
|
{
|
||||||
get { return _isRunningAsService; }
|
get { return _isRunningAsService; }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user