mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
display program data path and bookmark in the dashboard
This commit is contained in:
parent
5b280de519
commit
7736c8cefc
@ -131,6 +131,16 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
|
|||||||
await options.ResourcePool.WaitAsync(options.CancellationToken).ConfigureAwait(false);
|
await options.ResourcePool.WaitAsync(options.CancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((DateTime.UtcNow - client.LastTimeout).TotalSeconds < 30)
|
||||||
|
{
|
||||||
|
if (options.ResourcePool != null)
|
||||||
|
{
|
||||||
|
options.ResourcePool.Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new HttpException(string.Format("Connection to {0} timed out", options.Url)) { IsTimedOut = true };
|
||||||
|
}
|
||||||
|
|
||||||
_logger.Info("HttpClientManager.Get url: {0}", options.Url);
|
_logger.Info("HttpClientManager.Get url: {0}", options.Url);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -61,6 +61,12 @@ namespace MediaBrowser.Model.System
|
|||||||
/// <value>The id.</value>
|
/// <value>The id.</value>
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the program data path.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The program data path.</value>
|
||||||
|
public string ProgramDataPath { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SystemInfo"/> class.
|
/// Initializes a new instance of the <see cref="SystemInfo"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -306,6 +306,33 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var localPath = context.Request.Url.LocalPath;
|
||||||
|
|
||||||
|
if (string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
context.Response.Redirect(DefaultRedirectPath);
|
||||||
|
context.Response.Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (string.Equals(localPath, "/mediabrowser", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
context.Response.Redirect("mediabrowser/" + DefaultRedirectPath);
|
||||||
|
context.Response.Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
context.Response.Redirect("mediabrowser/" + DefaultRedirectPath);
|
||||||
|
context.Response.Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(localPath))
|
||||||
|
{
|
||||||
|
context.Response.Redirect("/mediabrowser/" + DefaultRedirectPath);
|
||||||
|
context.Response.Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RaiseReceiveWebRequest(context);
|
RaiseReceiveWebRequest(context);
|
||||||
|
|
||||||
await Task.Factory.StartNew(() =>
|
await Task.Factory.StartNew(() =>
|
||||||
|
@ -191,7 +191,7 @@ namespace MediaBrowser.ServerApplication
|
|||||||
{
|
{
|
||||||
base.OnLoggerLoaded();
|
base.OnLoggerLoaded();
|
||||||
|
|
||||||
_httpServerCreationTask = Task.Run(() => ServerFactory.CreateServer(this, LogManager, "Media Browser", "index.html"));
|
_httpServerCreationTask = Task.Run(() => ServerFactory.CreateServer(this, LogManager, "Media Browser", "dashboard/index.html"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -516,7 +516,8 @@ namespace MediaBrowser.ServerApplication
|
|||||||
FailedPluginAssemblies = FailedAssemblies.ToArray(),
|
FailedPluginAssemblies = FailedAssemblies.ToArray(),
|
||||||
InProgressInstallations = InstallationManager.CurrentInstallations.Select(i => i.Item1).ToArray(),
|
InProgressInstallations = InstallationManager.CurrentInstallations.Select(i => i.Item1).ToArray(),
|
||||||
CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
|
CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
|
||||||
Id = _systemId
|
Id = _systemId,
|
||||||
|
ProgramDataPath = ApplicationPaths.ProgramDataPath
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user