mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 14:08:44 -04:00
removed dead code
This commit is contained in:
parent
f3981e1ec4
commit
53024bd149
3 changed files with 1 additions and 134 deletions
|
@ -315,8 +315,6 @@ namespace MediaBrowser.Api.Playback
|
||||||
StartThrottler(state, transcodingJob);
|
StartThrottler(state, transcodingJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportUsage(state);
|
|
||||||
|
|
||||||
return transcodingJob;
|
return transcodingJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -910,123 +908,6 @@ namespace MediaBrowser.Api.Playback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void ReportUsage(StreamState state)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
await ReportUsageInternal(state).ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Task ReportUsageInternal(StreamState state)
|
|
||||||
{
|
|
||||||
if (!ServerConfigurationManager.Configuration.EnableAnonymousUsageReporting)
|
|
||||||
{
|
|
||||||
return Task.FromResult(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!MediaEncoder.IsDefaultEncoderPath)
|
|
||||||
{
|
|
||||||
return Task.FromResult(true);
|
|
||||||
}
|
|
||||||
return Task.FromResult(true);
|
|
||||||
|
|
||||||
//var dict = new Dictionary<string, string>();
|
|
||||||
|
|
||||||
//var outputAudio = GetAudioEncoder(state);
|
|
||||||
//if (!string.IsNullOrWhiteSpace(outputAudio))
|
|
||||||
//{
|
|
||||||
// dict["outputAudio"] = outputAudio;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//var outputVideo = GetVideoEncoder(state);
|
|
||||||
//if (!string.IsNullOrWhiteSpace(outputVideo))
|
|
||||||
//{
|
|
||||||
// dict["outputVideo"] = outputVideo;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (ServerConfigurationManager.Configuration.CodecsUsed.Contains(outputAudio ?? string.Empty, StringComparer.OrdinalIgnoreCase) &&
|
|
||||||
// ServerConfigurationManager.Configuration.CodecsUsed.Contains(outputVideo ?? string.Empty, StringComparer.OrdinalIgnoreCase))
|
|
||||||
//{
|
|
||||||
// return Task.FromResult(true);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//dict["id"] = AppHost.SystemId;
|
|
||||||
//dict["type"] = state.VideoRequest == null ? "Audio" : "Video";
|
|
||||||
|
|
||||||
//var audioStream = state.AudioStream;
|
|
||||||
//if (audioStream != null && !string.IsNullOrWhiteSpace(audioStream.Codec))
|
|
||||||
//{
|
|
||||||
// dict["inputAudio"] = audioStream.Codec;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//var videoStream = state.VideoStream;
|
|
||||||
//if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec))
|
|
||||||
//{
|
|
||||||
// dict["inputVideo"] = videoStream.Codec;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//var cert = GetType().Assembly.GetModules().First().GetSignerCertificate();
|
|
||||||
//if (cert != null)
|
|
||||||
//{
|
|
||||||
// dict["assemblySig"] = cert.GetCertHashString();
|
|
||||||
// dict["certSubject"] = cert.Subject ?? string.Empty;
|
|
||||||
// dict["certIssuer"] = cert.Issuer ?? string.Empty;
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// return Task.FromResult(true);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (state.SupportedAudioCodecs.Count > 0)
|
|
||||||
//{
|
|
||||||
// dict["supportedAudioCodecs"] = string.Join(",", state.SupportedAudioCodecs.ToArray());
|
|
||||||
//}
|
|
||||||
|
|
||||||
//var auth = AuthorizationContext.GetAuthorizationInfo(Request);
|
|
||||||
|
|
||||||
//dict["appName"] = auth.Client ?? string.Empty;
|
|
||||||
//dict["appVersion"] = auth.Version ?? string.Empty;
|
|
||||||
//dict["device"] = auth.Device ?? string.Empty;
|
|
||||||
//dict["deviceId"] = auth.DeviceId ?? string.Empty;
|
|
||||||
//dict["context"] = "streaming";
|
|
||||||
|
|
||||||
////Logger.Info(JsonSerializer.SerializeToString(dict));
|
|
||||||
//if (!ServerConfigurationManager.Configuration.CodecsUsed.Contains(outputAudio ?? string.Empty, StringComparer.OrdinalIgnoreCase))
|
|
||||||
//{
|
|
||||||
// var list = ServerConfigurationManager.Configuration.CodecsUsed.ToList();
|
|
||||||
// list.Add(outputAudio);
|
|
||||||
// ServerConfigurationManager.Configuration.CodecsUsed = list.ToArray();
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (!ServerConfigurationManager.Configuration.CodecsUsed.Contains(outputVideo ?? string.Empty, StringComparer.OrdinalIgnoreCase))
|
|
||||||
//{
|
|
||||||
// var list = ServerConfigurationManager.Configuration.CodecsUsed.ToList();
|
|
||||||
// list.Add(outputVideo);
|
|
||||||
// ServerConfigurationManager.Configuration.CodecsUsed = list.ToArray();
|
|
||||||
//}
|
|
||||||
|
|
||||||
//ServerConfigurationManager.SaveConfiguration();
|
|
||||||
|
|
||||||
////Logger.Info(JsonSerializer.SerializeToString(dict));
|
|
||||||
//var options = new HttpRequestOptions()
|
|
||||||
//{
|
|
||||||
// Url = "https://mb3admin.com/admin/service/transcoding/report",
|
|
||||||
// CancellationToken = CancellationToken.None,
|
|
||||||
// LogRequest = false,
|
|
||||||
// LogErrors = false,
|
|
||||||
// BufferContent = false
|
|
||||||
//};
|
|
||||||
//options.RequestContent = JsonSerializer.SerializeToString(dict);
|
|
||||||
//options.RequestContentType = "application/json";
|
|
||||||
|
|
||||||
//return HttpClient.Post(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds the dlna headers.
|
/// Adds the dlna headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -126,7 +126,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
Task UpdateEncoderPath(string path, string pathType);
|
Task UpdateEncoderPath(string path, string pathType);
|
||||||
bool SupportsEncoder(string encoder);
|
bool SupportsEncoder(string encoder);
|
||||||
bool IsDefaultEncoderPath { get; }
|
|
||||||
|
|
||||||
void SetLogFilename(string name);
|
void SetLogFilename(string name);
|
||||||
void ClearLogFilename();
|
void ClearLogFilename();
|
||||||
|
|
|
@ -187,18 +187,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsDefaultEncoderPath
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var path = FFMpegPath;
|
|
||||||
|
|
||||||
var parentPath = Path.Combine(ConfigurationManager.ApplicationPaths.ProgramDataPath, "ffmpeg", "20160410");
|
|
||||||
|
|
||||||
return FileSystem.ContainsSubPath(parentPath, path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsSystemInstalledPath(string path)
|
private bool IsSystemInstalledPath(string path)
|
||||||
{
|
{
|
||||||
if (path.IndexOf("/", StringComparison.Ordinal) == -1 && path.IndexOf("\\", StringComparison.Ordinal) == -1)
|
if (path.IndexOf("/", StringComparison.Ordinal) == -1 && path.IndexOf("\\", StringComparison.Ordinal) == -1)
|
||||||
|
@ -226,8 +214,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(directory) && FileSystem.ContainsSubPath(ConfigurationManager.ApplicationPaths.ProgramDataPath, directory))
|
if (!string.IsNullOrWhiteSpace(directory) && FileSystem.ContainsSubPath(ConfigurationManager.ApplicationPaths.ProgramDataPath, directory))
|
||||||
{
|
{
|
||||||
await new FontConfigLoader(_httpClient, ConfigurationManager.ApplicationPaths, _logger, _zipClient,
|
await new FontConfigLoader(_httpClient, ConfigurationManager.ApplicationPaths, _logger, _zipClient, FileSystem).DownloadFonts(directory).ConfigureAwait(false);
|
||||||
FileSystem).DownloadFonts(directory).ConfigureAwait(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue