Skip to content

Commit

Permalink
add latest translations
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Apr 3, 2014
1 parent b31b668 commit 2136e02
Show file tree
Hide file tree
Showing 104 changed files with 672 additions and 374 deletions.
7 changes: 3 additions & 4 deletions MediaBrowser.Api/Library/LibraryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,11 @@ private IEnumerable<T> FilterItems<T>(IEnumerable<T> items, GetItemCounts reques
/// Posts the specified request.
/// </summary>
/// <param name="request">The request.</param>
public async void Post(RefreshLibrary request)
public void Post(RefreshLibrary request)
{
try
{
await _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None)
.ConfigureAwait(false);
_libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None);
}
catch (Exception ex)
{
Expand Down Expand Up @@ -513,7 +512,7 @@ private Task DeleteItem(DeleteItem request)
{
throw new UnauthorizedAccessException("This operation requires a logged in user with delete access.");
}

return _libraryManager.DeleteItem(item);
}

Expand Down
26 changes: 10 additions & 16 deletions MediaBrowser.Api/Playback/BaseStreamingService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MediaBrowser.Common.Extensions;
using System.Text;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.IO;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Dlna;
Expand Down Expand Up @@ -153,7 +154,7 @@ protected string GetFastSeekCommandLineParameter(StreamRequest request)

if (time.HasValue)
{
var seconds = TimeSpan.FromTicks(time.Value).TotalSeconds - FastSeekOffsetSeconds;
var seconds = TimeSpan.FromTicks(time.Value).TotalSeconds;

if (seconds > 0)
{
Expand All @@ -172,16 +173,6 @@ protected string GetFastSeekCommandLineParameter(StreamRequest request)
/// <value>The slow seek command line parameter.</value>
protected string GetSlowSeekCommandLineParameter(StreamRequest request)
{
var time = request.StartTimeTicks;

if (time.HasValue)
{
if (TimeSpan.FromTicks(time.Value).TotalSeconds - FastSeekOffsetSeconds > 0)
{
return string.Format(" -ss {0}", FastSeekOffsetSeconds.ToString(UsCulture));
}
}

return string.Empty;
}

Expand Down Expand Up @@ -922,14 +913,18 @@ protected async Task StartFfMpeg(StreamState state, string outputPath)

ApiEntryPoint.Instance.OnTranscodeBeginning(outputPath, TranscodingJobType, process, state.IsInputVideo, state.Request.StartTimeTicks, state.MediaPath, state.Request.DeviceId);

Logger.Info(process.StartInfo.FileName + " " + process.StartInfo.Arguments);
var commandLineLogMessage = process.StartInfo.FileName + " " + process.StartInfo.Arguments;
Logger.Info(commandLineLogMessage);

var logFilePath = Path.Combine(ServerConfigurationManager.ApplicationPaths.LogDirectoryPath, "ffmpeg-" + Guid.NewGuid() + ".txt");
Directory.CreateDirectory(Path.GetDirectoryName(logFilePath));

// FFMpeg writes debug/error info to stderr. This is useful when debugging so let's put it in the log directory.
state.LogFileStream = FileSystem.GetFileStream(logFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, true);

var commandLineLogMessageBytes = Encoding.UTF8.GetBytes(commandLineLogMessage + Environment.NewLine + Environment.NewLine);
await state.LogFileStream.WriteAsync(commandLineLogMessageBytes, 0, commandLineLogMessageBytes.Length).ConfigureAwait(false);

process.Exited += (sender, args) => OnFfMpegProcessExited(process, state);

try
Expand Down Expand Up @@ -1149,7 +1144,7 @@ protected async void OnFfMpegProcessExited(Process process, StreamState state)
return state.VideoRequest.Framerate.Value;
}

var maxrate = state.VideoRequest.MaxFramerate ?? 23.976;
var maxrate = state.VideoRequest.MaxFramerate ?? 23.97602;

if (state.VideoStream != null)
{
Expand Down Expand Up @@ -1628,7 +1623,7 @@ private void ApplyDeviceProfileSettings(StreamState state)
}

var profile = string.IsNullOrWhiteSpace(state.Request.DeviceProfileId) ?
DlnaManager.GetProfile(headers) :
null :
DlnaManager.GetProfile(state.Request.DeviceProfileId);

if (profile == null)
Expand Down Expand Up @@ -1686,7 +1681,6 @@ private void ApplyDeviceProfileSettings(StreamState state)
}
}


/// <summary>
/// Adds the dlna headers.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
/// <summary>
/// Plugin Update Task
/// </summary>
public class SystemUpdateTask : IScheduledTask
public class SystemUpdateTask : IScheduledTask, IHasKey
{
/// <summary>
/// The _app host
Expand Down Expand Up @@ -140,5 +140,10 @@ public string Category
{
get { return "Application"; }
}

public string Key
{
get { return "SystemUpdateTask"; }
}
}
}
5 changes: 5 additions & 0 deletions MediaBrowser.Common/ScheduledTasks/IScheduledTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ public interface IConfigurableScheduledTask
/// <value><c>true</c> if this instance is enabled; otherwise, <c>false</c>.</value>
bool IsEnabled { get; }
}

public interface IHasKey
{
string Key { get; }
}
}
11 changes: 10 additions & 1 deletion MediaBrowser.Common/ScheduledTasks/ScheduledTaskHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ public static TaskInfo GetTaskInfo(IScheduledTaskWorker task)
isHidden = configurableTask.IsHidden;
}

string key = null;

var hasKey = task.ScheduledTask as IHasKey;

if (hasKey != null)
{
key = hasKey.Key;
}
return new TaskInfo
{
Name = task.Name,
Expand All @@ -35,7 +43,8 @@ public static TaskInfo GetTaskInfo(IScheduledTaskWorker task)
Triggers = task.Triggers.Select(GetTriggerInfo).ToList(),
Description = task.Description,
Category = task.Category,
IsHidden = isHidden
IsHidden = isHidden,
Key = key
};
}

Expand Down
9 changes: 8 additions & 1 deletion MediaBrowser.Dlna/DlnaManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,14 @@ public DeviceProfile GetProfile(IDictionary<string, string> headers)
throw new ArgumentNullException("headers");
}

return GetProfiles().FirstOrDefault(i => i.Identification != null && IsMatch(headers, i.Identification));
var profile = GetProfiles().FirstOrDefault(i => i.Identification != null && IsMatch(headers, i.Identification));

if (profile != null)
{
_logger.Debug("Found matching device profile: {0}", profile.Name);
}

return profile;
}

private bool IsMatch(IDictionary<string, string> headers, DeviceIdentification profileInfo)
Expand Down
5 changes: 2 additions & 3 deletions MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Xml.Serialization;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna;
using System.Xml.Serialization;

namespace MediaBrowser.Dlna.Profiles
{
Expand Down
5 changes: 2 additions & 3 deletions MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Xml.Serialization;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna;
using System.Xml.Serialization;

namespace MediaBrowser.Dlna.Profiles
{
Expand Down
5 changes: 2 additions & 3 deletions MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Xml.Serialization;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna;
using System.Xml.Serialization;

namespace MediaBrowser.Dlna.Profiles
{
Expand Down
5 changes: 2 additions & 3 deletions MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Xml.Serialization;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna;
using System.Xml.Serialization;

namespace MediaBrowser.Dlna.Profiles
{
Expand Down
3 changes: 1 addition & 2 deletions MediaBrowser.Dlna/Profiles/Xbox360Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public Xbox360Profile()
AudioCodec = "wmav2",
Type = DlnaProfileType.Video,
TranscodeSeekInfo = TranscodeSeekInfo.Bytes,
EstimateContentLength = true,
VideoProfile= "baseline"
EstimateContentLength = true
},
new TranscodingProfile
{
Expand Down
5 changes: 2 additions & 3 deletions MediaBrowser.Dlna/Profiles/XboxOneProfile.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Xml.Serialization;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna;
using System.Xml.Serialization;

namespace MediaBrowser.Dlna.Profiles
{
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</DirectPlayProfiles>
<TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" />
<TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" videoProfile="baseline" />
<TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" />
</TranscodingProfiles>
<ContainerProfiles>
Expand Down
34 changes: 32 additions & 2 deletions MediaBrowser.Model/Dlna/StreamBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class StreamBuilder
public StreamInfo BuildAudioItem(AudioOptions options)
{
ValidateAudioInput(options);

var mediaSources = options.MediaSources;

// If the client wants a specific media soure, filter now
Expand Down Expand Up @@ -201,7 +201,7 @@ private bool IsEligibleForDirectPlay(MediaSourceInfo item, VideoOptions options)
return false;
}

if (options.AudioStreamIndex.HasValue &&
if (options.AudioStreamIndex.HasValue &&
item.MediaStreams.Count(i => i.Type == MediaStreamType.Audio) > 1)
{
return false;
Expand Down Expand Up @@ -503,10 +503,40 @@ private bool IsConditionSatisfied(ProfileCondition condition, string mediaPath,
return videoStream == null ? null : videoStream.Width;
case ProfileConditionValue.VideoLevel:
return videoStream == null ? null : videoStream.Level;
case ProfileConditionValue.VideoBitDepth:
return videoStream == null ? null : GetBitDepth(videoStream);
default:
throw new InvalidOperationException("Unexpected Property");
}
}

private int? GetBitDepth(MediaStream videoStream)
{
var eightBit = new List<string>
{
"yuv420p",
"yuv411p",
"yuvj420p",
"uyyvyy411",
"nv12",
"nv21",
"rgb444le",
"rgb444be",
"bgr444le",
"bgr444be",
"yuvj411p"
};

if (!string.IsNullOrEmpty(videoStream.PixelFormat))
{
if (eightBit.Contains(videoStream.PixelFormat, StringComparer.OrdinalIgnoreCase))
{
return 8;
}
}

return null;
}
}

}
6 changes: 6 additions & 0 deletions MediaBrowser.Model/Tasks/TaskInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public class TaskInfo
/// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
public bool IsHidden { get; set; }

/// <summary>
/// Gets or sets the key.
/// </summary>
/// <value>The key.</value>
public string Key { get; set; }

/// <summary>
/// Initializes a new instance of the <see cref="TaskInfo"/> class.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ protected override void OnConfigurationUpdated()
{
UpdateItemsByNamePath();
UpdateTranscodingTempPath();
UpdateMetadataPath();

base.OnConfigurationUpdated();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"SettingsSaved":"Param\u00e8tres sauvegard\u00e9s.","AddUser":"Ajouter utilisateur","Users":"Utilisateur","Delete":"Supprimer","Administrator":"Administrateur","Password":"Mot de passe","DeleteImage":"Supprimer Image","DeleteImageConfirmation":"\u00cates-vous s\u00fbr de vouloir supprimer l'image?","FileReadCancelled":"La lecture du fichier a \u00e9t\u00e9 annul\u00e9e.","FileNotFound":"Fichier non trouv\u00e9","FileReadError":"Un erreur est survenue pendant la lecture du fichier.","DeleteUser":"Supprimer utilisateur","DeleteUserConfirmation":"\u00cates-vous s\u00fbr de vouloir supprimer {0}?","PasswordResetHeader":"R\u00e9initialisation du mot de passe","PasswordResetComplete":"Le mot de passe a \u00e9t\u00e9 r\u00e9initialis\u00e9.","PasswordResetConfirmation":"\u00cates-vous s\u00fbr de vouloir r\u00e9initialiser le mot de passe?","PasswordSaved":"Mot de passe sauvegard\u00e9.","PasswordMatchError":"Mot de passe et confirmation de mot de passe doivent correspondre.","OptionOff":"Off","OptionOn":"On","OptionRelease":"Lancement","OptionBeta":"Beta","OptionDev":"Dev","UninstallPluginHeader":"D\u00e9sinstaller Plug-in","UninstallPluginConfirmation":"\u00cates-vous s\u00fbr de vouloir d\u00e9sinstaller {0}?","NoPluginConfigurationMessage":"Ce module d'extension n'a rien \u00e0 configurer.","NoPluginsInstalledMessage":"Vous n'avez aucun module d'extension install\u00e9.","BrowsePluginCatalogMessage":"Explorer notre catalogue de modules d'extension pour voir ce qui est disponible."}
{"SettingsSaved":"Param\u00e8tres sauvegard\u00e9s.","AddUser":"Ajouter utilisateur","Users":"Utilisateurs","Delete":"Supprimer","Administrator":"Administrateur","Password":"Mot de passe","DeleteImage":"Supprimer Image","DeleteImageConfirmation":"\u00cates-vous s\u00fbr de vouloir supprimer l'image?","FileReadCancelled":"La lecture du fichier a \u00e9t\u00e9 annul\u00e9e.","FileNotFound":"Fichier non trouv\u00e9","FileReadError":"Un erreur est survenue pendant la lecture du fichier.","DeleteUser":"Supprimer utilisateur","DeleteUserConfirmation":"\u00cates-vous s\u00fbr de vouloir supprimer {0}?","PasswordResetHeader":"R\u00e9initialisation du mot de passe","PasswordResetComplete":"Le mot de passe a \u00e9t\u00e9 r\u00e9initialis\u00e9.","PasswordResetConfirmation":"\u00cates-vous s\u00fbr de vouloir r\u00e9initialiser le mot de passe?","PasswordSaved":"Mot de passe sauvegard\u00e9.","PasswordMatchError":"Le mot de passe et sa confirmation doivent correspondre.","OptionOff":"Off","OptionOn":"On","OptionRelease":"Lancement","OptionBeta":"Beta","OptionDev":"Dev","UninstallPluginHeader":"D\u00e9sinstaller Plug-in","UninstallPluginConfirmation":"\u00cates-vous s\u00fbr de vouloir d\u00e9sinstaller {0}?","NoPluginConfigurationMessage":"Ce module d'extension n'a rien \u00e0 configurer.","NoPluginsInstalledMessage":"Vous n'avez aucun module d'extension install\u00e9.","BrowsePluginCatalogMessage":"Explorer notre catalogue de Plug-ins disponibles."}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"SettingsSaved":"Instellingen opgeslagen.","AddUser":"Gebruiker toevoegen","Users":"Gebruikers","Delete":"Verwijderen","Administrator":"Beheerder","Password":"Wachtwoord","DeleteImage":"Verwijder afbeelding","DeleteImageConfirmation":"Weet je zeker dat je deze afbeelding wilt verwijderen?","FileReadCancelled":"Het lezen van het bestand is geannuleerd","FileNotFound":"Bestand niet gevonden.","FileReadError":"Er is een fout opgetreden bij het lezen van het bestand.","DeleteUser":"Verwijder gebruiker","DeleteUserConfirmation":"Weet je zeker dat je {0} wilt verwijderen?","PasswordResetHeader":"Wachtwoord opnieuw instellen","PasswordResetComplete":"Het wachtwoord is opnieuw ingesteld.","PasswordResetConfirmation":"Weet je zeker dat je het wachtwoord opnieuw in wilt stellen?","PasswordSaved":"Wachtwoord opgeslagen.","PasswordMatchError":"Wachtwoord en wachtwoord bevestiging moeten hetzelfde zijn.","OptionOff":"Uit","OptionOn":"Aan","OptionRelease":"Release","OptionBeta":"Beta","OptionDev":"Dev","UninstallPluginHeader":"Deinstalleer Plugin","UninstallPluginConfirmation":"Weet u zeker dat u {0} wilt deinstalleren?","NoPluginConfigurationMessage":"Deze plugin heeft niets in te stellen","NoPluginsInstalledMessage":"U heeft geen plugins geinstalleerd","BrowsePluginCatalogMessage":"Blader door de Plugincatalogus voor beschikbare plugins."}
{"SettingsSaved":"Instellingen opgeslagen.","AddUser":"Gebruiker toevoegen","Users":"Gebruikers","Delete":"Verwijderen","Administrator":"Beheerder","Password":"Wachtwoord","DeleteImage":"Verwijder afbeelding","DeleteImageConfirmation":"Weet je zeker dat je deze afbeelding wilt verwijderen?","FileReadCancelled":"Het lezen van het bestand is geannuleerd","FileNotFound":"Bestand niet gevonden.","FileReadError":"Er is een fout opgetreden bij het lezen van het bestand.","DeleteUser":"Verwijder gebruiker","DeleteUserConfirmation":"Weet je zeker dat je {0} wilt verwijderen?","PasswordResetHeader":"Wachtwoord opnieuw instellen","PasswordResetComplete":"Het wachtwoord is opnieuw ingesteld.","PasswordResetConfirmation":"Weet je zeker dat je het wachtwoord opnieuw in wilt stellen?","PasswordSaved":"Wachtwoord opgeslagen.","PasswordMatchError":"Wachtwoord en wachtwoord bevestiging moeten hetzelfde zijn.","OptionOff":"Uit","OptionOn":"Aan","OptionRelease":"Release","OptionBeta":"Beta","OptionDev":"Ontwikkeling","UninstallPluginHeader":"Deinstalleer Plugin","UninstallPluginConfirmation":"Weet u zeker dat u {0} wilt deinstalleren?","NoPluginConfigurationMessage":"Deze plugin heeft niets in te stellen","NoPluginsInstalledMessage":"U heeft geen plugins geinstalleerd","BrowsePluginCatalogMessage":"Blader door de Plugincatalogus voor beschikbare plugins."}
Loading

0 comments on commit 2136e02

Please sign in to comment.