sync updates

pull/702/head
Luke Pulverenti 10 years ago
parent bdb9cd77bc
commit 01f4ddbdc3

@ -821,9 +821,6 @@
<Compile Include="..\MediaBrowser.Model\Net\WebSocketState.cs">
<Link>Net\WebSocketState.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\News\NewsChannel.cs">
<Link>News\NewsChannel.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\News\NewsItem.cs">
<Link>News\NewsItem.cs</Link>
</Compile>

@ -780,9 +780,6 @@
<Compile Include="..\MediaBrowser.Model\Net\WebSocketState.cs">
<Link>Net\WebSocketState.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\News\NewsChannel.cs">
<Link>News\NewsChannel.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\News\NewsItem.cs">
<Link>News\NewsItem.cs</Link>
</Compile>

@ -265,7 +265,6 @@
<Compile Include="MediaInfo\SubtitleFormat.cs" />
<Compile Include="MediaInfo\TransportStreamTimestamp.cs" />
<Compile Include="MediaInfo\VideoCodec.cs" />
<Compile Include="News\NewsChannel.cs" />
<Compile Include="News\NewsItem.cs" />
<Compile Include="News\NewsQuery.cs" />
<Compile Include="Notifications\NotificationRequest.cs" />

@ -1,12 +0,0 @@
using System.Collections.Generic;
namespace MediaBrowser.Model.News
{
public class NewsChannel
{
public string Title { get; set; }
public string Link { get; set; }
public string Description { get; set; }
public List<NewsItem> Items { get; set; }
}
}

@ -192,10 +192,10 @@
"LabelPlayMethodDirectPlay": "Reproducci\u00f3n Directa",
"LabelAudioCodec": "Audio: {0}",
"LabelVideoCodec": "Video: {0}",
"LabelLocalAccessUrl": "Local access: {0}",
"LabelLocalAccessUrl": "Direcci\u00f3n local: {0}",
"LabelRemoteAccessUrl": "Acceso remoto: {0}",
"LabelRunningOnPort": "Running on http port {0}.",
"LabelRunningOnPorts": "Running on http port {0}, and https port {1}.",
"LabelRunningOnPort": "Ejecut\u00e1ndose en el puerto http {0}.",
"LabelRunningOnPorts": "Ejecut\u00e1ndose en el puerto http {0} y el puerto https {1}.",
"HeaderLatestFromChannel": "M\u00e1s recientes desde {0}",
"ButtonDownload": "Descargar",
"LabelUnknownLanaguage": "Idioma desconocido",
@ -585,7 +585,7 @@
"MediaInfoRefFrames": "Tramas de referencia",
"TabPlayback": "Reproducci\u00f3n",
"TabNotifications": "Notificaciones",
"TabExpert": "Expert",
"TabExpert": "Experto",
"HeaderSelectCustomIntrosPath": "Seleccionar Trayectorias Personalizadas de Intros",
"HeaderRateAndReview": "Clasificar y Rese\u00f1ar",
"HeaderThankYou": "Gracias",

@ -192,10 +192,10 @@
"LabelPlayMethodDirectPlay": "Direct Play",
"LabelAudioCodec": "Audio : {0}",
"LabelVideoCodec": "Vid\u00e9o : {0}",
"LabelLocalAccessUrl": "Local access: {0}",
"LabelLocalAccessUrl": "Acc\u00e8s local : {0}",
"LabelRemoteAccessUrl": "URL d'acc\u00e8s \u00e0 distance: {0}",
"LabelRunningOnPort": "Running on http port {0}.",
"LabelRunningOnPorts": "Running on http port {0}, and https port {1}.",
"LabelRunningOnPort": "En cours d'ex\u00e9cution sur le port http {0}.",
"LabelRunningOnPorts": "En cours d'ex\u00e9cution sur le port http {0} et https {1}.",
"HeaderLatestFromChannel": "Les plus r\u00e9cents de {0}",
"ButtonDownload": "T\u00e9l\u00e9chargement",
"LabelUnknownLanaguage": "Langue inconnue",

@ -620,7 +620,7 @@
"DashboardTourMobile": "Het dashboard van Media Browser werkt geweldig op smartphones en tablets. Beheer je server vanuit de palm van je hand, overal en altijd.",
"MessageRefreshQueued": "Vernieuwen wachtrij",
"TabDevices": "Apparaten",
"TabExtras": "Extras",
"TabExtras": "Extra's",
"DeviceLastUsedByUserName": "Het laatste gebruikt door {0}",
"HeaderDeleteDevice": "Verwijder apparaat",
"DeleteDeviceConfirmation": "Weet u zeker dat u dit apparaat wilt verwijderen? Het zal opnieuw verschijnen als een gebruiker zich hiermee aanmeldt.",

@ -192,10 +192,10 @@
"LabelPlayMethodDirectPlay": "\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e",
"LabelAudioCodec": "\u0410\u0443\u0434\u0438\u043e: {0}",
"LabelVideoCodec": "\u0412\u0438\u0434\u0435\u043e: {0}",
"LabelLocalAccessUrl": "Local access: {0}",
"LabelLocalAccessUrl": "\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441: {0}",
"LabelRemoteAccessUrl": "\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f: {0}",
"LabelRunningOnPort": "Running on http port {0}.",
"LabelRunningOnPorts": "Running on http port {0}, and https port {1}.",
"LabelRunningOnPort": "\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 http-\u043f\u043e\u0440\u0442\u0443 {0}.",
"LabelRunningOnPorts": "\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 http-\u043f\u043e\u0440\u0442\u0443 {0} \u0438 https-\u043f\u043e\u0440\u0442\u0443 {1}.",
"HeaderLatestFromChannel": "\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0438\u0437 {0}",
"ButtonDownload": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c",
"LabelUnknownLanaguage": "\u041d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a",
@ -585,7 +585,7 @@
"MediaInfoRefFrames": "\u041e\u043f\u043e\u0440\u043d\u044b\u0435 \u043a\u0430\u0434\u0440\u044b",
"TabPlayback": "\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435",
"TabNotifications": "\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f",
"TabExpert": "Expert",
"TabExpert": "\u0414\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445",
"HeaderSelectCustomIntrosPath": "\u0412\u044b\u0431\u043e\u0440 \u043f\u0443\u0442\u0438 \u043a \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0437\u0430\u0441\u0442\u0430\u0432\u043a\u0430\u043c",
"HeaderRateAndReview": "\u041e\u0446\u0435\u043d\u043a\u0430 \u0438 \u043e\u0442\u0437\u044b\u0432",
"HeaderThankYou": "\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043c \u0432\u0430\u0441",
@ -620,7 +620,7 @@
"DashboardTourMobile": "\u0418\u043d\u0444\u043e\u043f\u0430\u043d\u0435\u043b\u044c Media Browser \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043d\u0430 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0430\u0445 \u0438 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u0430\u0445. \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0441 \u0432\u0430\u0448\u0435\u0439 \u043b\u0430\u0434\u043e\u043d\u0438 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435.",
"MessageRefreshQueued": "\u041f\u043e\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438",
"TabDevices": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430",
"TabExtras": "Extras",
"TabExtras": "\u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435",
"DeviceLastUsedByUserName": "\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435: {0}",
"HeaderDeleteDevice": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",
"DeleteDeviceConfirmation": "\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e? \u041e\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043d\u043e\u0432\u0430 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e\u0439\u0434\u0451\u0442 \u0441 \u043d\u0435\u0433\u043e.",

@ -107,7 +107,8 @@ namespace MediaBrowser.Server.Implementations.News
{
Date = i.Date,
Name = i.Title,
Description = i.Link,
Description = i.Description,
Url = i.Link,
UserIds = _userManager.Users.Select(u => u.Id.ToString("N")).ToList()
}, cancellationToken));

@ -348,18 +348,18 @@ namespace MediaBrowser.Server.Implementations.Sync
public async Task SyncJobItems(SyncJobItem[] items, bool enableConversion, IProgress<double> progress, CancellationToken cancellationToken)
{
var index = 0;
var numComplete = 0;
foreach (var item in items)
{
double percent = index;
percent /= items.Length;
progress.Report(100 * percent);
cancellationToken.ThrowIfCancellationRequested();
double percentPerItem = 1;
percentPerItem /= items.Length;
var startingPercent = numComplete * percentPerItem * 100;
var innerProgress = new ActionableProgress<double>();
innerProgress.RegisterAction(p => progress.Report(startingPercent + (percentPerItem * p)));
var job = _syncRepo.GetJob(item.JobId);
await ProcessJobItem(job, item, enableConversion, innerProgress, cancellationToken).ConfigureAwait(false);
@ -367,7 +367,10 @@ namespace MediaBrowser.Server.Implementations.Sync
job = _syncRepo.GetJob(item.JobId);
await UpdateJobStatus(job).ConfigureAwait(false);
index++;
numComplete++;
double percent = numComplete;
percent /= items.Length;
progress.Report(100 * percent);
}
}
@ -432,9 +435,9 @@ namespace MediaBrowser.Server.Implementations.Sync
var streamInfo = new StreamBuilder().BuildVideoItem(options);
var mediaSource = streamInfo.MediaSource;
var externalSubs = streamInfo.GetExternalSubtitles("dummy", false);
var hasExternalSubs = externalSubs.Count > 0;
var requiresConversion = streamInfo.PlayMethod == PlayMethod.Transcode || hasExternalSubs;
// Mark as requiring conversion if transcoding the video, or if any subtitles need to be extracted
var requiresConversion = streamInfo.PlayMethod == PlayMethod.Transcode || externalSubs.Any(i => RequiresExtraction(i, mediaSource));
if (requiresConversion && !enableConversion)
{
@ -498,7 +501,7 @@ namespace MediaBrowser.Server.Implementations.Sync
jobItem.MediaSource = mediaSource;
}
if (hasExternalSubs)
if (externalSubs.Count > 0)
{
// Save the job item now since conversion could take a while
await _syncRepo.Update(jobItem).ConfigureAwait(false);
@ -511,6 +514,13 @@ namespace MediaBrowser.Server.Implementations.Sync
await _syncRepo.Update(jobItem).ConfigureAwait(false);
}
private bool RequiresExtraction(SubtitleStreamInfo stream, MediaSourceInfo mediaSource)
{
var originalStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Subtitle && i.Index == stream.Index);
return originalStream != null && !originalStream.IsExternal;
}
private async Task ConvertSubtitles(SyncJobItem jobItem,
IEnumerable<SubtitleStreamInfo> subtitles,
StreamInfo streamInfo,

@ -60,8 +60,8 @@ namespace MediaBrowser.Server.Implementations.Sync
public Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
{
return new SyncJobProcessor(_libraryManager, _syncRepo, _syncManager, _logger, _userManager, _tvSeriesManager, _mediaEncoder, _subtitleEncoder, _config, _fileSystem).Sync(progress,
cancellationToken);
return new SyncJobProcessor(_libraryManager, _syncRepo, _syncManager, _logger, _userManager, _tvSeriesManager, _mediaEncoder, _subtitleEncoder, _config, _fileSystem)
.Sync(progress, cancellationToken);
}
public IEnumerable<ITaskTrigger> GetDefaultTriggers()

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
<version>3.0.543</version>
<version>3.0.544</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.543" />
<dependency id="MediaBrowser.Common" version="3.0.544" />
<dependency id="NLog" version="3.1.0.0" />
<dependency id="SimpleInjector" version="2.6.1" />
</dependencies>

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
<version>3.0.543</version>
<version>3.0.544</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Model.Signed</id>
<version>3.0.543</version>
<version>3.0.544</version>
<title>MediaBrowser.Model - Signed Edition</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
<version>3.0.543</version>
<version>3.0.544</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.543" />
<dependency id="MediaBrowser.Common" version="3.0.544" />
</dependencies>
</metadata>
<files>

Loading…
Cancel
Save