fix official rating description

This commit is contained in:
Luke Pulverenti 2016-02-21 12:22:31 -05:00
parent fd3c6f7ecc
commit 119c4f1435
4 changed files with 39 additions and 6 deletions

View File

@ -934,7 +934,13 @@ namespace MediaBrowser.MediaEncoding.Encoder
_mediaEncoder._runningProcesses.Remove(this); _mediaEncoder._runningProcesses.Remove(this);
} }
process.Dispose(); try
{
process.Dispose();
}
catch (Exception ex)
{
}
} }
private bool _disposed; private bool _disposed;

View File

@ -801,11 +801,21 @@ namespace MediaBrowser.Server.Implementations.LiveTv
{ {
if (!string.IsNullOrWhiteSpace(info.ImagePath)) if (!string.IsNullOrWhiteSpace(info.ImagePath))
{ {
item.SetImagePath(ImageType.Primary, info.ImagePath); item.SetImage(new ItemImageInfo
{
Path = info.ImagePath,
Type = ImageType.Primary,
IsPlaceholder = true
}, 0);
} }
else if (!string.IsNullOrWhiteSpace(info.ImageUrl)) else if (!string.IsNullOrWhiteSpace(info.ImageUrl))
{ {
item.SetImagePath(ImageType.Primary, info.ImageUrl); item.SetImage(new ItemImageInfo
{
Path = info.ImageUrl,
Type = ImageType.Primary,
IsPlaceholder = true
}, 0);
} }
} }

View File

@ -1014,7 +1014,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
if (!reader.IsDBNull(31)) if (!reader.IsDBNull(31))
{ {
item.OfficialRating = reader.GetString(31); item.OfficialRatingDescription = reader.GetString(31);
} }
if (!reader.IsDBNull(32)) if (!reader.IsDBNull(32))

View File

@ -19,6 +19,7 @@ using MediaBrowser.Model.Sync;
using MoreLinq; using MoreLinq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
@ -125,7 +126,23 @@ namespace MediaBrowser.Server.Implementations.Sync
private string GetSyncJobItemName(BaseItem item) private string GetSyncJobItemName(BaseItem item)
{ {
return item.Name; var name = item.Name;
var episode = item as Episode;
if (episode != null)
{
if (episode.IndexNumber.HasValue)
{
name = "E" + episode.IndexNumber.Value.ToString(CultureInfo.InvariantCulture) + " - " + name;
}
if (episode.ParentIndexNumber.HasValue)
{
name = "S" + episode.ParentIndexNumber.Value.ToString(CultureInfo.InvariantCulture) + ", " + name;
}
}
return name;
} }
public Task UpdateJobStatus(string id) public Task UpdateJobStatus(string id)
@ -699,7 +716,7 @@ namespace MediaBrowser.Server.Implementations.Sync
var path = Path.Combine(temporaryPath, filename); var path = Path.Combine(temporaryPath, filename);
_fileSystem.CreateDirectory(Path.GetDirectoryName(path)); _fileSystem.CreateDirectory(Path.GetDirectoryName(path));
using (var stream = await _subtitleEncoder.GetSubtitles(streamInfo.ItemId, streamInfo.MediaSourceId, subtitleStreamIndex, subtitleStreamInfo.Format, 0, null, cancellationToken).ConfigureAwait(false)) using (var stream = await _subtitleEncoder.GetSubtitles(streamInfo.ItemId, streamInfo.MediaSourceId, subtitleStreamIndex, subtitleStreamInfo.Format, 0, null, cancellationToken).ConfigureAwait(false))
{ {