Make MusicBrainz base url configurable
This commit is contained in:
parent
40089e2fd9
commit
58061a7295
|
@ -6,7 +6,8 @@ namespace Emby.Server.Implementations
|
||||||
{
|
{
|
||||||
public static readonly Dictionary<string, string> Configuration = new Dictionary<string, string>
|
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>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" />
|
||||||
<PackageReference Include="OptimizedPriorityQueue" Version="4.2.0" />
|
<PackageReference Include="OptimizedPriorityQueue" Version="4.2.0" />
|
||||||
<PackageReference Include="PlaylistsNET" Version="1.0.2" />
|
<PackageReference Include="PlaylistsNET" Version="1.0.2" />
|
||||||
|
|
|
@ -16,6 +16,7 @@ using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using MediaBrowser.Model.Xml;
|
using MediaBrowser.Model.Xml;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Providers.Music
|
namespace MediaBrowser.Providers.Music
|
||||||
|
@ -30,15 +31,22 @@ namespace MediaBrowser.Providers.Music
|
||||||
private readonly IJsonSerializer _json;
|
private readonly IJsonSerializer _json;
|
||||||
private readonly IXmlReaderSettingsFactory _xmlSettings;
|
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;
|
_httpClient = httpClient;
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_json = json;
|
_json = json;
|
||||||
_xmlSettings = xmlSettings;
|
_xmlSettings = xmlSettings;
|
||||||
|
MusicBrainzBaseUrl = configuration["MusicBrainz:BaseUrl"];
|
||||||
Current = this;
|
Current = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user