Merge pull request #1077 from Bond-009/musicbrainz
Make MusicBrainz base url configurable
This commit is contained in:
commit
fb96763f65
|
@ -6,7 +6,8 @@ namespace Emby.Server.Implementations
|
|||
{
|
||||
public static readonly Dictionary<string, string> Configuration = new Dictionary<string, string>
|
||||
{
|
||||
{"HttpListenerHost:DefaultRedirectPath", "web/index.html"}
|
||||
{"HttpListenerHost:DefaultRedirectPath", "web/index.html"},
|
||||
{"MusicBrainz:BaseUrl", "https://www.musicbrainz.org"}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" />
|
||||
<PackageReference Include="OptimizedPriorityQueue" Version="4.2.0" />
|
||||
<PackageReference Include="PlaylistsNET" Version="1.0.2" />
|
||||
|
|
|
@ -16,6 +16,7 @@ using MediaBrowser.Model.Entities;
|
|||
using MediaBrowser.Model.Providers;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Model.Xml;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Providers.Music
|
||||
|
@ -30,15 +31,22 @@ namespace MediaBrowser.Providers.Music
|
|||
private readonly IJsonSerializer _json;
|
||||
private readonly IXmlReaderSettingsFactory _xmlSettings;
|
||||
|
||||
public static string MusicBrainzBaseUrl = "https://www.musicbrainz.org";
|
||||
public readonly string MusicBrainzBaseUrl;
|
||||
|
||||
public MusicBrainzAlbumProvider(IHttpClient httpClient, IApplicationHost appHost, ILogger logger, IJsonSerializer json, IXmlReaderSettingsFactory xmlSettings)
|
||||
public MusicBrainzAlbumProvider(
|
||||
IHttpClient httpClient,
|
||||
IApplicationHost appHost,
|
||||
ILogger logger,
|
||||
IJsonSerializer json,
|
||||
IXmlReaderSettingsFactory xmlSettings,
|
||||
IConfiguration configuration)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_appHost = appHost;
|
||||
_logger = logger;
|
||||
_json = json;
|
||||
_xmlSettings = xmlSettings;
|
||||
MusicBrainzBaseUrl = configuration["MusicBrainz:BaseUrl"];
|
||||
Current = this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user