From a5b82cd2ec9b03e949ab79791dc6c0469390c085 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 3 Oct 2017 14:39:37 -0400 Subject: remove unneeded async signatures --- Emby.Server.Implementations/Library/UserViewManager.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Emby.Server.Implementations/Library/UserViewManager.cs') diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 8c9377291..4ee0f553f 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -102,7 +102,7 @@ namespace Emby.Server.Implementations.Library if (_config.Configuration.EnableFolderView) { var name = _localizationManager.GetLocalizedString("ViewType" + CollectionType.Folders); - list.Add(await _libraryManager.GetNamedView(name, CollectionType.Folders, string.Empty, cancellationToken).ConfigureAwait(false)); + list.Add(_libraryManager.GetNamedView(name, CollectionType.Folders, string.Empty, cancellationToken)); } if (query.IncludeExternalContent) @@ -117,7 +117,7 @@ namespace Emby.Server.Implementations.Library if (_config.Configuration.EnableChannelView && channels.Length > 0) { - list.Add(await _channelManager.GetInternalChannelFolder(cancellationToken).ConfigureAwait(false)); + list.Add(_channelManager.GetInternalChannelFolder(cancellationToken)); } else { @@ -126,7 +126,7 @@ namespace Emby.Server.Implementations.Library if (_liveTvManager.GetEnabledUsers().Select(i => i.Id.ToString("N")).Contains(query.UserId)) { - list.Add(await _liveTvManager.GetInternalLiveTvFolder(CancellationToken.None).ConfigureAwait(false)); + list.Add(_liveTvManager.GetInternalLiveTvFolder(CancellationToken.None)); } } @@ -158,14 +158,14 @@ namespace Emby.Server.Implementations.Library .ToArray(); } - public Task GetUserSubView(string name, string parentId, string type, string sortName, CancellationToken cancellationToken) + public UserView GetUserSubView(string name, string parentId, string type, string sortName, CancellationToken cancellationToken) { var uniqueId = parentId + "subview" + type; return _libraryManager.GetNamedView(name, parentId, type, sortName, uniqueId, cancellationToken); } - public Task GetUserSubView(string parentId, string type, string sortName, CancellationToken cancellationToken) + public UserView GetUserSubView(string parentId, string type, string sortName, CancellationToken cancellationToken) { var name = _localizationManager.GetLocalizedString("ViewType" + type); -- cgit v1.2.3 From 66ad10348fe9383df7b939c2de5a93c044ec351d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 13 Oct 2017 01:43:11 -0400 Subject: update translations --- Emby.Dlna/Didl/DidlBuilder.cs | 36 ++++++------- .../Channels/ChannelManager.cs | 2 +- .../Library/UserViewManager.cs | 18 ++++--- .../Entities/UserViewBuilder.cs | 62 +++++++++++----------- .../Library/IUserViewManager.cs | 4 +- .../MediaInfo/FFProbeVideoInfo.cs | 2 +- 6 files changed, 63 insertions(+), 61 deletions(-) (limited to 'Emby.Server.Implementations/Library/UserViewManager.cs') diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index 5e200428a..c6c213a48 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -393,75 +393,75 @@ namespace Emby.Dlna.Didl { if (itemStubType.HasValue && itemStubType.Value == StubType.Latest) { - return _localization.GetLocalizedString("ViewTypeMusicLatest"); + return _localization.GetLocalizedString("Latest"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Playlists) { - return _localization.GetLocalizedString("ViewTypeMusicPlaylists"); + return _localization.GetLocalizedString("Playlists"); } if (itemStubType.HasValue && itemStubType.Value == StubType.AlbumArtists) { - return _localization.GetLocalizedString("ViewTypeMusicAlbumArtists"); + return _localization.GetLocalizedString("HeaderAlbumArtists"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Albums) { - return _localization.GetLocalizedString("ViewTypeMusicAlbums"); + return _localization.GetLocalizedString("Albums"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Artists) { - return _localization.GetLocalizedString("ViewTypeMusicArtists"); + return _localization.GetLocalizedString("Artists"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Songs) { - return _localization.GetLocalizedString("ViewTypeMusicSongs"); + return _localization.GetLocalizedString("Songs"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Genres) { - return _localization.GetLocalizedString("ViewTypeTvGenres"); + return _localization.GetLocalizedString("Genres"); } if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteAlbums) { - return _localization.GetLocalizedString("ViewTypeMusicFavoriteAlbums"); + return _localization.GetLocalizedString("HeaderFavoriteAlbums"); } if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteArtists) { - return _localization.GetLocalizedString("ViewTypeMusicFavoriteArtists"); + return _localization.GetLocalizedString("HeaderFavoriteArtists"); } if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteSongs) { - return _localization.GetLocalizedString("ViewTypeMusicFavoriteSongs"); + return _localization.GetLocalizedString("HeaderFavoriteSongs"); } if (itemStubType.HasValue && itemStubType.Value == StubType.ContinueWatching) { - return _localization.GetLocalizedString("ViewTypeMovieResume"); + return _localization.GetLocalizedString("HeaderContinueWatching"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Movies) { - return _localization.GetLocalizedString("ViewTypeMovieMovies"); + return _localization.GetLocalizedString("Movies"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Collections) { - return _localization.GetLocalizedString("ViewTypeMovieCollections"); + return _localization.GetLocalizedString("Collections"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Favorites) { - return _localization.GetLocalizedString("ViewTypeMovieFavorites"); + return _localization.GetLocalizedString("Favorites"); } if (itemStubType.HasValue && itemStubType.Value == StubType.NextUp) { - return _localization.GetLocalizedString("ViewTypeTvNextUp"); + return _localization.GetLocalizedString("HeaderNextUp"); } if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteSeries) { - return _localization.GetLocalizedString("ViewTypeTvFavoriteSeries"); + return _localization.GetLocalizedString("HeaderFavoriteShows"); } if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteEpisodes) { - return _localization.GetLocalizedString("ViewTypeTvFavoriteEpisodes"); + return _localization.GetLocalizedString("HeaderFavoriteEpisodes"); } if (itemStubType.HasValue && itemStubType.Value == StubType.Series) { - return _localization.GetLocalizedString("ViewTypeTvShowSeries"); + return _localization.GetLocalizedString("Shows"); } var episode = item as Episode; diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 0036d1970..c42f22804 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -1547,7 +1547,7 @@ namespace Emby.Server.Implementations.Channels public Folder GetInternalChannelFolder(CancellationToken cancellationToken) { - var name = _localization.GetLocalizedString("ViewTypeChannels"); + var name = _localization.GetLocalizedString("Channels"); return _libraryManager.GetNamedView(name, "channels", "zz_" + name, cancellationToken); } diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 4ee0f553f..ddab3caa5 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -95,13 +95,15 @@ namespace Emby.Server.Implementations.Library if (parents.Count > 0) { - list.Add(GetUserView(parents, viewType, string.Empty, user, query.PresetViews, cancellationToken)); + var localizationKey = viewType.Replace("Tv", string.Empty); + + list.Add(GetUserView(parents, viewType, localizationKey, string.Empty, user, query.PresetViews, cancellationToken)); } } if (_config.Configuration.EnableFolderView) { - var name = _localizationManager.GetLocalizedString("ViewType" + CollectionType.Folders); + var name = _localizationManager.GetLocalizedString("Folders"); list.Add(_libraryManager.GetNamedView(name, CollectionType.Folders, string.Empty, cancellationToken)); } @@ -158,21 +160,21 @@ namespace Emby.Server.Implementations.Library .ToArray(); } - public UserView GetUserSubView(string name, string parentId, string type, string sortName, CancellationToken cancellationToken) + public UserView GetUserSubViewWithName(string name, string parentId, string type, string sortName, CancellationToken cancellationToken) { var uniqueId = parentId + "subview" + type; return _libraryManager.GetNamedView(name, parentId, type, sortName, uniqueId, cancellationToken); } - public UserView GetUserSubView(string parentId, string type, string sortName, CancellationToken cancellationToken) + public UserView GetUserSubView(string parentId, string type, string localizationKey, string sortName, CancellationToken cancellationToken) { - var name = _localizationManager.GetLocalizedString("ViewType" + type); + var name = _localizationManager.GetLocalizedString(localizationKey); - return GetUserSubView(name, parentId, type, sortName, cancellationToken); + return GetUserSubViewWithName(name, parentId, type, sortName, cancellationToken); } - private Folder GetUserView(List parents, string viewType, string sortName, User user, string[] presetViews, CancellationToken cancellationToken) + private Folder GetUserView(List parents, string viewType, string localizationKey, string sortName, User user, string[] presetViews, CancellationToken cancellationToken) { if (parents.Count == 1 && parents.All(i => string.Equals(i.CollectionType, viewType, StringComparison.OrdinalIgnoreCase))) { @@ -184,7 +186,7 @@ namespace Emby.Server.Implementations.Library return GetUserView((Folder)parents[0], viewType, string.Empty, cancellationToken); } - var name = _localizationManager.GetLocalizedString("ViewType" + viewType); + var name = _localizationManager.GetLocalizedString(localizationKey); return _libraryManager.GetNamedView(user, name, viewType, sortName, cancellationToken); } diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs index acc452fbc..97b96127a 100644 --- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs +++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs @@ -262,14 +262,14 @@ namespace MediaBrowser.Controller.Entities var list = new List(); - list.Add(GetUserView(SpecialFolder.MusicLatest, "0", parent)); - list.Add(GetUserView(SpecialFolder.MusicPlaylists, "1", parent)); - list.Add(GetUserView(SpecialFolder.MusicAlbums, "2", parent)); - list.Add(GetUserView(SpecialFolder.MusicAlbumArtists, "3", parent)); - list.Add(GetUserView(SpecialFolder.MusicArtists, "4", parent)); - list.Add(GetUserView(SpecialFolder.MusicSongs, "5", parent)); - list.Add(GetUserView(SpecialFolder.MusicGenres, "6", parent)); - list.Add(GetUserView(SpecialFolder.MusicFavorites, "7", parent)); + list.Add(GetUserView(SpecialFolder.MusicLatest, "Latest", "0", parent)); + list.Add(GetUserView(SpecialFolder.MusicPlaylists, "Playlists", "1", parent)); + list.Add(GetUserView(SpecialFolder.MusicAlbums, "Albums", "2", parent)); + list.Add(GetUserView(SpecialFolder.MusicAlbumArtists, "HeaderAlbumArtists", "3", parent)); + list.Add(GetUserView(SpecialFolder.MusicArtists, "Artists", "4", parent)); + list.Add(GetUserView(SpecialFolder.MusicSongs, "Songs", "5", parent)); + list.Add(GetUserView(SpecialFolder.MusicGenres, "Genres", "6", parent)); + list.Add(GetUserView(SpecialFolder.MusicFavorites, "Favorites", "7", parent)); return GetResult(list, parent, query); } @@ -278,9 +278,9 @@ namespace MediaBrowser.Controller.Entities { var list = new List(); - list.Add(GetUserView(SpecialFolder.MusicFavoriteAlbums, "0", parent)); - list.Add(GetUserView(SpecialFolder.MusicFavoriteArtists, "1", parent)); - list.Add(GetUserView(SpecialFolder.MusicFavoriteSongs, "2", parent)); + list.Add(GetUserView(SpecialFolder.MusicFavoriteAlbums, "HeaderFavoriteAlbums", "0", parent)); + list.Add(GetUserView(SpecialFolder.MusicFavoriteArtists, "HeaderFavoriteArtists", "1", parent)); + list.Add(GetUserView(SpecialFolder.MusicFavoriteSongs, "HeaderFavoriteSongs", "2", parent)); return GetResult(list, parent, query); } @@ -443,12 +443,12 @@ namespace MediaBrowser.Controller.Entities var list = new List(); - list.Add(GetUserView(SpecialFolder.MovieResume, "0", parent)); - list.Add(GetUserView(SpecialFolder.MovieLatest, "1", parent)); - list.Add(GetUserView(SpecialFolder.MovieMovies, "2", parent)); - list.Add(GetUserView(SpecialFolder.MovieCollections, "3", parent)); - list.Add(GetUserView(SpecialFolder.MovieFavorites, "4", parent)); - list.Add(GetUserView(SpecialFolder.MovieGenres, "5", parent)); + list.Add(GetUserView(SpecialFolder.MovieResume, "HeaderContinueWatching", "0", parent)); + list.Add(GetUserView(SpecialFolder.MovieLatest, "Latest", "1", parent)); + list.Add(GetUserView(SpecialFolder.MovieMovies, "Movies", "2", parent)); + list.Add(GetUserView(SpecialFolder.MovieCollections, "Collections", "3", parent)); + list.Add(GetUserView(SpecialFolder.MovieFavorites, "Favorites", "4", parent)); + list.Add(GetUserView(SpecialFolder.MovieGenres, "Genres", "5", parent)); return GetResult(list, parent, query); } @@ -564,7 +564,7 @@ namespace MediaBrowser.Controller.Entities }) .Where(i => i != null) - .Select(i => GetUserView(i.Name, SpecialFolder.MovieGenre, i.SortName, parent)); + .Select(i => GetUserViewWithName(i.Name, SpecialFolder.MovieGenre, i.SortName, parent)); return GetResult(genres, parent, query); } @@ -613,13 +613,13 @@ namespace MediaBrowser.Controller.Entities var list = new List(); - list.Add(GetUserView(SpecialFolder.TvResume, "0", parent)); - list.Add(GetUserView(SpecialFolder.TvNextUp, "1", parent)); - list.Add(GetUserView(SpecialFolder.TvLatest, "2", parent)); - list.Add(GetUserView(SpecialFolder.TvShowSeries, "3", parent)); - list.Add(GetUserView(SpecialFolder.TvFavoriteSeries, "4", parent)); - list.Add(GetUserView(SpecialFolder.TvFavoriteEpisodes, "5", parent)); - list.Add(GetUserView(SpecialFolder.TvGenres, "6", parent)); + list.Add(GetUserView(SpecialFolder.TvResume, "HeaderContinueWatching", "0", parent)); + list.Add(GetUserView(SpecialFolder.TvNextUp, "HeaderNextUp", "1", parent)); + list.Add(GetUserView(SpecialFolder.TvLatest, "Latest", "2", parent)); + list.Add(GetUserView(SpecialFolder.TvShowSeries, "Shows", "3", parent)); + list.Add(GetUserView(SpecialFolder.TvFavoriteSeries, "HeaderFavoriteShows", "4", parent)); + list.Add(GetUserView(SpecialFolder.TvFavoriteEpisodes, "HeaderFavoriteEpisodes", "5", parent)); + list.Add(GetUserView(SpecialFolder.TvGenres, "Genres", "6", parent)); return GetResult(list, parent, query); } @@ -703,7 +703,7 @@ namespace MediaBrowser.Controller.Entities }) .Where(i => i != null) - .Select(i => GetUserView(i.Name, SpecialFolder.TvGenre, i.SortName, parent)); + .Select(i => GetUserViewWithName(i.Name, SpecialFolder.TvGenre, i.SortName, parent)); return GetResult(genres, parent, query); } @@ -1736,20 +1736,20 @@ namespace MediaBrowser.Controller.Entities var list = new List(); //list.Add(await GetUserSubView(SpecialFolder.LiveTvNowPlaying, user, "0", parent).ConfigureAwait(false)); - list.Add(GetUserView(SpecialFolder.LiveTvChannels, string.Empty, user.RootFolder)); - list.Add(GetUserView(SpecialFolder.LiveTvRecordingGroups, string.Empty, user.RootFolder)); + list.Add(GetUserView(SpecialFolder.LiveTvChannels, "Channels", string.Empty, user.RootFolder)); + list.Add(GetUserView(SpecialFolder.LiveTvRecordingGroups, "HeaderRecordingGroups", string.Empty, user.RootFolder)); return GetResult(list, queryParent, query); } - private UserView GetUserView(string name, string type, string sortName, BaseItem parent) + private UserView GetUserViewWithName(string name, string type, string sortName, BaseItem parent) { return _userViewManager.GetUserSubView(name, parent.Id.ToString("N"), type, sortName, CancellationToken.None); } - private UserView GetUserView(string type, string sortName, BaseItem parent) + private UserView GetUserView(string type, string localizationKey, string sortName, BaseItem parent) { - return _userViewManager.GetUserSubView(parent.Id.ToString("N"), type, sortName, CancellationToken.None); + return _userViewManager.GetUserSubView(parent.Id.ToString("N"), type, localizationKey, sortName, CancellationToken.None); } public static IEnumerable FilterForAdjacency(List list, string adjacentToId) diff --git a/MediaBrowser.Controller/Library/IUserViewManager.cs b/MediaBrowser.Controller/Library/IUserViewManager.cs index ac37dc869..baecdd748 100644 --- a/MediaBrowser.Controller/Library/IUserViewManager.cs +++ b/MediaBrowser.Controller/Library/IUserViewManager.cs @@ -13,9 +13,9 @@ namespace MediaBrowser.Controller.Library { Task GetUserViews(UserViewQuery query, CancellationToken cancellationToken); - UserView GetUserSubView(string name, string parentId, string type, string sortName, CancellationToken cancellationToken); + UserView GetUserSubViewWithName(string name, string parentId, string type, string sortName, CancellationToken cancellationToken); - UserView GetUserSubView(string category, string type, string sortName, CancellationToken cancellationToken); + UserView GetUserSubView(string category, string type, string localizationKey, string sortName, CancellationToken cancellationToken); List>> GetLatestItems(LatestItemsQuery request, DtoOptions options); } diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs index 64a485bc2..a6a363ffd 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs @@ -248,7 +248,7 @@ namespace MediaBrowser.Providers.MediaInfo if (string.IsNullOrWhiteSpace(chapter.Name) || TimeSpan.TryParse(chapter.Name, out time)) { - chapter.Name = string.Format(_localization.GetLocalizedString("LabelChapterName"), index.ToString(CultureInfo.InvariantCulture)); + chapter.Name = string.Format(_localization.GetLocalizedString("ChapterNameValue"), index.ToString(CultureInfo.InvariantCulture)); } index++; } -- cgit v1.2.3 From 4ef9f68837d0c2d2b371239d8568edb6473c6072 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 16 Oct 2017 02:10:55 -0400 Subject: support delete per library --- Emby.Server.Implementations/Dto/DtoService.cs | 12 +++-- .../Library/UserViewManager.cs | 4 +- .../LiveTv/EmbyTV/EmbyTV.cs | 4 +- .../Localization/Core/ru.json | 2 +- .../ScheduledTasks/TaskManager.cs | 54 ++++++++++++++++++++++ MediaBrowser.Controller/Entities/BaseItem.cs | 28 +++++++++-- MediaBrowser.Controller/Entities/Movies/BoxSet.cs | 2 +- .../LiveTv/LiveTvAudioRecording.cs | 2 +- .../LiveTv/LiveTvVideoRecording.cs | 2 +- .../Notifications/INotificationManager.cs | 3 ++ MediaBrowser.Controller/Playlists/Playlist.cs | 2 +- MediaBrowser.Model/Tasks/ITaskManager.cs | 2 + MediaBrowser.Model/Users/UserPolicy.cs | 2 + 13 files changed, 104 insertions(+), 15 deletions(-) (limited to 'Emby.Server.Implementations/Library/UserViewManager.cs') diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 9f08c6462..ef66c201c 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -116,9 +116,11 @@ namespace Emby.Server.Implementations.Dto var channelTuples = new List>(); var index = 0; + var allCollectionFolders = _libraryManager.GetUserRootFolder().Children.OfType().ToList(); + foreach (var item in items) { - var dto = GetBaseItemDtoInternal(item, options, user, owner); + var dto = GetBaseItemDtoInternal(item, options, allCollectionFolders, user, owner); var tvChannel = item as LiveTvChannel; if (tvChannel != null) @@ -173,7 +175,8 @@ namespace Emby.Server.Implementations.Dto { var syncDictionary = GetSyncedItemProgress(options); - var dto = GetBaseItemDtoInternal(item, options, user, owner); + var allCollectionFolders = _libraryManager.GetUserRootFolder().Children.OfType().ToList(); + var dto = GetBaseItemDtoInternal(item, options, allCollectionFolders, user, owner); var tvChannel = item as LiveTvChannel; if (tvChannel != null) { @@ -303,7 +306,7 @@ namespace Emby.Server.Implementations.Dto } } - private BaseItemDto GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null) + private BaseItemDto GetBaseItemDtoInternal(BaseItem item, DtoOptions options, List allCollectionFolders, User user = null, BaseItem owner = null) { var fields = options.Fields; @@ -472,7 +475,8 @@ namespace Emby.Server.Implementations.Dto public BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List taggedItems, Dictionary syncProgress, User user = null) { - var dto = GetBaseItemDtoInternal(item, options, user); + var allCollectionFolders = _libraryManager.GetUserRootFolder().Children.OfType().ToList(); + var dto = GetBaseItemDtoInternal(item, options, allCollectionFolders, user); if (taggedItems != null && options.Fields.Contains(ItemFields.ItemCounts)) { diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index ddab3caa5..dd478dee0 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -95,7 +95,9 @@ namespace Emby.Server.Implementations.Library if (parents.Count > 0) { - var localizationKey = viewType.Replace("Tv", string.Empty); + var localizationKey = string.Equals(viewType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) ? + "Shows" : + "Movies"; list.Add(GetUserView(parents, viewType, localizationKey, string.Empty, user, query.PresetViews, cancellationToken)); } diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 4a2836d59..5c32086ff 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -1526,13 +1526,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV private void TriggerRefresh(string path) { - _logger.Debug("Triggering refresh on {0}", path); + _logger.Info("Triggering refresh on {0}", path); var item = GetAffectedBaseItem(_fileSystem.GetDirectoryName(path)); if (item != null) { - _logger.Debug("Refreshing recording parent {0}", item.Path); + _logger.Info("Refreshing recording parent {0}", item.Path); _providerManager.QueueRefresh(item.Id, new MetadataRefreshOptions(_fileSystem) { diff --git a/Emby.Server.Implementations/Localization/Core/ru.json b/Emby.Server.Implementations/Localization/Core/ru.json index a921349a3..d9cd74273 100644 --- a/Emby.Server.Implementations/Localization/Core/ru.json +++ b/Emby.Server.Implementations/Localization/Core/ru.json @@ -54,7 +54,7 @@ "UserDeletedWithName": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c {0} \u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0451\u043d", "UserConfigurationUpdatedWithName": "\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437-\u043b\u044f {0} \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430", "MessageServerConfigurationUpdated": "\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430", - "MessageNamedServerConfigurationUpdatedWithValue": "\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0440\u0430\u0437\u0434\u0435\u043b {0}) \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430", + "MessageNamedServerConfigurationUpdatedWithValue": "\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0440\u0430\u0437\u0434\u0435\u043b {0}) \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430", "MessageApplicationUpdated": "Emby Server \u0431\u044b\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d", "FailedLoginAttemptWithUserName": "{0} - \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u0430", "AuthenticationSucceededWithUserName": "{0} - \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u0430", diff --git a/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs b/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs index 5f9bf3731..c0fcb459d 100644 --- a/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs +++ b/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs @@ -11,6 +11,7 @@ using MediaBrowser.Model.Logging; using MediaBrowser.Model.Serialization; using MediaBrowser.Model.System; using MediaBrowser.Model.Tasks; +using System.IO; namespace Emby.Server.Implementations.ScheduledTasks { @@ -86,6 +87,57 @@ namespace Emby.Server.Implementations.ScheduledTasks } } + public void RunTaskOnNextStartup(string key) + { + var path = Path.Combine(ApplicationPaths.CachePath, "startuptasks.txt"); + + List lines; + + try + { + lines = _fileSystem.ReadAllLines(path).ToList() ; + } + catch + { + lines = new List(); + } + + if (!lines.Contains(key, StringComparer.OrdinalIgnoreCase)) + { + lines.Add(key); + _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(path)); + _fileSystem.WriteAllLines(path, lines); + } + } + + private void RunStartupTasks() + { + var path = Path.Combine(ApplicationPaths.CachePath, "startuptasks.txt"); + + List lines; + + try + { + lines = _fileSystem.ReadAllLines(path).Where(i => !string.IsNullOrWhiteSpace(i)).Distinct(StringComparer.OrdinalIgnoreCase).ToList(); + + foreach (var key in lines) + { + var task = ScheduledTasks.FirstOrDefault(i => string.Equals(i.ScheduledTask.Key, key, StringComparison.OrdinalIgnoreCase)); + + if (task != null) + { + QueueScheduledTask(task, new TaskExecutionOptions()); + } + } + + _fileSystem.DeleteFile(path); + } + catch + { + return; + } + } + /// /// Cancels if running and queue. /// @@ -235,6 +287,8 @@ namespace Emby.Server.Implementations.ScheduledTasks ScheduledTasks = myTasks.ToArray(); BindToSystemEvent(); + + RunStartupTasks(); } /// diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 46c037a44..051a2cbca 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -477,14 +477,36 @@ namespace MediaBrowser.Controller.Entities locationType != LocationType.Virtual; } - public virtual bool IsAuthorizedToDelete(User user) + public virtual bool IsAuthorizedToDelete(User user, List allCollectionFolders) { - return user.Policy.EnableContentDeletion; + if (user.Policy.EnableContentDeletion) + { + return true; + } + + var allowed = user.Policy.EnableContentDeletionFromFolders; + var collectionFolders = LibraryManager.GetCollectionFolders(this, allCollectionFolders); + + foreach (var folder in collectionFolders) + { + if (allowed.Contains(folder.Id.ToString("N"), StringComparer.OrdinalIgnoreCase)) + { + return true; + } + } + + return false; + } + + public bool CanDelete(User user, List allCollectionFolders) + { + return CanDelete() && IsAuthorizedToDelete(user, allCollectionFolders); } public bool CanDelete(User user) { - return CanDelete() && IsAuthorizedToDelete(user); + var allCollectionFolders = LibraryManager.GetUserRootFolder().Children.OfType().ToList(); + return CanDelete(user, allCollectionFolders); } public virtual bool CanDownload() diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs index bd8d9024d..0067515d8 100644 --- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs +++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs @@ -126,7 +126,7 @@ namespace MediaBrowser.Controller.Entities.Movies } } - public override bool IsAuthorizedToDelete(User user) + public override bool IsAuthorizedToDelete(User user, List allCollectionFolders) { return true; } diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs index 2dfc59d22..bd84541f8 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs @@ -132,7 +132,7 @@ namespace MediaBrowser.Controller.LiveTv return true; } - public override bool IsAuthorizedToDelete(User user) + public override bool IsAuthorizedToDelete(User user, List allCollectionFolders) { return user.Policy.EnableLiveTvManagement; } diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs index 1dfed4f75..37c1faac6 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs @@ -131,7 +131,7 @@ namespace MediaBrowser.Controller.LiveTv return true; } - public override bool IsAuthorizedToDelete(User user) + public override bool IsAuthorizedToDelete(User user, List allCollectionFolders) { return user.Policy.EnableLiveTvManagement; } diff --git a/MediaBrowser.Controller/Notifications/INotificationManager.cs b/MediaBrowser.Controller/Notifications/INotificationManager.cs index f9d264314..68cfd6ff1 100644 --- a/MediaBrowser.Controller/Notifications/INotificationManager.cs +++ b/MediaBrowser.Controller/Notifications/INotificationManager.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Controller.Entities; namespace MediaBrowser.Controller.Notifications { @@ -15,6 +16,8 @@ namespace MediaBrowser.Controller.Notifications /// Task. Task SendNotification(NotificationRequest request, CancellationToken cancellationToken); + Task SendNotification(NotificationRequest request, BaseItem relatedItem, CancellationToken cancellationToken); + /// /// Adds the parts. /// diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs index ee96a8c3b..071f8a096 100644 --- a/MediaBrowser.Controller/Playlists/Playlist.cs +++ b/MediaBrowser.Controller/Playlists/Playlist.cs @@ -73,7 +73,7 @@ namespace MediaBrowser.Controller.Playlists return 1; } - public override bool IsAuthorizedToDelete(User user) + public override bool IsAuthorizedToDelete(User user, List allCollectionFolders) { return true; } diff --git a/MediaBrowser.Model/Tasks/ITaskManager.cs b/MediaBrowser.Model/Tasks/ITaskManager.cs index fa3da97b3..1674fc107 100644 --- a/MediaBrowser.Model/Tasks/ITaskManager.cs +++ b/MediaBrowser.Model/Tasks/ITaskManager.cs @@ -74,5 +74,7 @@ namespace MediaBrowser.Model.Tasks event EventHandler> TaskExecuting; event EventHandler TaskCompleted; + + void RunTaskOnNextStartup(string key); } } \ No newline at end of file diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs index 84ee5d637..de2e9cc04 100644 --- a/MediaBrowser.Model/Users/UserPolicy.cs +++ b/MediaBrowser.Model/Users/UserPolicy.cs @@ -44,6 +44,7 @@ namespace MediaBrowser.Model.Users public bool EnablePlaybackRemuxing { get; set; } public bool EnableContentDeletion { get; set; } + public string[] EnableContentDeletionFromFolders { get; set; } public bool EnableContentDownloading { get; set; } /// @@ -73,6 +74,7 @@ namespace MediaBrowser.Model.Users public UserPolicy() { EnableContentDeletion = true; + EnableContentDeletionFromFolders = new string[] { }; EnableSyncTranscoding = true; -- cgit v1.2.3 From 98cd888801a11ec2e3e3b72db4e375c052ef7791 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 17 Oct 2017 15:49:39 -0400 Subject: update translations --- .../Library/UserViewManager.cs | 2 +- .../Localization/Core/ar.json | 1 + .../Localization/Core/bg-BG.json | 1 + .../Localization/Core/ca.json | 1 + .../Localization/Core/cs.json | 1 + .../Localization/Core/da.json | 1 + .../Localization/Core/de.json | 1 + .../Localization/Core/en-GB.json | 1 + .../Localization/Core/en-US.json | 187 +++++++++++---------- .../Localization/Core/es-AR.json | 1 + .../Localization/Core/es-MX.json | 1 + .../Localization/Core/es.json | 1 + .../Localization/Core/fr-CA.json | 1 + .../Localization/Core/fr.json | 1 + .../Localization/Core/he.json | 1 + .../Localization/Core/hr.json | 1 + .../Localization/Core/hu.json | 1 + .../Localization/Core/it.json | 1 + .../Localization/Core/kk.json | 1 + .../Localization/Core/ko.json | 1 + .../Localization/Core/lt-LT.json | 1 + .../Localization/Core/ms.json | 1 + .../Localization/Core/nb.json | 1 + .../Localization/Core/nl.json | 1 + .../Localization/Core/pl.json | 1 + .../Localization/Core/pt-BR.json | 1 + .../Localization/Core/pt-PT.json | 1 + .../Localization/Core/ru.json | 1 + .../Localization/Core/sk.json | 1 + .../Localization/Core/sl-SI.json | 1 + .../Localization/Core/sv.json | 1 + .../Localization/Core/tr.json | 1 + .../Localization/Core/zh-CN.json | 1 + .../Localization/Core/zh-HK.json | 1 + SocketHttpListener/Net/HttpConnection.cs | 8 +- 35 files changed, 134 insertions(+), 95 deletions(-) (limited to 'Emby.Server.Implementations/Library/UserViewManager.cs') diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index dd478dee0..e97bf11c3 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -96,7 +96,7 @@ namespace Emby.Server.Implementations.Library if (parents.Count > 0) { var localizationKey = string.Equals(viewType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) ? - "Shows" : + "TvShows" : "Movies"; list.Add(GetUserView(parents, viewType, localizationKey, string.Empty, user, query.PresetViews, cancellationToken)); diff --git a/Emby.Server.Implementations/Localization/Core/ar.json b/Emby.Server.Implementations/Localization/Core/ar.json index 0bc7490d3..0c2ab1f6d 100644 --- a/Emby.Server.Implementations/Localization/Core/ar.json +++ b/Emby.Server.Implementations/Localization/Core/ar.json @@ -27,6 +27,7 @@ "Artists": "\u0627\u0644\u0641\u0646\u0627\u0646\u0648\u0646", "Folders": "\u0627\u0644\u0645\u062c\u0644\u062f\u0627\u062a", "Songs": "\u0627\u0644\u0623\u063a\u0627\u0646\u064a", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "\u0623\u0646\u0648\u0627\u0639 \u0627\u0644\u0623\u0641\u0644\u0627\u0645", "NameSeasonNumber": "\u0627\u0644\u0645\u0648\u0633\u0645 {0}", diff --git a/Emby.Server.Implementations/Localization/Core/bg-BG.json b/Emby.Server.Implementations/Localization/Core/bg-BG.json index 91870578b..40899caab 100644 --- a/Emby.Server.Implementations/Localization/Core/bg-BG.json +++ b/Emby.Server.Implementations/Localization/Core/bg-BG.json @@ -27,6 +27,7 @@ "Artists": "\u0418\u0437\u043f\u044a\u043b\u043d\u0438\u0442\u0435\u043b\u0438", "Folders": "\u041f\u0430\u043f\u043a\u0438", "Songs": "\u041f\u0435\u0441\u043d\u0438", + "TvShows": "TV Shows", "Shows": "\u0421\u0435\u0440\u0438\u0430\u043b\u0438", "Genres": "\u0416\u0430\u043d\u0440\u043e\u0432\u0435", "NameSeasonNumber": "\u0421\u0435\u0437\u043e\u043d {0}", diff --git a/Emby.Server.Implementations/Localization/Core/ca.json b/Emby.Server.Implementations/Localization/Core/ca.json index 829369df5..cc2c00234 100644 --- a/Emby.Server.Implementations/Localization/Core/ca.json +++ b/Emby.Server.Implementations/Localization/Core/ca.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "G\u00e8neres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/cs.json b/Emby.Server.Implementations/Localization/Core/cs.json index 68dad0e46..abbfde380 100644 --- a/Emby.Server.Implementations/Localization/Core/cs.json +++ b/Emby.Server.Implementations/Localization/Core/cs.json @@ -27,6 +27,7 @@ "Artists": "Um\u011blci", "Folders": "Slo\u017eky", "Songs": "Skladby", + "TvShows": "TV Shows", "Shows": "Seri\u00e1ly", "Genres": "\u017d\u00e1nry", "NameSeasonNumber": "Sez\u00f3na {0}", diff --git a/Emby.Server.Implementations/Localization/Core/da.json b/Emby.Server.Implementations/Localization/Core/da.json index f7a727d1a..ed9652c33 100644 --- a/Emby.Server.Implementations/Localization/Core/da.json +++ b/Emby.Server.Implementations/Localization/Core/da.json @@ -27,6 +27,7 @@ "Artists": "Kunstner", "Folders": "Mapper", "Songs": "Sange", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "Genre", "NameSeasonNumber": "S\u00e6son {0}", diff --git a/Emby.Server.Implementations/Localization/Core/de.json b/Emby.Server.Implementations/Localization/Core/de.json index dad7dc622..183b4aaf8 100644 --- a/Emby.Server.Implementations/Localization/Core/de.json +++ b/Emby.Server.Implementations/Localization/Core/de.json @@ -27,6 +27,7 @@ "Artists": "Interpreten", "Folders": "Verzeichnisse", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Serien", "Genres": "Genres", "NameSeasonNumber": "Staffel {0}", diff --git a/Emby.Server.Implementations/Localization/Core/en-GB.json b/Emby.Server.Implementations/Localization/Core/en-GB.json index ebd240e35..8dc9abf01 100644 --- a/Emby.Server.Implementations/Localization/Core/en-GB.json +++ b/Emby.Server.Implementations/Localization/Core/en-GB.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/en-US.json b/Emby.Server.Implementations/Localization/Core/en-US.json index d24e244df..51bbf341f 100644 --- a/Emby.Server.Implementations/Localization/Core/en-US.json +++ b/Emby.Server.Implementations/Localization/Core/en-US.json @@ -1,95 +1,96 @@ { - "Latest": "Latest", - "ValueSpecialEpisodeName": "Special - {0}", - "Inherit": "Inherit", - "Books": "Books", - "Music": "Music", - "Games": "Games", - "Photos": "Photos", - "MixedContent": "Mixed content", - "MusicVideos": "Music videos", - "HomeVideos": "Home videos", - "Playlists": "Playlists", - "HeaderRecordingGroups": "Recording Groups", - "HeaderContinueWatching": "Continue Watching", - "HeaderFavoriteArtists": "Favorite Artists", - "HeaderFavoriteSongs": "Favorite Songs", - "HeaderAlbumArtists": "Album Artists", - "HeaderFavoriteAlbums": "Favorite Albums", - "HeaderFavoriteEpisodes": "Favorite Episodes", - "HeaderFavoriteShows": "Favorite Shows", - "HeaderNextUp": "Next Up", - "Favorites": "Favorites", - "Collections": "Collections", - "Channels": "Channels", - "Movies": "Movies", - "Albums": "Albums", - "Artists": "Artists", - "Folders": "Folders", - "Songs": "Songs", - "Shows": "Shows", - "Genres": "Genres", - "NameSeasonNumber": "Season {0}", - "AppDeviceValues": "App: {0}, Device: {1}", - "UserDownloadingItemWithValues": "{0} is downloading {1}", - "HeaderLiveTV": "Live TV", - "ChapterNameValue": "Chapter {0}", - "ScheduledTaskFailedWithName": "{0} failed", - "LabelRunningTimeValue": "Running time: {0}", - "ScheduledTaskStartedWithName": "{0} started", - "VersionNumber": "Version {0}", - "PluginInstalledWithName": "{0} was installed", - "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly.", - "PluginUpdatedWithName": "{0} was updated", - "PluginUninstalledWithName": "{0} was uninstalled", - "ItemAddedWithName": "{0} was added to the library", - "ItemRemovedWithName": "{0} was removed from the library", - "LabelIpAddressValue": "Ip address: {0}", - "DeviceOnlineWithName": "{0} is connected", - "UserOnlineFromDevice": "{0} is online from {1}", - "ProviderValue": "Provider: {0}", - "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}", - "UserCreatedWithName": "User {0} has been created", - "UserPasswordChangedWithName": "Password has been changed for user {0}", - "UserDeletedWithName": "User {0} has been deleted", - "UserConfigurationUpdatedWithName": "User configuration has been updated for {0}", - "MessageServerConfigurationUpdated": "Server configuration has been updated", - "MessageNamedServerConfigurationUpdatedWithValue": "Server configuration section {0} has been updated", - "MessageApplicationUpdated": "Emby Server has been updated", - "FailedLoginAttemptWithUserName": "Failed login attempt from {0}", - "AuthenticationSucceededWithUserName": "{0} successfully authenticated", - "UserOfflineFromDevice": "{0} has disconnected from {1}", - "DeviceOfflineWithName": "{0} has disconnected", - "UserStartedPlayingItemWithValues": "{0} has started playing {1}", - "UserStoppedPlayingItemWithValues": "{0} has stopped playing {1}", - "NotificationOptionPluginError": "Plugin failure", - "NotificationOptionApplicationUpdateAvailable": "Application update available", - "NotificationOptionApplicationUpdateInstalled": "Application update installed", - "NotificationOptionPluginUpdateInstalled": "Plugin update installed", - "NotificationOptionPluginInstalled": "Plugin installed", - "NotificationOptionPluginUninstalled": "Plugin uninstalled", - "NotificationOptionVideoPlayback": "Video playback started", - "NotificationOptionAudioPlayback": "Audio playback started", - "NotificationOptionGamePlayback": "Game playback started", - "NotificationOptionVideoPlaybackStopped": "Video playback stopped", - "NotificationOptionAudioPlaybackStopped": "Audio playback stopped", - "NotificationOptionGamePlaybackStopped": "Game playback stopped", - "NotificationOptionTaskFailed": "Scheduled task failure", - "NotificationOptionInstallationFailed": "Installation failure", - "NotificationOptionNewLibraryContent": "New content added", - "NotificationOptionCameraImageUploaded": "Camera image uploaded", - "NotificationOptionUserLockedOut": "User locked out", - "NotificationOptionServerRestartRequired": "Server restart required", - "UserLockedOutWithName": "User {0} has been locked out", - "SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}", - "Sync": "Sync", - "User": "User", - "System": "System", - "Application": "Application", - "Plugin": "Plugin", - "LabelExit": "Exit", - "LabelVisitCommunity": "Visit Community", - "LabelBrowseLibrary": "Browse Library", - "LabelConfigureServer": "Configure Emby", - "LabelRestartServer": "Restart Server" + "Latest": "Latest", + "ValueSpecialEpisodeName": "Special - {0}", + "Inherit": "Inherit", + "Books": "Books", + "Music": "Music", + "Games": "Games", + "Photos": "Photos", + "MixedContent": "Mixed content", + "MusicVideos": "Music videos", + "HomeVideos": "Home videos", + "Playlists": "Playlists", + "HeaderRecordingGroups": "Recording Groups", + "HeaderContinueWatching": "Continue Watching", + "HeaderFavoriteArtists": "Favorite Artists", + "HeaderFavoriteSongs": "Favorite Songs", + "HeaderAlbumArtists": "Album Artists", + "HeaderFavoriteAlbums": "Favorite Albums", + "HeaderFavoriteEpisodes": "Favorite Episodes", + "HeaderFavoriteShows": "Favorite Shows", + "HeaderNextUp": "Next Up", + "Favorites": "Favorites", + "Collections": "Collections", + "Channels": "Channels", + "Movies": "Movies", + "Albums": "Albums", + "Artists": "Artists", + "Folders": "Folders", + "Songs": "Songs", + "TvShows": "TV Shows", + "Shows": "Shows", + "Genres": "Genres", + "NameSeasonNumber": "Season {0}", + "AppDeviceValues": "App: {0}, Device: {1}", + "UserDownloadingItemWithValues": "{0} is downloading {1}", + "HeaderLiveTV": "Live TV", + "ChapterNameValue": "Chapter {0}", + "ScheduledTaskFailedWithName": "{0} failed", + "LabelRunningTimeValue": "Running time: {0}", + "ScheduledTaskStartedWithName": "{0} started", + "VersionNumber": "Version {0}", + "PluginInstalledWithName": "{0} was installed", + "StartupEmbyServerIsLoading": "Emby Server is loading. Please try again shortly.", + "PluginUpdatedWithName": "{0} was updated", + "PluginUninstalledWithName": "{0} was uninstalled", + "ItemAddedWithName": "{0} was added to the library", + "ItemRemovedWithName": "{0} was removed from the library", + "LabelIpAddressValue": "Ip address: {0}", + "DeviceOnlineWithName": "{0} is connected", + "UserOnlineFromDevice": "{0} is online from {1}", + "ProviderValue": "Provider: {0}", + "SubtitlesDownloadedForItem": "Subtitles downloaded for {0}", + "UserCreatedWithName": "User {0} has been created", + "UserPasswordChangedWithName": "Password has been changed for user {0}", + "UserDeletedWithName": "User {0} has been deleted", + "UserConfigurationUpdatedWithName": "User configuration has been updated for {0}", + "MessageServerConfigurationUpdated": "Server configuration has been updated", + "MessageNamedServerConfigurationUpdatedWithValue": "Server configuration section {0} has been updated", + "MessageApplicationUpdated": "Emby Server has been updated", + "FailedLoginAttemptWithUserName": "Failed login attempt from {0}", + "AuthenticationSucceededWithUserName": "{0} successfully authenticated", + "UserOfflineFromDevice": "{0} has disconnected from {1}", + "DeviceOfflineWithName": "{0} has disconnected", + "UserStartedPlayingItemWithValues": "{0} has started playing {1}", + "UserStoppedPlayingItemWithValues": "{0} has stopped playing {1}", + "NotificationOptionPluginError": "Plugin failure", + "NotificationOptionApplicationUpdateAvailable": "Application update available", + "NotificationOptionApplicationUpdateInstalled": "Application update installed", + "NotificationOptionPluginUpdateInstalled": "Plugin update installed", + "NotificationOptionPluginInstalled": "Plugin installed", + "NotificationOptionPluginUninstalled": "Plugin uninstalled", + "NotificationOptionVideoPlayback": "Video playback started", + "NotificationOptionAudioPlayback": "Audio playback started", + "NotificationOptionGamePlayback": "Game playback started", + "NotificationOptionVideoPlaybackStopped": "Video playback stopped", + "NotificationOptionAudioPlaybackStopped": "Audio playback stopped", + "NotificationOptionGamePlaybackStopped": "Game playback stopped", + "NotificationOptionTaskFailed": "Scheduled task failure", + "NotificationOptionInstallationFailed": "Installation failure", + "NotificationOptionNewLibraryContent": "New content added", + "NotificationOptionCameraImageUploaded": "Camera image uploaded", + "NotificationOptionUserLockedOut": "User locked out", + "NotificationOptionServerRestartRequired": "Server restart required", + "UserLockedOutWithName": "User {0} has been locked out", + "SubtitleDownloadFailureForItem": "Subtitles failed to download for {0}", + "Sync": "Sync", + "User": "User", + "System": "System", + "Application": "Application", + "Plugin": "Plugin", + "LabelExit": "Exit", + "LabelVisitCommunity": "Visit Community", + "LabelBrowseLibrary": "Browse Library", + "LabelConfigureServer": "Configure Emby", + "LabelRestartServer": "Restart Server" } \ No newline at end of file diff --git a/Emby.Server.Implementations/Localization/Core/es-AR.json b/Emby.Server.Implementations/Localization/Core/es-AR.json index 426e292d6..e4a49abf6 100644 --- a/Emby.Server.Implementations/Localization/Core/es-AR.json +++ b/Emby.Server.Implementations/Localization/Core/es-AR.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Series", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/es-MX.json b/Emby.Server.Implementations/Localization/Core/es-MX.json index a31b55f67..45cc2c69b 100644 --- a/Emby.Server.Implementations/Localization/Core/es-MX.json +++ b/Emby.Server.Implementations/Localization/Core/es-MX.json @@ -27,6 +27,7 @@ "Artists": "Artistas", "Folders": "Carpetas", "Songs": "Canciones", + "TvShows": "TV Shows", "Shows": "Programas", "Genres": "G\u00e9neros", "NameSeasonNumber": "Temporada {0}", diff --git a/Emby.Server.Implementations/Localization/Core/es.json b/Emby.Server.Implementations/Localization/Core/es.json index dd2569ddb..68975d632 100644 --- a/Emby.Server.Implementations/Localization/Core/es.json +++ b/Emby.Server.Implementations/Localization/Core/es.json @@ -27,6 +27,7 @@ "Artists": "Artistas", "Folders": "Carpetas", "Songs": "Canciones", + "TvShows": "TV Shows", "Shows": "Series", "Genres": "G\u00e9neros", "NameSeasonNumber": "Temporada {0}", diff --git a/Emby.Server.Implementations/Localization/Core/fr-CA.json b/Emby.Server.Implementations/Localization/Core/fr-CA.json index c63948e31..795bc98cc 100644 --- a/Emby.Server.Implementations/Localization/Core/fr-CA.json +++ b/Emby.Server.Implementations/Localization/Core/fr-CA.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Series", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/fr.json b/Emby.Server.Implementations/Localization/Core/fr.json index 79fa8e1f8..5ea01fcdb 100644 --- a/Emby.Server.Implementations/Localization/Core/fr.json +++ b/Emby.Server.Implementations/Localization/Core/fr.json @@ -27,6 +27,7 @@ "Artists": "Artistes", "Folders": "Dossiers", "Songs": "Chansons", + "TvShows": "TV Shows", "Shows": "\u00c9missions", "Genres": "Genres", "NameSeasonNumber": "Saison {0}", diff --git a/Emby.Server.Implementations/Localization/Core/he.json b/Emby.Server.Implementations/Localization/Core/he.json index c934af48f..f287dc422 100644 --- a/Emby.Server.Implementations/Localization/Core/he.json +++ b/Emby.Server.Implementations/Localization/Core/he.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "\u05d6'\u05d0\u05e0\u05e8\u05d9\u05dd", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/hr.json b/Emby.Server.Implementations/Localization/Core/hr.json index 8d6d95fd8..143e3ab82 100644 --- a/Emby.Server.Implementations/Localization/Core/hr.json +++ b/Emby.Server.Implementations/Localization/Core/hr.json @@ -27,6 +27,7 @@ "Artists": "Izvo\u0111a\u010di", "Folders": "Mape", "Songs": "Pjesme", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "\u017danrovi", "NameSeasonNumber": "Sezona {0}", diff --git a/Emby.Server.Implementations/Localization/Core/hu.json b/Emby.Server.Implementations/Localization/Core/hu.json index 3dd9b4347..80160966f 100644 --- a/Emby.Server.Implementations/Localization/Core/hu.json +++ b/Emby.Server.Implementations/Localization/Core/hu.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "M\u0171fajok", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/it.json b/Emby.Server.Implementations/Localization/Core/it.json index 7c21d2713..4ff0d98d8 100644 --- a/Emby.Server.Implementations/Localization/Core/it.json +++ b/Emby.Server.Implementations/Localization/Core/it.json @@ -27,6 +27,7 @@ "Artists": "Artisti", "Folders": "Cartelle", "Songs": "Canzoni", + "TvShows": "TV Shows", "Shows": "Programmi", "Genres": "Generi", "NameSeasonNumber": "Stagione {0}", diff --git a/Emby.Server.Implementations/Localization/Core/kk.json b/Emby.Server.Implementations/Localization/Core/kk.json index 73647ea12..e99623557 100644 --- a/Emby.Server.Implementations/Localization/Core/kk.json +++ b/Emby.Server.Implementations/Localization/Core/kk.json @@ -27,6 +27,7 @@ "Artists": "\u041e\u0440\u044b\u043d\u0434\u0430\u0443\u0448\u044b\u043b\u0430\u0440", "Folders": "\u049a\u0430\u043b\u0442\u0430\u043b\u0430\u0440", "Songs": "\u04d8\u0443\u0435\u043d\u0434\u0435\u0440", + "TvShows": "TV Shows", "Shows": "\u041a\u04e9\u0440\u0441\u0435\u0442\u0456\u043c\u0434\u0435\u0440", "Genres": "\u0416\u0430\u043d\u0440\u043b\u0430\u0440", "NameSeasonNumber": "{0}-\u043c\u0430\u0443\u0441\u044b\u043c", diff --git a/Emby.Server.Implementations/Localization/Core/ko.json b/Emby.Server.Implementations/Localization/Core/ko.json index bd2909efb..6c5ed0260 100644 --- a/Emby.Server.Implementations/Localization/Core/ko.json +++ b/Emby.Server.Implementations/Localization/Core/ko.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/lt-LT.json b/Emby.Server.Implementations/Localization/Core/lt-LT.json index 51b962c65..21ed36d7c 100644 --- a/Emby.Server.Implementations/Localization/Core/lt-LT.json +++ b/Emby.Server.Implementations/Localization/Core/lt-LT.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "\u017danrai", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/ms.json b/Emby.Server.Implementations/Localization/Core/ms.json index 426e292d6..e4a49abf6 100644 --- a/Emby.Server.Implementations/Localization/Core/ms.json +++ b/Emby.Server.Implementations/Localization/Core/ms.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Series", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/nb.json b/Emby.Server.Implementations/Localization/Core/nb.json index c422d2177..d0482315d 100644 --- a/Emby.Server.Implementations/Localization/Core/nb.json +++ b/Emby.Server.Implementations/Localization/Core/nb.json @@ -27,6 +27,7 @@ "Artists": "Artister", "Folders": "Mapper", "Songs": "Sanger", + "TvShows": "TV Shows", "Shows": "Programmer", "Genres": "Sjanger", "NameSeasonNumber": "Sesong {0}", diff --git a/Emby.Server.Implementations/Localization/Core/nl.json b/Emby.Server.Implementations/Localization/Core/nl.json index 37120f08c..daba9bed5 100644 --- a/Emby.Server.Implementations/Localization/Core/nl.json +++ b/Emby.Server.Implementations/Localization/Core/nl.json @@ -27,6 +27,7 @@ "Artists": "Artiesten", "Folders": "Mappen", "Songs": "Titels", + "TvShows": "TV Shows", "Shows": "Series", "Genres": "Genres", "NameSeasonNumber": "Seizoen {0}", diff --git a/Emby.Server.Implementations/Localization/Core/pl.json b/Emby.Server.Implementations/Localization/Core/pl.json index 363d0e792..24ac0d973 100644 --- a/Emby.Server.Implementations/Localization/Core/pl.json +++ b/Emby.Server.Implementations/Localization/Core/pl.json @@ -27,6 +27,7 @@ "Artists": "Wykonawcy", "Folders": "Foldery", "Songs": "Utwory", + "TvShows": "TV Shows", "Shows": "Seriale", "Genres": "Gatunki", "NameSeasonNumber": "Sezon {0}", diff --git a/Emby.Server.Implementations/Localization/Core/pt-BR.json b/Emby.Server.Implementations/Localization/Core/pt-BR.json index ffbc693c3..196a6b78b 100644 --- a/Emby.Server.Implementations/Localization/Core/pt-BR.json +++ b/Emby.Server.Implementations/Localization/Core/pt-BR.json @@ -27,6 +27,7 @@ "Artists": "Artistas", "Folders": "Pastas", "Songs": "M\u00fasicas", + "TvShows": "TV Shows", "Shows": "S\u00e9ries", "Genres": "G\u00eaneros", "NameSeasonNumber": "Temporada {0}", diff --git a/Emby.Server.Implementations/Localization/Core/pt-PT.json b/Emby.Server.Implementations/Localization/Core/pt-PT.json index bb221e643..7a6b8f419 100644 --- a/Emby.Server.Implementations/Localization/Core/pt-PT.json +++ b/Emby.Server.Implementations/Localization/Core/pt-PT.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/ru.json b/Emby.Server.Implementations/Localization/Core/ru.json index d9cd74273..f3a1cfb7b 100644 --- a/Emby.Server.Implementations/Localization/Core/ru.json +++ b/Emby.Server.Implementations/Localization/Core/ru.json @@ -27,6 +27,7 @@ "Artists": "\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0438", "Folders": "\u041f\u0430\u043f\u043a\u0438", "Songs": "\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438", + "TvShows": "TV Shows", "Shows": "\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0438", "Genres": "\u0416\u0430\u043d\u0440\u044b", "NameSeasonNumber": "\u0421\u0435\u0437\u043e\u043d {0}", diff --git a/Emby.Server.Implementations/Localization/Core/sk.json b/Emby.Server.Implementations/Localization/Core/sk.json index f69b7a436..98f60e5e1 100644 --- a/Emby.Server.Implementations/Localization/Core/sk.json +++ b/Emby.Server.Implementations/Localization/Core/sk.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Series", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/sl-SI.json b/Emby.Server.Implementations/Localization/Core/sl-SI.json index d063cccc0..cb8e080e4 100644 --- a/Emby.Server.Implementations/Localization/Core/sl-SI.json +++ b/Emby.Server.Implementations/Localization/Core/sl-SI.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Serije", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/sv.json b/Emby.Server.Implementations/Localization/Core/sv.json index e3ec363ce..a03881183 100644 --- a/Emby.Server.Implementations/Localization/Core/sv.json +++ b/Emby.Server.Implementations/Localization/Core/sv.json @@ -27,6 +27,7 @@ "Artists": "Artister", "Folders": "Mappar", "Songs": "L\u00e5tar", + "TvShows": "TV Shows", "Shows": "Serier", "Genres": "Genrer", "NameSeasonNumber": "S\u00e4song {0}", diff --git a/Emby.Server.Implementations/Localization/Core/tr.json b/Emby.Server.Implementations/Localization/Core/tr.json index 3a5f84e09..a0a515170 100644 --- a/Emby.Server.Implementations/Localization/Core/tr.json +++ b/Emby.Server.Implementations/Localization/Core/tr.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/Emby.Server.Implementations/Localization/Core/zh-CN.json b/Emby.Server.Implementations/Localization/Core/zh-CN.json index 2eb6d89e8..42126ca1b 100644 --- a/Emby.Server.Implementations/Localization/Core/zh-CN.json +++ b/Emby.Server.Implementations/Localization/Core/zh-CN.json @@ -27,6 +27,7 @@ "Artists": "\u827a\u672f\u5bb6", "Folders": "\u6587\u4ef6\u5939", "Songs": "\u6b4c\u66f2", + "TvShows": "TV Shows", "Shows": "\u8282\u76ee", "Genres": "\u98ce\u683c", "NameSeasonNumber": "\u5b63 {0}", diff --git a/Emby.Server.Implementations/Localization/Core/zh-HK.json b/Emby.Server.Implementations/Localization/Core/zh-HK.json index 4cd926862..37afc47e6 100644 --- a/Emby.Server.Implementations/Localization/Core/zh-HK.json +++ b/Emby.Server.Implementations/Localization/Core/zh-HK.json @@ -27,6 +27,7 @@ "Artists": "Artists", "Folders": "Folders", "Songs": "Songs", + "TvShows": "TV Shows", "Shows": "Shows", "Genres": "Genres", "NameSeasonNumber": "Season {0}", diff --git a/SocketHttpListener/Net/HttpConnection.cs b/SocketHttpListener/Net/HttpConnection.cs index 4e8158964..05576ea1e 100644 --- a/SocketHttpListener/Net/HttpConnection.cs +++ b/SocketHttpListener/Net/HttpConnection.cs @@ -528,7 +528,13 @@ namespace SocketHttpListener.Net finally { if (s != null) - s.Close(); + { + try + { + s.Close(); + } + catch { } + } } Unbind(); RemoveConnection(); -- cgit v1.2.3