Merge pull request #1687 from MediaBrowser/dev

Dev
pull/702/head
Luke 9 years ago
commit ca6cd82a53

@ -288,9 +288,9 @@ namespace MediaBrowser.Api.Playback
{ {
if (string.Equals(ApiEntryPoint.Instance.GetEncodingOptions().HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase)) if (string.Equals(ApiEntryPoint.Instance.GetEncodingOptions().HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
{ {
return "h264_qsv"; return "h264_qsv";
} }
return "libx264"; return "libx264";
@ -1804,6 +1804,15 @@ namespace MediaBrowser.Api.Playback
} }
} }
if (string.Equals("h264", videoStream.Codec, StringComparison.OrdinalIgnoreCase))
{
if (videoStream.IsAVC.HasValue && !videoStream.IsAVC.Value)
{
Logger.Debug("Cannot stream copy video. Stream is marked as not AVC");
return false;
}
}
// Source and target codecs must match // Source and target codecs must match
if (!string.Equals(request.VideoCodec, videoStream.Codec, StringComparison.OrdinalIgnoreCase)) if (!string.Equals(request.VideoCodec, videoStream.Codec, StringComparison.OrdinalIgnoreCase))
{ {

@ -326,15 +326,15 @@ namespace MediaBrowser.Api.Reports
} }
// Min official rating // Min official rating
if (!string.IsNullOrEmpty(request.MinOfficialRating)) if (!string.IsNullOrWhiteSpace(request.MinOfficialRating))
{ {
query.MinParentalRating = _localization.GetRatingLevel(request.MinOfficialRating); query.MinParentalRating = _localization.GetRatingLevel(request.MinOfficialRating);
} }
// Max official rating // Max official rating
if (!string.IsNullOrEmpty(request.MaxOfficialRating)) if (!string.IsNullOrWhiteSpace(request.MaxOfficialRating))
{ {
query.MaxParentalRating = _localization.GetRatingLevel(request.MinOfficialRating); query.MaxParentalRating = _localization.GetRatingLevel(request.MaxOfficialRating);
} }
// Artists // Artists

@ -308,15 +308,15 @@ namespace MediaBrowser.Api.UserLibrary
} }
// Min official rating // Min official rating
if (!string.IsNullOrEmpty(request.MinOfficialRating)) if (!string.IsNullOrWhiteSpace(request.MinOfficialRating))
{ {
query.MinParentalRating = _localization.GetRatingLevel(request.MinOfficialRating); query.MinParentalRating = _localization.GetRatingLevel(request.MinOfficialRating);
} }
// Max official rating // Max official rating
if (!string.IsNullOrEmpty(request.MaxOfficialRating)) if (!string.IsNullOrWhiteSpace(request.MaxOfficialRating))
{ {
query.MaxParentalRating = _localization.GetRatingLevel(request.MinOfficialRating); query.MaxParentalRating = _localization.GetRatingLevel(request.MaxOfficialRating);
} }
// Artists // Artists

@ -1542,11 +1542,11 @@ namespace MediaBrowser.Controller.Entities
{ {
if (!string.IsNullOrEmpty(info.Path)) if (!string.IsNullOrEmpty(info.Path))
{ {
var itemByPath = LibraryManager.FindByPath(info.Path); var itemByPath = LibraryManager.FindByPath(info.Path, null);
if (itemByPath == null) if (itemByPath == null)
{ {
Logger.Warn("Unable to find linked item at path {0}", info.Path); //Logger.Warn("Unable to find linked item at path {0}", info.Path);
} }
return itemByPath; return itemByPath;
@ -1555,6 +1555,15 @@ namespace MediaBrowser.Controller.Entities
return null; return null;
} }
[IgnoreDataMember]
public virtual bool EnableRememberingTrackSelections
{
get
{
return true;
}
}
/// <summary> /// <summary>
/// Adds a studio to the item /// Adds a studio to the item
/// </summary> /// </summary>

@ -8,6 +8,7 @@ using System.Runtime.Serialization;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using CommonIO; using CommonIO;
using MoreLinq;
namespace MediaBrowser.Controller.Entities namespace MediaBrowser.Controller.Entities
{ {
@ -97,7 +98,6 @@ namespace MediaBrowser.Controller.Entities
} }
} }
return base.IsValidFromResolver(newItem); return base.IsValidFromResolver(newItem);
} }
@ -200,9 +200,30 @@ namespace MediaBrowser.Controller.Entities
public IEnumerable<Folder> GetPhysicalParents() public IEnumerable<Folder> GetPhysicalParents()
{ {
return LibraryManager.RootFolder.Children var rootChildren = LibraryManager.RootFolder.Children
.OfType<Folder>() .OfType<Folder>()
.Where(i => i.Path != null && PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase)); .ToList();
return PhysicalLocations.Where(i => !string.Equals(i, Path, StringComparison.OrdinalIgnoreCase)).SelectMany(i => GetPhysicalParents(i, rootChildren)).DistinctBy(i => i.Id);
}
private IEnumerable<Folder> GetPhysicalParents(string path, List<Folder> rootChildren)
{
var result = rootChildren
.Where(i => string.Equals(i.Path, path, StringComparison.OrdinalIgnoreCase))
.ToList();
if (result.Count == 0)
{
var folder = LibraryManager.FindByPath(path, true) as Folder;
if (folder != null)
{
result.Add(folder);
}
}
return result;
} }
[IgnoreDataMember] [IgnoreDataMember]

@ -20,5 +20,7 @@ namespace MediaBrowser.Controller.Entities
/// <param name="userData">The user data.</param> /// <param name="userData">The user data.</param>
/// <param name="user">The user.</param> /// <param name="user">The user.</param>
void FillUserDataDtoValues(UserItemDataDto dto, UserItemData userData, User user); void FillUserDataDtoValues(UserItemDataDto dto, UserItemData userData, User user);
bool EnableRememberingTrackSelections { get; }
} }
} }

@ -59,7 +59,7 @@ namespace MediaBrowser.Controller.Library
/// </summary> /// </summary>
/// <param name="path">The path.</param> /// <param name="path">The path.</param>
/// <returns>BaseItem.</returns> /// <returns>BaseItem.</returns>
BaseItem FindByPath(string path); BaseItem FindByPath(string path, bool? isFolder);
/// <summary> /// <summary>
/// Gets the artist. /// Gets the artist.

@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Library
/// <summary> /// <summary>
/// The banner URL /// The banner URL
/// </summary> /// </summary>
public static readonly string BannerUrl = "http://www.thetvdb.com/banners/"; public static readonly string BannerUrl = "https://www.thetvdb.com/banners/";
/// <summary> /// <summary>
/// Gets the air days. /// Gets the air days.

@ -45,6 +45,15 @@ namespace MediaBrowser.Controller.LiveTv
set { } set { }
} }
[IgnoreDataMember]
public override bool EnableRememberingTrackSelections
{
get
{
return false;
}
}
/// <summary> /// <summary>
/// Gets or sets the number. /// Gets or sets the number.
/// </summary> /// </summary>

@ -109,30 +109,31 @@ namespace MediaBrowser.Dlna.Ssdp
var endPoint = new IPEndPoint(localIp, 1900); var endPoint = new IPEndPoint(localIp, 1900);
var socket = GetMulticastSocket(localIp, endPoint); using (var socket = GetMulticastSocket(localIp, endPoint))
var receiveBuffer = new byte[64000];
CreateNotifier(localIp);
while (!_tokenSource.IsCancellationRequested)
{ {
var receivedBytes = await socket.ReceiveAsync(receiveBuffer, 0, 64000); var receiveBuffer = new byte[64000];
CreateNotifier(localIp);
if (receivedBytes > 0) while (!_tokenSource.IsCancellationRequested)
{ {
var args = SsdpHelper.ParseSsdpResponse(receiveBuffer); var receivedBytes = await socket.ReceiveAsync(receiveBuffer, 0, 64000);
args.EndPoint = endPoint;
args.LocalEndPoint = new IPEndPoint(localIp, 0);
if (_ssdpHandler.IgnoreMessage(args, true)) if (receivedBytes > 0)
{ {
return; var args = SsdpHelper.ParseSsdpResponse(receiveBuffer);
} args.EndPoint = endPoint;
args.LocalEndPoint = new IPEndPoint(localIp, 0);
if (_ssdpHandler.IgnoreMessage(args, true))
{
return;
}
_ssdpHandler.LogMessageReceived(args, true); _ssdpHandler.LogMessageReceived(args, true);
TryCreateDevice(args); TryCreateDevice(args);
}
} }
} }

@ -575,6 +575,14 @@ namespace MediaBrowser.MediaEncoding.Encoder
return false; return false;
} }
if (string.Equals("h264", videoStream.Codec, StringComparison.OrdinalIgnoreCase))
{
if (videoStream.IsAVC.HasValue && !videoStream.IsAVC.Value)
{
return false;
}
}
// If client is requesting a specific video profile, it must match the source // If client is requesting a specific video profile, it must match the source
if (!string.IsNullOrEmpty(request.Profile)) if (!string.IsNullOrEmpty(request.Profile))
{ {

@ -411,6 +411,17 @@ namespace MediaBrowser.MediaEncoding.Probing
NalLengthSize = streamInfo.nal_length_size NalLengthSize = streamInfo.nal_length_size
}; };
if (string.Equals(streamInfo.is_avc, "true", StringComparison.OrdinalIgnoreCase) ||
string.Equals(streamInfo.is_avc, "1", StringComparison.OrdinalIgnoreCase))
{
stream.IsAVC = true;
}
else if (string.Equals(streamInfo.is_avc, "false", StringComparison.OrdinalIgnoreCase) ||
string.Equals(streamInfo.is_avc, "0", StringComparison.OrdinalIgnoreCase))
{
stream.IsAVC = false;
}
// Filter out junk // Filter out junk
if (!string.IsNullOrWhiteSpace(streamInfo.codec_tag_string) && streamInfo.codec_tag_string.IndexOf("[0]", StringComparison.OrdinalIgnoreCase) == -1) if (!string.IsNullOrWhiteSpace(streamInfo.codec_tag_string) && streamInfo.codec_tag_string.IndexOf("[0]", StringComparison.OrdinalIgnoreCase) == -1)
{ {

@ -42,6 +42,8 @@ namespace MediaBrowser.Model.Entities
/// <value><c>true</c> if this instance is interlaced; otherwise, <c>false</c>.</value> /// <value><c>true</c> if this instance is interlaced; otherwise, <c>false</c>.</value>
public bool IsInterlaced { get; set; } public bool IsInterlaced { get; set; }
public bool? IsAVC { get; set; }
/// <summary> /// <summary>
/// Gets or sets the channel layout. /// Gets or sets the channel layout.
/// </summary> /// </summary>

@ -190,7 +190,7 @@ namespace MediaBrowser.Providers.BoxSets
cancellationToken.ThrowIfCancellationRequested(); cancellationToken.ThrowIfCancellationRequested();
if (mainResult != null && string.IsNullOrEmpty(mainResult.overview)) if (mainResult != null && string.IsNullOrEmpty(mainResult.name))
{ {
if (!string.IsNullOrEmpty(language) && !string.Equals(language, "en", StringComparison.OrdinalIgnoreCase)) if (!string.IsNullOrEmpty(language) && !string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
{ {

@ -215,6 +215,12 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
return; return;
} }
var video = e.Item as Video;
if (video != null && video.IsThemeMedia)
{
return;
}
var type = GetPlaybackNotificationType(item.MediaType); var type = GetPlaybackNotificationType(item.MediaType);
SendPlaybackNotification(type, e); SendPlaybackNotification(type, e);
@ -230,6 +236,12 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
return; return;
} }
var video = e.Item as Video;
if (video != null && video.IsThemeMedia)
{
return;
}
var type = GetPlaybackStoppedNotificationType(item.MediaType); var type = GetPlaybackStoppedNotificationType(item.MediaType);
SendPlaybackNotification(type, e); SendPlaybackNotification(type, e);

@ -663,7 +663,7 @@ namespace MediaBrowser.Server.Implementations.IO
while (item == null && !string.IsNullOrEmpty(path)) while (item == null && !string.IsNullOrEmpty(path))
{ {
item = LibraryManager.FindByPath(path); item = LibraryManager.FindByPath(path, null);
path = Path.GetDirectoryName(path); path = Path.GetDirectoryName(path);
} }

@ -801,11 +801,12 @@ namespace MediaBrowser.Server.Implementations.Library
return _userRootFolder; return _userRootFolder;
} }
public BaseItem FindByPath(string path) public BaseItem FindByPath(string path, bool? isFolder)
{ {
var query = new InternalItemsQuery var query = new InternalItemsQuery
{ {
Path = path Path = path,
IsFolder = isFolder
}; };
// Only use the database result if there's exactly one item, otherwise we run the risk of returning old data that hasn't been cleaned yet. // Only use the database result if there's exactly one item, otherwise we run the risk of returning old data that hasn't been cleaned yet.

@ -269,13 +269,15 @@ namespace MediaBrowser.Server.Implementations.Library
{ {
var userData = item == null ? new UserItemData() : _userDataManager.GetUserData(user.Id, item.GetUserDataKey()); var userData = item == null ? new UserItemData() : _userDataManager.GetUserData(user.Id, item.GetUserDataKey());
SetDefaultAudioStreamIndex(source, userData, user); var allowRememberingSelection = item == null || item.EnableRememberingTrackSelections;
SetDefaultSubtitleStreamIndex(source, userData, user);
SetDefaultAudioStreamIndex(source, userData, user, allowRememberingSelection);
SetDefaultSubtitleStreamIndex(source, userData, user, allowRememberingSelection);
} }
private void SetDefaultSubtitleStreamIndex(MediaSourceInfo source, UserItemData userData, User user) private void SetDefaultSubtitleStreamIndex(MediaSourceInfo source, UserItemData userData, User user, bool allowRememberingSelection)
{ {
if (userData.SubtitleStreamIndex.HasValue && user.Configuration.RememberSubtitleSelections && user.Configuration.SubtitleMode != SubtitlePlaybackMode.None) if (userData.SubtitleStreamIndex.HasValue && user.Configuration.RememberSubtitleSelections && user.Configuration.SubtitleMode != SubtitlePlaybackMode.None && allowRememberingSelection)
{ {
var index = userData.SubtitleStreamIndex.Value; var index = userData.SubtitleStreamIndex.Value;
// Make sure the saved index is still valid // Make sure the saved index is still valid
@ -304,9 +306,9 @@ namespace MediaBrowser.Server.Implementations.Library
user.Configuration.SubtitleMode, audioLangage); user.Configuration.SubtitleMode, audioLangage);
} }
private void SetDefaultAudioStreamIndex(MediaSourceInfo source, UserItemData userData, User user) private void SetDefaultAudioStreamIndex(MediaSourceInfo source, UserItemData userData, User user, bool allowRememberingSelection)
{ {
if (userData.AudioStreamIndex.HasValue && user.Configuration.RememberAudioSelections) if (userData.AudioStreamIndex.HasValue && user.Configuration.RememberAudioSelections && allowRememberingSelection)
{ {
var index = userData.AudioStreamIndex.Value; var index = userData.AudioStreamIndex.Value;
// Make sure the saved index is still valid // Make sure the saved index is still valid

@ -87,13 +87,16 @@ namespace MediaBrowser.Server.Implementations.Library
{ {
var searchTerm = query.SearchTerm; var searchTerm = query.SearchTerm;
if (searchTerm != null)
{
searchTerm = searchTerm.Trim().RemoveDiacritics();
}
if (string.IsNullOrWhiteSpace(searchTerm)) if (string.IsNullOrWhiteSpace(searchTerm))
{ {
throw new ArgumentNullException("searchTerm"); throw new ArgumentNullException("searchTerm");
} }
searchTerm = searchTerm.Trim().RemoveDiacritics();
var terms = GetWords(searchTerm); var terms = GetWords(searchTerm);
var hints = new List<Tuple<BaseItem, string, int>>(); var hints = new List<Tuple<BaseItem, string, int>>();

@ -1,178 +1,179 @@
{ {
"DbUpgradeMessage": "Please wait while your Emby Server database is upgraded. {0}% complete.", "DbUpgradeMessage": "Please wait while your Emby Server database is upgraded. {0}% complete.",
"AppDeviceValues": "App: {0}, Device: {1}", "AppDeviceValues": "App: {0}, Device: {1}",
"UserDownloadingItemWithValues": "{0} is downloading {1}", "UserDownloadingItemWithValues": "{0} is downloading {1}",
"FolderTypeMixed": "Mixed content", "FolderTypeMixed": "Mixed content",
"FolderTypeMovies": "Movies", "FolderTypeMovies": "Movies",
"FolderTypeMusic": "Music", "FolderTypeMusic": "Music",
"FolderTypeAdultVideos": "Adult videos", "FolderTypeAdultVideos": "Adult videos",
"FolderTypePhotos": "Photos", "FolderTypePhotos": "Photos",
"FolderTypeMusicVideos": "Music videos", "FolderTypeMusicVideos": "Music videos",
"FolderTypeHomeVideos": "Home videos", "FolderTypeHomeVideos": "Home videos",
"FolderTypeGames": "Games", "FolderTypeGames": "Games",
"FolderTypeBooks": "Books", "FolderTypeBooks": "Books",
"FolderTypeTvShows": "TV", "FolderTypeTvShows": "TV",
"FolderTypeInherit": "Inherit", "FolderTypeInherit": "Inherit",
"HeaderCastCrew": "Cast & Crew", "HeaderCastCrew": "Cast & Crew",
"HeaderPeople": "People", "HeaderPeople": "People",
"ValueSpecialEpisodeName": "Special - {0}", "ValueSpecialEpisodeName": "Special - {0}",
"LabelChapterName": "Chapter {0}", "LabelChapterName": "Chapter {0}",
"NameSeasonNumber": "Season {0}", "NameSeasonUnknown": "Season Unknown",
"LabelExit": "Exit", "NameSeasonNumber": "Season {0}",
"LabelVisitCommunity": "Visit Community", "LabelExit": "Exit",
"LabelGithub": "Github", "LabelVisitCommunity": "Visit Community",
"LabelApiDocumentation": "Api Documentation", "LabelGithub": "Github",
"LabelDeveloperResources": "Developer Resources", "LabelApiDocumentation": "Api Documentation",
"LabelBrowseLibrary": "Browse Library", "LabelDeveloperResources": "Developer Resources",
"LabelConfigureServer": "Configure Emby", "LabelBrowseLibrary": "Browse Library",
"LabelRestartServer": "Restart Server", "LabelConfigureServer": "Configure Emby",
"CategorySync": "Sync", "LabelRestartServer": "Restart Server",
"CategoryUser": "User", "CategorySync": "Sync",
"CategorySystem": "System", "CategoryUser": "User",
"CategoryApplication": "Application", "CategorySystem": "System",
"CategoryPlugin": "Plugin", "CategoryApplication": "Application",
"NotificationOptionPluginError": "Plugin failure", "CategoryPlugin": "Plugin",
"NotificationOptionApplicationUpdateAvailable": "Application update available", "NotificationOptionPluginError": "Plugin failure",
"NotificationOptionApplicationUpdateInstalled": "Application update installed", "NotificationOptionApplicationUpdateAvailable": "Application update available",
"NotificationOptionPluginUpdateInstalled": "Plugin update installed", "NotificationOptionApplicationUpdateInstalled": "Application update installed",
"NotificationOptionPluginInstalled": "Plugin installed", "NotificationOptionPluginUpdateInstalled": "Plugin update installed",
"NotificationOptionPluginUninstalled": "Plugin uninstalled", "NotificationOptionPluginInstalled": "Plugin installed",
"NotificationOptionVideoPlayback": "Video playback started", "NotificationOptionPluginUninstalled": "Plugin uninstalled",
"NotificationOptionAudioPlayback": "Audio playback started", "NotificationOptionVideoPlayback": "Video playback started",
"NotificationOptionGamePlayback": "Game playback started", "NotificationOptionAudioPlayback": "Audio playback started",
"NotificationOptionVideoPlaybackStopped": "Video playback stopped", "NotificationOptionGamePlayback": "Game playback started",
"NotificationOptionAudioPlaybackStopped": "Audio playback stopped", "NotificationOptionVideoPlaybackStopped": "Video playback stopped",
"NotificationOptionGamePlaybackStopped": "Game playback stopped", "NotificationOptionAudioPlaybackStopped": "Audio playback stopped",
"NotificationOptionTaskFailed": "Scheduled task failure", "NotificationOptionGamePlaybackStopped": "Game playback stopped",
"NotificationOptionInstallationFailed": "Installation failure", "NotificationOptionTaskFailed": "Scheduled task failure",
"NotificationOptionNewLibraryContent": "New content added", "NotificationOptionInstallationFailed": "Installation failure",
"NotificationOptionNewLibraryContentMultiple": "New content added (multiple)", "NotificationOptionNewLibraryContent": "New content added",
"NotificationOptionCameraImageUploaded": "Camera image uploaded", "NotificationOptionNewLibraryContentMultiple": "New content added (multiple)",
"NotificationOptionUserLockedOut": "User locked out", "NotificationOptionCameraImageUploaded": "Camera image uploaded",
"NotificationOptionServerRestartRequired": "Server restart required", "NotificationOptionUserLockedOut": "User locked out",
"ViewTypePlaylists": "Playlists", "NotificationOptionServerRestartRequired": "Server restart required",
"ViewTypeMovies": "Movies", "ViewTypePlaylists": "Playlists",
"ViewTypeTvShows": "TV", "ViewTypeMovies": "Movies",
"ViewTypeGames": "Games", "ViewTypeTvShows": "TV",
"ViewTypeMusic": "Music", "ViewTypeGames": "Games",
"ViewTypeMusicGenres": "Genres", "ViewTypeMusic": "Music",
"ViewTypeMusicArtists": "Artists", "ViewTypeMusicGenres": "Genres",
"ViewTypeBoxSets": "Collections", "ViewTypeMusicArtists": "Artists",
"ViewTypeChannels": "Channels", "ViewTypeBoxSets": "Collections",
"ViewTypeLiveTV": "Live TV", "ViewTypeChannels": "Channels",
"ViewTypeLiveTvNowPlaying": "Now Airing", "ViewTypeLiveTV": "Live TV",
"ViewTypeLatestGames": "Latest Games", "ViewTypeLiveTvNowPlaying": "Now Airing",
"ViewTypeRecentlyPlayedGames": "Recently Played", "ViewTypeLatestGames": "Latest Games",
"ViewTypeGameFavorites": "Favorites", "ViewTypeRecentlyPlayedGames": "Recently Played",
"ViewTypeGameSystems": "Game Systems", "ViewTypeGameFavorites": "Favorites",
"ViewTypeGameGenres": "Genres", "ViewTypeGameSystems": "Game Systems",
"ViewTypeTvResume": "Resume", "ViewTypeGameGenres": "Genres",
"ViewTypeTvNextUp": "Next Up", "ViewTypeTvResume": "Resume",
"ViewTypeTvLatest": "Latest", "ViewTypeTvNextUp": "Next Up",
"ViewTypeTvShowSeries": "Series", "ViewTypeTvLatest": "Latest",
"ViewTypeTvGenres": "Genres", "ViewTypeTvShowSeries": "Series",
"ViewTypeTvFavoriteSeries": "Favorite Series", "ViewTypeTvGenres": "Genres",
"ViewTypeTvFavoriteEpisodes": "Favorite Episodes", "ViewTypeTvFavoriteSeries": "Favorite Series",
"ViewTypeMovieResume": "Resume", "ViewTypeTvFavoriteEpisodes": "Favorite Episodes",
"ViewTypeMovieLatest": "Latest", "ViewTypeMovieResume": "Resume",
"ViewTypeMovieMovies": "Movies", "ViewTypeMovieLatest": "Latest",
"ViewTypeMovieCollections": "Collections", "ViewTypeMovieMovies": "Movies",
"ViewTypeMovieFavorites": "Favorites", "ViewTypeMovieCollections": "Collections",
"ViewTypeMovieGenres": "Genres", "ViewTypeMovieFavorites": "Favorites",
"ViewTypeMusicLatest": "Latest", "ViewTypeMovieGenres": "Genres",
"ViewTypeMusicPlaylists": "Playlists", "ViewTypeMusicLatest": "Latest",
"ViewTypeMusicAlbums": "Albums", "ViewTypeMusicPlaylists": "Playlists",
"ViewTypeMusicAlbumArtists": "Album Artists", "ViewTypeMusicAlbums": "Albums",
"HeaderOtherDisplaySettings": "Display Settings", "ViewTypeMusicAlbumArtists": "Album Artists",
"ViewTypeMusicSongs": "Songs", "HeaderOtherDisplaySettings": "Display Settings",
"ViewTypeMusicFavorites": "Favorites", "ViewTypeMusicSongs": "Songs",
"ViewTypeMusicFavoriteAlbums": "Favorite Albums", "ViewTypeMusicFavorites": "Favorites",
"ViewTypeMusicFavoriteArtists": "Favorite Artists", "ViewTypeMusicFavoriteAlbums": "Favorite Albums",
"ViewTypeMusicFavoriteSongs": "Favorite Songs", "ViewTypeMusicFavoriteArtists": "Favorite Artists",
"ViewTypeFolders": "Folders", "ViewTypeMusicFavoriteSongs": "Favorite Songs",
"ViewTypeLiveTvRecordingGroups": "Recordings", "ViewTypeFolders": "Folders",
"ViewTypeLiveTvChannels": "Channels", "ViewTypeLiveTvRecordingGroups": "Recordings",
"ScheduledTaskFailedWithName": "{0} failed", "ViewTypeLiveTvChannels": "Channels",
"LabelRunningTimeValue": "Running time: {0}", "ScheduledTaskFailedWithName": "{0} failed",
"ScheduledTaskStartedWithName": "{0} started", "LabelRunningTimeValue": "Running time: {0}",
"VersionNumber": "Version {0}", "ScheduledTaskStartedWithName": "{0} started",
"PluginInstalledWithName": "{0} was installed", "VersionNumber": "Version {0}",
"PluginUpdatedWithName": "{0} was updated", "PluginInstalledWithName": "{0} was installed",
"PluginUninstalledWithName": "{0} was uninstalled", "PluginUpdatedWithName": "{0} was updated",
"ItemAddedWithName": "{0} was added to the library", "PluginUninstalledWithName": "{0} was uninstalled",
"ItemRemovedWithName": "{0} was removed from the library", "ItemAddedWithName": "{0} was added to the library",
"LabelIpAddressValue": "Ip address: {0}", "ItemRemovedWithName": "{0} was removed from the library",
"DeviceOnlineWithName": "{0} is connected", "LabelIpAddressValue": "Ip address: {0}",
"UserOnlineFromDevice": "{0} is online from {1}", "DeviceOnlineWithName": "{0} is connected",
"ProviderValue": "Provider: {0}", "UserOnlineFromDevice": "{0} is online from {1}",
"SubtitlesDownloadedForItem": "Subtitles downloaded for {0}", "ProviderValue": "Provider: {0}",
"UserConfigurationUpdatedWithName": "User configuration has been updated for {0}", "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}",
"UserCreatedWithName": "User {0} has been created", "UserConfigurationUpdatedWithName": "User configuration has been updated for {0}",
"UserPasswordChangedWithName": "Password has been changed for user {0}", "UserCreatedWithName": "User {0} has been created",
"UserDeletedWithName": "User {0} has been deleted", "UserPasswordChangedWithName": "Password has been changed for user {0}",
"MessageServerConfigurationUpdated": "Server configuration has been updated", "UserDeletedWithName": "User {0} has been deleted",
"MessageNamedServerConfigurationUpdatedWithValue": "Server configuration section {0} has been updated", "MessageServerConfigurationUpdated": "Server configuration has been updated",
"MessageApplicationUpdated": "Emby Server has been updated", "MessageNamedServerConfigurationUpdatedWithValue": "Server configuration section {0} has been updated",
"FailedLoginAttemptWithUserName": "Failed login attempt from {0}", "MessageApplicationUpdated": "Emby Server has been updated",
"AuthenticationSucceededWithUserName": "{0} successfully authenticated", "FailedLoginAttemptWithUserName": "Failed login attempt from {0}",
"DeviceOfflineWithName": "{0} has disconnected", "AuthenticationSucceededWithUserName": "{0} successfully authenticated",
"UserLockedOutWithName": "User {0} has been locked out", "DeviceOfflineWithName": "{0} has disconnected",
"UserOfflineFromDevice": "{0} has disconnected from {1}", "UserLockedOutWithName": "User {0} has been locked out",
"UserStartedPlayingItemWithValues": "{0} has started playing {1}", "UserOfflineFromDevice": "{0} has disconnected from {1}",
"UserStoppedPlayingItemWithValues": "{0} has stopped playing {1}", "UserStartedPlayingItemWithValues": "{0} has started playing {1}",
"SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}", "UserStoppedPlayingItemWithValues": "{0} has stopped playing {1}",
"HeaderUnidentified": "Unidentified", "SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}",
"HeaderImagePrimary": "Primary", "HeaderUnidentified": "Unidentified",
"HeaderImageBackdrop": "Backdrop", "HeaderImagePrimary": "Primary",
"HeaderImageLogo": "Logo", "HeaderImageBackdrop": "Backdrop",
"HeaderUserPrimaryImage": "User Image", "HeaderImageLogo": "Logo",
"HeaderOverview": "Overview", "HeaderUserPrimaryImage": "User Image",
"HeaderShortOverview": "Short Overview", "HeaderOverview": "Overview",
"HeaderType": "Type", "HeaderShortOverview": "Short Overview",
"HeaderSeverity": "Severity", "HeaderType": "Type",
"HeaderUser": "User", "HeaderSeverity": "Severity",
"HeaderName": "Name", "HeaderUser": "User",
"HeaderDate": "Date", "HeaderName": "Name",
"HeaderPremiereDate": "Premiere Date", "HeaderDate": "Date",
"HeaderDateAdded": "Date Added", "HeaderPremiereDate": "Premiere Date",
"HeaderReleaseDate": "Release date", "HeaderDateAdded": "Date Added",
"HeaderRuntime": "Runtime", "HeaderReleaseDate": "Release date",
"HeaderPlayCount": "Play Count", "HeaderRuntime": "Runtime",
"HeaderSeason": "Season", "HeaderPlayCount": "Play Count",
"HeaderSeasonNumber": "Season number", "HeaderSeason": "Season",
"HeaderSeries": "Series:", "HeaderSeasonNumber": "Season number",
"HeaderNetwork": "Network", "HeaderSeries": "Series:",
"HeaderYear": "Year:", "HeaderNetwork": "Network",
"HeaderYears": "Years:", "HeaderYear": "Year:",
"HeaderParentalRating": "Parental Rating", "HeaderYears": "Years:",
"HeaderCommunityRating": "Community rating", "HeaderParentalRating": "Parental Rating",
"HeaderTrailers": "Trailers", "HeaderCommunityRating": "Community rating",
"HeaderSpecials": "Specials", "HeaderTrailers": "Trailers",
"HeaderGameSystems": "Game Systems", "HeaderSpecials": "Specials",
"HeaderPlayers": "Players:", "HeaderGameSystems": "Game Systems",
"HeaderAlbumArtists": "Album Artists", "HeaderPlayers": "Players:",
"HeaderAlbums": "Albums", "HeaderAlbumArtists": "Album Artists",
"HeaderDisc": "Disc", "HeaderAlbums": "Albums",
"HeaderTrack": "Track", "HeaderDisc": "Disc",
"HeaderAudio": "Audio", "HeaderTrack": "Track",
"HeaderVideo": "Video", "HeaderAudio": "Audio",
"HeaderEmbeddedImage": "Embedded image", "HeaderVideo": "Video",
"HeaderResolution": "Resolution", "HeaderEmbeddedImage": "Embedded image",
"HeaderSubtitles": "Subtitles", "HeaderResolution": "Resolution",
"HeaderGenres": "Genres", "HeaderSubtitles": "Subtitles",
"HeaderCountries": "Countries", "HeaderGenres": "Genres",
"HeaderStatus": "Status", "HeaderCountries": "Countries",
"HeaderTracks": "Tracks", "HeaderStatus": "Status",
"HeaderMusicArtist": "Music artist", "HeaderTracks": "Tracks",
"HeaderLocked": "Locked", "HeaderMusicArtist": "Music artist",
"HeaderStudios": "Studios", "HeaderLocked": "Locked",
"HeaderActor": "Actors", "HeaderStudios": "Studios",
"HeaderComposer": "Composers", "HeaderActor": "Actors",
"HeaderDirector": "Directors", "HeaderComposer": "Composers",
"HeaderGuestStar": "Guest star", "HeaderDirector": "Directors",
"HeaderProducer": "Producers", "HeaderGuestStar": "Guest star",
"HeaderWriter": "Writers", "HeaderProducer": "Producers",
"HeaderParentalRatings": "Parental Ratings", "HeaderWriter": "Writers",
"HeaderCommunityRatings": "Community ratings", "HeaderParentalRatings": "Parental Ratings",
"StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly." "HeaderCommunityRatings": "Community ratings",
"StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly."
} }

@ -26,6 +26,38 @@ namespace MediaBrowser.Server.Implementations.Persistence
AddCodecTagColumn(); AddCodecTagColumn();
AddCommentColumn(); AddCommentColumn();
AddNalColumn(); AddNalColumn();
AddIsAvcColumn();
}
private void AddIsAvcColumn()
{
using (var cmd = _connection.CreateCommand())
{
cmd.CommandText = "PRAGMA table_info(mediastreams)";
using (var reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess | CommandBehavior.SingleResult))
{
while (reader.Read())
{
if (!reader.IsDBNull(1))
{
var name = reader.GetString(1);
if (string.Equals(name, "IsAvc", StringComparison.OrdinalIgnoreCase))
{
return;
}
}
}
}
}
var builder = new StringBuilder();
builder.AppendLine("alter table mediastreams");
builder.AppendLine("add column IsAvc BIT NULL");
_connection.RunQueries(new[] { builder.ToString() }, _logger);
} }
private void AddNalColumn() private void AddNalColumn()

@ -124,7 +124,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
_connection = await SqliteExtensions.ConnectToDb(dbFile, Logger).ConfigureAwait(false); _connection = await SqliteExtensions.ConnectToDb(dbFile, Logger).ConfigureAwait(false);
var createMediaStreamsTableCommand var createMediaStreamsTableCommand
= "create table if not exists mediastreams (ItemId GUID, StreamIndex INT, StreamType TEXT, Codec TEXT, Language TEXT, ChannelLayout TEXT, Profile TEXT, AspectRatio TEXT, Path TEXT, IsInterlaced BIT, BitRate INT NULL, Channels INT NULL, SampleRate INT NULL, IsDefault BIT, IsForced BIT, IsExternal BIT, Height INT NULL, Width INT NULL, AverageFrameRate FLOAT NULL, RealFrameRate FLOAT NULL, Level FLOAT NULL, PixelFormat TEXT, BitDepth INT NULL, IsAnamorphic BIT NULL, RefFrames INT NULL, CodecTag TEXT NULL, Comment TEXT NULL, NalLengthSize TEXT NULL, PRIMARY KEY (ItemId, StreamIndex))"; = "create table if not exists mediastreams (ItemId GUID, StreamIndex INT, StreamType TEXT, Codec TEXT, Language TEXT, ChannelLayout TEXT, Profile TEXT, AspectRatio TEXT, Path TEXT, IsInterlaced BIT, BitRate INT NULL, Channels INT NULL, SampleRate INT NULL, IsDefault BIT, IsForced BIT, IsExternal BIT, Height INT NULL, Width INT NULL, AverageFrameRate FLOAT NULL, RealFrameRate FLOAT NULL, Level FLOAT NULL, PixelFormat TEXT, BitDepth INT NULL, IsAnamorphic BIT NULL, RefFrames INT NULL, CodecTag TEXT NULL, Comment TEXT NULL, NalLengthSize TEXT NULL, IsAvc BIT NULL, PRIMARY KEY (ItemId, StreamIndex))";
string[] queries = { string[] queries = {
@ -391,7 +391,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
"RefFrames", "RefFrames",
"CodecTag", "CodecTag",
"Comment", "Comment",
"NalLengthSize" "NalLengthSize",
"IsAvc"
}; };
/// <summary> /// <summary>
@ -1574,6 +1575,10 @@ namespace MediaBrowser.Server.Implementations.Persistence
{ {
return "RuntimeTicks"; return "RuntimeTicks";
} }
if (string.Equals(name, ItemSortBy.IsFolder, StringComparison.OrdinalIgnoreCase))
{
return "IsFolder";
}
if (string.Equals(name, ItemSortBy.Random, StringComparison.OrdinalIgnoreCase)) if (string.Equals(name, ItemSortBy.Random, StringComparison.OrdinalIgnoreCase))
{ {
return "RANDOM()"; return "RANDOM()";
@ -2893,6 +2898,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
_saveStreamCommand.GetParameter(index++).Value = stream.CodecTag; _saveStreamCommand.GetParameter(index++).Value = stream.CodecTag;
_saveStreamCommand.GetParameter(index++).Value = stream.Comment; _saveStreamCommand.GetParameter(index++).Value = stream.Comment;
_saveStreamCommand.GetParameter(index++).Value = stream.NalLengthSize; _saveStreamCommand.GetParameter(index++).Value = stream.NalLengthSize;
_saveStreamCommand.GetParameter(index++).Value = stream.IsAVC;
_saveStreamCommand.Transaction = transaction; _saveStreamCommand.Transaction = transaction;
_saveStreamCommand.ExecuteNonQuery(); _saveStreamCommand.ExecuteNonQuery();
@ -3056,6 +3062,11 @@ namespace MediaBrowser.Server.Implementations.Persistence
item.NalLengthSize = reader.GetString(27); item.NalLengthSize = reader.GetString(27);
} }
if (!reader.IsDBNull(28))
{
item.IsAVC = reader.GetBoolean(28);
}
return item; return item;
} }

@ -230,12 +230,6 @@
<Content Include="dashboard-ui\components\playlisteditor\playlisteditor.js"> <Content Include="dashboard-ui\components\playlisteditor\playlisteditor.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="dashboard-ui\components\tvguide\tvguide.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\components\tvguide\tvguide.template.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\devices\ie\ie.css"> <Content Include="dashboard-ui\devices\ie\ie.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
@ -1718,6 +1712,9 @@
<None Include="dashboard-ui\strings\fr-CA.json"> <None Include="dashboard-ui\strings\fr-CA.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="dashboard-ui\strings\fr-FR.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="dashboard-ui\strings\hu.json"> <None Include="dashboard-ui\strings\hu.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>

@ -662,7 +662,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
{ {
if (!string.IsNullOrWhiteSpace(val)) if (!string.IsNullOrWhiteSpace(val))
{ {
val = val.Replace("plugin://plugin.video.youtube/?action=play_video&videoid=", "http://www.youtube.com/watch?v=", StringComparison.OrdinalIgnoreCase); val = val.Replace("plugin://plugin.video.youtube/?action=play_video&videoid=", "https://www.youtube.com/watch?v=", StringComparison.OrdinalIgnoreCase);
hasTrailer.AddTrailerUrl(val, false); hasTrailer.AddTrailerUrl(val, false);
} }

@ -889,7 +889,7 @@ namespace MediaBrowser.XbmcMetadata.Savers
{ {
// This is what xbmc expects // This is what xbmc expects
return url.Replace("http://www.youtube.com/watch?v=", return url.Replace("https://www.youtube.com/watch?v=",
"plugin://plugin.video.youtube/?action=play_video&videoid=", "plugin://plugin.video.youtube/?action=play_video&videoid=",
StringComparison.OrdinalIgnoreCase); StringComparison.OrdinalIgnoreCase);
} }

Loading…
Cancel
Save