mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 22:07:13 -04:00
updated plugin security
This commit is contained in:
parent
a11e00b8d5
commit
9cdda84b06
@ -69,7 +69,7 @@ namespace MediaBrowser.Common.Implementations.Security
|
|||||||
_kernel = kernel;
|
_kernel = kernel;
|
||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
//MBRegistration.Init(appPaths);
|
MBRegistration.Init(appPaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -6,6 +6,7 @@ using System.Text;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
@ -16,8 +17,10 @@ namespace MediaBrowser.Controller.Providers.Music
|
|||||||
{
|
{
|
||||||
public class LastfmArtistProvider : LastfmBaseArtistProvider
|
public class LastfmArtistProvider : LastfmBaseArtistProvider
|
||||||
{
|
{
|
||||||
public LastfmArtistProvider(IJsonSerializer jsonSerializer, IHttpClient httpClient, ILogManager logManager)
|
internal readonly SemaphoreSlim LastfmResourcePool = new SemaphoreSlim(5, 5);
|
||||||
: base(jsonSerializer, httpClient, logManager)
|
|
||||||
|
public LastfmArtistProvider(IJsonSerializer jsonSerializer, IHttpClient httpClient, ILogManager logManager, IServerConfigurationManager configurationManager)
|
||||||
|
: base(jsonSerializer, httpClient, logManager, configurationManager)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +33,7 @@ namespace MediaBrowser.Controller.Providers.Music
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var json = await HttpClient.Get(url, Kernel.Instance.ResourcePools.MovieDb, cancellationToken).ConfigureAwait(false))
|
using (var json = await HttpClient.Get(url, LastfmResourcePool, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
searchResult = JsonSerializer.DeserializeFromStream<LastfmArtistSearchResults>(json);
|
searchResult = JsonSerializer.DeserializeFromStream<LastfmArtistSearchResults>(json);
|
||||||
}
|
}
|
||||||
@ -61,7 +64,7 @@ namespace MediaBrowser.Controller.Providers.Music
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var json = await HttpClient.Get(url, Kernel.Instance.ResourcePools.Lastfm, cancellationToken).ConfigureAwait(false))
|
using (var json = await HttpClient.Get(url, LastfmResourcePool, cancellationToken).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
result = JsonSerializer.DeserializeFromStream<LastfmGetArtistResult>(json);
|
result = JsonSerializer.DeserializeFromStream<LastfmGetArtistResult>(json);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ using System.Net;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using MediaBrowser.Model.Net;
|
using MediaBrowser.Model.Net;
|
||||||
@ -14,8 +15,8 @@ namespace MediaBrowser.Controller.Providers.Music
|
|||||||
{
|
{
|
||||||
public abstract class LastfmBaseArtistProvider : LastfmBaseProvider
|
public abstract class LastfmBaseArtistProvider : LastfmBaseProvider
|
||||||
{
|
{
|
||||||
protected LastfmBaseArtistProvider(IJsonSerializer jsonSerializer, IHttpClient httpClient, ILogManager logManager)
|
protected LastfmBaseArtistProvider(IJsonSerializer jsonSerializer, IHttpClient httpClient, ILogManager logManager, IServerConfigurationManager configurationManager)
|
||||||
: base(jsonSerializer, httpClient, logManager)
|
: base(jsonSerializer, httpClient, logManager, configurationManager)
|
||||||
{
|
{
|
||||||
LocalMetaFileName = "MBArtist.json";
|
LocalMetaFileName = "MBArtist.json";
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.26</version>
|
<version>3.0.28</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.26" />
|
<dependency id="MediaBrowser.Common" version="3.0.28" />
|
||||||
<dependency id="NLog" version="2.0.0.2000" />
|
<dependency id="NLog" version="2.0.0.2000" />
|
||||||
<dependency id="ServiceStack" version="3.9.37" />
|
<dependency id="ServiceStack" version="3.9.37" />
|
||||||
<dependency id="ServiceStack.Api.Swagger" version="3.9.35" />
|
<dependency id="ServiceStack.Api.Swagger" version="3.9.35" />
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.26</version>
|
<version>3.0.28</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.26</version>
|
<version>3.0.28</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.26" />
|
<dependency id="MediaBrowser.Common" version="3.0.28" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
Loading…
Reference in New Issue
Block a user