added disc to metadata images section

This commit is contained in:
Luke Pulverenti 2013-05-01 12:06:57 -04:00
parent e76a6255b8
commit 7f5783988a
2 changed files with 19 additions and 5 deletions

View File

@ -638,7 +638,7 @@ namespace MediaBrowser.Api.Playback
ApiEntryPoint.Instance.OnTranscodingFinished(outputFilePath, TranscodingJobType); ApiEntryPoint.Instance.OnTranscodingFinished(outputFilePath, TranscodingJobType);
if (!exitCode.HasValue || exitCode.Value != 0 || state.Item is Video) if (!exitCode.HasValue || exitCode.Value != 0)
{ {
Logger.Info("Deleting partial stream file(s) {0}", outputFilePath); Logger.Info("Deleting partial stream file(s) {0}", outputFilePath);

View File

@ -31,6 +31,22 @@ namespace MediaBrowser.Controller.Providers.Music
return item is MusicAlbum; return item is MusicAlbum;
} }
protected override bool RefreshOnVersionChange
{
get
{
return true;
}
}
protected override string ProviderVersion
{
get
{
return "20130501.5";
}
}
/// <summary> /// <summary>
/// Needses the refresh internal. /// Needses the refresh internal.
/// </summary> /// </summary>
@ -55,8 +71,6 @@ namespace MediaBrowser.Controller.Providers.Music
public override async Task<bool> FetchAsync(BaseItem item, bool force, CancellationToken cancellationToken) public override async Task<bool> FetchAsync(BaseItem item, bool force, CancellationToken cancellationToken)
{ {
var mbid = item.GetProviderId(MetadataProviders.Musicbrainz);
cancellationToken.ThrowIfCancellationRequested(); cancellationToken.ThrowIfCancellationRequested();
var url = string.Format("http://api.fanart.tv/webservice/album/{0}/{1}/xml/all/1/1", APIKey, item.GetProviderId(MetadataProviders.Musicbrainz)); var url = string.Format("http://api.fanart.tv/webservice/album/{0}/{1}/xml/all/1/1", APIKey, item.GetProviderId(MetadataProviders.Musicbrainz));
@ -80,7 +94,7 @@ namespace MediaBrowser.Controller.Providers.Music
{ {
if (ConfigurationManager.Configuration.DownloadMusicAlbumImages.Disc && !item.ResolveArgs.ContainsMetaFileByName(DISC_FILE)) if (ConfigurationManager.Configuration.DownloadMusicAlbumImages.Disc && !item.ResolveArgs.ContainsMetaFileByName(DISC_FILE))
{ {
var node = doc.SelectSingleNode("//fanart/music/albums/album//cdart/@url"); var node = doc.SelectSingleNode("//fanart/music/albums/album/cdart/@url");
var path = node != null ? node.Value : null; var path = node != null ? node.Value : null;
@ -103,7 +117,7 @@ namespace MediaBrowser.Controller.Providers.Music
if (ConfigurationManager.Configuration.DownloadMusicAlbumImages.Primary && !item.ResolveArgs.ContainsMetaFileByName(PRIMARY_FILE)) if (ConfigurationManager.Configuration.DownloadMusicAlbumImages.Primary && !item.ResolveArgs.ContainsMetaFileByName(PRIMARY_FILE))
{ {
var node = doc.SelectSingleNode("//fanart/music/albums/album//albumcover/@url"); var node = doc.SelectSingleNode("//fanart/music/albums/album/albumcover/@url");
var path = node != null ? node.Value : null; var path = node != null ? node.Value : null;