From 2a25c5a2e3e37e734993d17b7462598babcb0b97 Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Mon, 13 Nov 2023 15:51:06 +0300 Subject: Refactored api call logic handling. --- .../Library/UserDataManager.cs | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'Emby.Server.Implementations/Library') diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index a0a90b129..0d67f2cda 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; +using System.Reflection; using System.Threading; using Jellyfin.Data.Entities; using MediaBrowser.Controller.Configuration; @@ -81,6 +82,42 @@ namespace Emby.Server.Implementations.Library }); } + public void SaveUserData(User user, BaseItem item, UserDataDto userDataDto, UserDataSaveReason reason) + { + ArgumentNullException.ThrowIfNull(user); + ArgumentNullException.ThrowIfNull(item); + ArgumentNullException.ThrowIfNull(reason); + ArgumentNullException.ThrowIfNull(userDataDto); + + var userData = GetUserData(user, item); + + var parentProperties = userDataDto.GetType().GetProperties(); + var childProperties = userData.GetType().GetProperties(); + + foreach (var parentProperty in parentProperties) + { + foreach (var childProperty in childProperties) + { + if (parentProperty.Name != childProperty.Name) + { + continue; + } + + var value = parentProperty.GetValue(userDataDto, null); + + if (value is null) + { + continue; + } + + childProperty.SetValue(userData, value, null); + break; + } + } + + SaveUserData(user, item, userData, reason, CancellationToken.None); + } + /// /// Save the provided user data for the given user. Batch operation. Does not fire any events or update the cache. /// -- cgit v1.2.3 From 07db2025a177bf5bed1cc898426a2442803ae151 Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Mon, 13 Nov 2023 17:32:24 +0300 Subject: Refactored the code to not use reflection. --- .../Library/UserDataManager.cs | 45 ++++++++++++++-------- MediaBrowser.Model/Dto/UserDataDto.cs | 3 -- 2 files changed, 28 insertions(+), 20 deletions(-) (limited to 'Emby.Server.Implementations/Library') diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 0d67f2cda..585fdd4f0 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -91,28 +91,39 @@ namespace Emby.Server.Implementations.Library var userData = GetUserData(user, item); - var parentProperties = userDataDto.GetType().GetProperties(); - var childProperties = userData.GetType().GetProperties(); + if (userDataDto.PlaybackPositionTicks.HasValue) + { + userData.PlaybackPositionTicks = userDataDto.PlaybackPositionTicks.Value; + } - foreach (var parentProperty in parentProperties) + if (userDataDto.PlayCount.HasValue) { - foreach (var childProperty in childProperties) - { - if (parentProperty.Name != childProperty.Name) - { - continue; - } + userData.PlayCount = userDataDto.PlayCount.Value; + } - var value = parentProperty.GetValue(userDataDto, null); + if (userDataDto.IsFavorite.HasValue) + { + userData.IsFavorite = userDataDto.IsFavorite.Value; + } - if (value is null) - { - continue; - } + if (userDataDto.Likes.HasValue) + { + userData.Likes = userDataDto.Likes.Value; + } - childProperty.SetValue(userData, value, null); - break; - } + if (userDataDto.Played.HasValue) + { + userData.Played = userDataDto.Played.Value; + } + + if (userDataDto.LastPlayedDate.HasValue) + { + userData.LastPlayedDate = userDataDto.LastPlayedDate.Value; + } + + if (userDataDto.Rating.HasValue) + { + userData.Rating = userDataDto.Rating.Value; } SaveUserData(user, item, userData, reason, CancellationToken.None); diff --git a/MediaBrowser.Model/Dto/UserDataDto.cs b/MediaBrowser.Model/Dto/UserDataDto.cs index 3012916f8..6d8c8969b 100644 --- a/MediaBrowser.Model/Dto/UserDataDto.cs +++ b/MediaBrowser.Model/Dto/UserDataDto.cs @@ -1,6 +1,3 @@ -#nullable disable -using System; - namespace MediaBrowser.Model.Dto { /// -- cgit v1.2.3 From c4013d2e10c2c526e21dd0229d60ab9e6c51d252 Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Wed, 15 Nov 2023 13:55:14 +0300 Subject: Updated the summary and the Dto name. --- .../Library/UserDataManager.cs | 3 +- Jellyfin.Api/Controllers/ItemsController.cs | 3 +- .../Library/IUserDataManager.cs | 2 +- MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs | 38 ++++++++++++++++++++ MediaBrowser.Model/Dto/UserDataDto.cs | 40 ---------------------- 5 files changed, 41 insertions(+), 45 deletions(-) create mode 100644 MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs delete mode 100644 MediaBrowser.Model/Dto/UserDataDto.cs (limited to 'Emby.Server.Implementations/Library') diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 585fdd4f0..8beeb8041 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -6,7 +6,6 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; -using System.Reflection; using System.Threading; using Jellyfin.Data.Entities; using MediaBrowser.Controller.Configuration; @@ -82,7 +81,7 @@ namespace Emby.Server.Implementations.Library }); } - public void SaveUserData(User user, BaseItem item, UserDataDto userDataDto, UserDataSaveReason reason) + public void SaveUserData(User user, BaseItem item, UpdateUserItemDataDto userDataDto, UserDataSaveReason reason) { ArgumentNullException.ThrowIfNull(user); ArgumentNullException.ThrowIfNull(item); diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs index dd54e6ca7..ae80d15e6 100644 --- a/Jellyfin.Api/Controllers/ItemsController.cs +++ b/Jellyfin.Api/Controllers/ItemsController.cs @@ -1,7 +1,6 @@ using System; using System.ComponentModel.DataAnnotations; using System.Linq; -using System.Threading; using Jellyfin.Api.Extensions; using Jellyfin.Api.Helpers; using Jellyfin.Api.ModelBinders; @@ -928,7 +927,7 @@ public class ItemsController : BaseJellyfinApiController public ActionResult UpdateItemUserData( [FromRoute, Required] Guid userId, [FromRoute, Required] Guid itemId, - [FromBody, Required] UserDataDto userDataDto) + [FromBody, Required] UpdateUserItemDataDto userDataDto) { if (!RequestHelpers.AssertCanUpdateUser(_userManager, User, userId, true)) { diff --git a/MediaBrowser.Controller/Library/IUserDataManager.cs b/MediaBrowser.Controller/Library/IUserDataManager.cs index 8849c098f..43cccfc65 100644 --- a/MediaBrowser.Controller/Library/IUserDataManager.cs +++ b/MediaBrowser.Controller/Library/IUserDataManager.cs @@ -42,7 +42,7 @@ namespace MediaBrowser.Controller.Library /// The item. /// The reason for updating the user data. /// The reason. - void SaveUserData(User user, BaseItem item, UserDataDto userDataDto, UserDataSaveReason reason); + void SaveUserData(User user, BaseItem item, UpdateUserItemDataDto userDataDto, UserDataSaveReason reason); UserItemData GetUserData(User user, BaseItem item); diff --git a/MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs b/MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs new file mode 100644 index 000000000..9ff09cb22 --- /dev/null +++ b/MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs @@ -0,0 +1,38 @@ +namespace MediaBrowser.Model.Dto +{ + /// + /// This is used by the api to get information about a item user data. + /// + public class UpdateUserItemDataDto : UserItemDataDto + { + /// + /// Gets or sets the playback position ticks. + /// + /// The playback position ticks. + public new long? PlaybackPositionTicks { get; set; } + + /// + /// Gets or sets the play count. + /// + /// The play count. + public new int? PlayCount { get; set; } + + /// + /// Gets or sets a value indicating whether this instance is favorite. + /// + /// true if this instance is favorite; otherwise, false. + public new bool? IsFavorite { get; set; } + + /// + /// Gets or sets a value indicating whether this is likes. + /// + /// null if [likes] contains no value, true if [likes]; otherwise, false. + public new bool? Likes { get; set; } + + /// + /// Gets or sets a value indicating whether this is played. + /// + /// true if played; otherwise, false. + public new bool? Played { get; set; } + } +} diff --git a/MediaBrowser.Model/Dto/UserDataDto.cs b/MediaBrowser.Model/Dto/UserDataDto.cs deleted file mode 100644 index 6d8c8969b..000000000 --- a/MediaBrowser.Model/Dto/UserDataDto.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace MediaBrowser.Model.Dto -{ - /// - /// Class UserDataDto extends UserItemDataDto to allow nullable members. - /// This change allow us to implement the new /Users/{UserId}/Items/{ItemId}/UserData endpoint. - /// This object allows the requestor to update all or specific user data fields without altering the non-nullable members state. - /// - public class UserDataDto : UserItemDataDto - { - /// - /// Gets or sets the playback position ticks. - /// - /// The playback position ticks. - public new long? PlaybackPositionTicks { get; set; } - - /// - /// Gets or sets the play count. - /// - /// The play count. - public new int? PlayCount { get; set; } - - /// - /// Gets or sets a value indicating whether this instance is favorite. - /// - /// true if this instance is favorite; otherwise, false. - public new bool? IsFavorite { get; set; } - - /// - /// Gets or sets a value indicating whether this is likes. - /// - /// null if [likes] contains no value, true if [likes]; otherwise, false. - public new bool? Likes { get; set; } - - /// - /// Gets or sets a value indicating whether this is played. - /// - /// true if played; otherwise, false. - public new bool? Played { get; set; } - } -} -- cgit v1.2.3 From 192559db32ef60b2a56b7acf689b6edc3cdc3487 Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Tue, 5 Dec 2023 14:26:35 -0500 Subject: Make ILiveStream an IDisposable --- .../Library/ExclusiveLiveStream.cs | 7 ++++++- .../LiveTv/TunerHosts/LiveStream.cs | 15 +++++++++++++++ MediaBrowser.Controller/Library/ILiveStream.cs | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-) (limited to 'Emby.Server.Implementations/Library') diff --git a/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs b/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs index 868071a99..b1649afad 100644 --- a/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs +++ b/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs @@ -12,7 +12,7 @@ using MediaBrowser.Model.Dto; namespace Emby.Server.Implementations.Library { - public class ExclusiveLiveStream : ILiveStream + public sealed class ExclusiveLiveStream : ILiveStream { private readonly Func _closeFn; @@ -51,5 +51,10 @@ namespace Emby.Server.Implementations.Library { return Task.CompletedTask; } + + /// + public void Dispose() + { + } } } diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs index c0ba8710f..c18594a29 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs @@ -112,6 +112,21 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts return stream; } + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool dispose) + { + if (dispose) + { + LiveStreamCancellationTokenSource?.Dispose(); + } + } + protected async Task DeleteTempFiles(string path, int retryCount = 0) { if (retryCount == 0) diff --git a/MediaBrowser.Controller/Library/ILiveStream.cs b/MediaBrowser.Controller/Library/ILiveStream.cs index 4c44a17fd..bf64aca0f 100644 --- a/MediaBrowser.Controller/Library/ILiveStream.cs +++ b/MediaBrowser.Controller/Library/ILiveStream.cs @@ -2,6 +2,7 @@ #pragma warning disable CA1711, CS1591 +using System; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -9,7 +10,7 @@ using MediaBrowser.Model.Dto; namespace MediaBrowser.Controller.Library { - public interface ILiveStream + public interface ILiveStream : IDisposable { int ConsumerCount { get; set; } -- cgit v1.2.3 From 033cfa59c499e5adbb949b708f06e56bf8932401 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Fri, 8 Dec 2023 15:45:36 -0700 Subject: Convert CollectionType to use lowercase enum names --- .../Images/CollectionFolderImageProvider.cs | 18 +++--- .../Images/DynamicImageProvider.cs | 8 +-- .../Library/LibraryManager.cs | 4 +- .../Library/Resolvers/Audio/AudioResolver.cs | 6 +- .../Library/Resolvers/Audio/MusicAlbumResolver.cs | 2 +- .../Library/Resolvers/Audio/MusicArtistResolver.cs | 2 +- .../Library/Resolvers/Books/BookResolver.cs | 2 +- .../Library/Resolvers/Movies/MovieResolver.cs | 34 +++++------ .../Library/Resolvers/PhotoAlbumResolver.cs | 4 +- .../Library/Resolvers/PhotoResolver.cs | 4 +- .../Library/Resolvers/PlaylistResolver.cs | 2 +- .../Library/Resolvers/TV/EpisodeResolver.cs | 2 +- .../Library/Resolvers/TV/SeriesResolver.cs | 4 +- .../Library/UserViewManager.cs | 22 +++---- .../LiveTv/LiveTvManager.cs | 2 +- .../Playlists/PlaylistsFolder.cs | 2 +- Jellyfin.Api/Controllers/GenresController.cs | 4 +- Jellyfin.Api/Controllers/ItemUpdateController.cs | 2 +- Jellyfin.Api/Controllers/ItemsController.cs | 2 +- Jellyfin.Api/Controllers/LibraryController.cs | 18 +++--- Jellyfin.Data/Enums/CollectionType.cs | 57 +++++++++--------- MediaBrowser.Controller/Entities/BaseItem.cs | 2 +- MediaBrowser.Controller/Entities/UserView.cs | 18 +++--- .../Entities/UserViewBuilder.cs | 68 +++++++++++----------- .../Library/AudioResolverTests.cs | 2 +- .../Library/EpisodeResolverTest.cs | 4 +- 26 files changed, 148 insertions(+), 147 deletions(-) (limited to 'Emby.Server.Implementations/Library') diff --git a/Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs b/Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs index 6e8f77977..34c722e41 100644 --- a/Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs +++ b/Emby.Server.Implementations/Images/CollectionFolderImageProvider.cs @@ -32,26 +32,26 @@ namespace Emby.Server.Implementations.Images switch (viewType) { - case CollectionType.Movies: + case CollectionType.movies: includeItemTypes = new[] { BaseItemKind.Movie }; break; - case CollectionType.TvShows: + case CollectionType.tvshows: includeItemTypes = new[] { BaseItemKind.Series }; break; - case CollectionType.Music: + case CollectionType.music: includeItemTypes = new[] { BaseItemKind.MusicAlbum }; break; - case CollectionType.MusicVideos: + case CollectionType.musicvideos: includeItemTypes = new[] { BaseItemKind.MusicVideo }; break; - case CollectionType.Books: + case CollectionType.books: includeItemTypes = new[] { BaseItemKind.Book, BaseItemKind.AudioBook }; break; - case CollectionType.BoxSets: + case CollectionType.boxsets: includeItemTypes = new[] { BaseItemKind.BoxSet }; break; - case CollectionType.HomeVideos: - case CollectionType.Photos: + case CollectionType.homevideos: + case CollectionType.photos: includeItemTypes = new[] { BaseItemKind.Video, BaseItemKind.Photo }; break; default: @@ -59,7 +59,7 @@ namespace Emby.Server.Implementations.Images break; } - var recursive = viewType != CollectionType.Playlists; + var recursive = viewType != CollectionType.playlists; return view.GetItemList(new InternalItemsQuery { diff --git a/Emby.Server.Implementations/Images/DynamicImageProvider.cs b/Emby.Server.Implementations/Images/DynamicImageProvider.cs index 5de53df73..6b2ae23b3 100644 --- a/Emby.Server.Implementations/Images/DynamicImageProvider.cs +++ b/Emby.Server.Implementations/Images/DynamicImageProvider.cs @@ -36,7 +36,7 @@ namespace Emby.Server.Implementations.Images var view = (UserView)item; var isUsingCollectionStrip = IsUsingCollectionStrip(view); - var recursive = isUsingCollectionStrip && view?.ViewType is not null && view.ViewType != CollectionType.BoxSets && view.ViewType != CollectionType.Playlists; + var recursive = isUsingCollectionStrip && view?.ViewType is not null && view.ViewType != CollectionType.boxsets && view.ViewType != CollectionType.playlists; var result = view.GetItemList(new InternalItemsQuery { @@ -114,9 +114,9 @@ namespace Emby.Server.Implementations.Images { CollectionType[] collectionStripViewTypes = { - CollectionType.Movies, - CollectionType.TvShows, - CollectionType.Playlists + CollectionType.movies, + CollectionType.tvshows, + CollectionType.playlists }; return view?.ViewType is not null && collectionStripViewTypes.Contains(view.ViewType.Value); diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index f40177fa7..a79ffd9cb 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -1514,7 +1514,7 @@ namespace Emby.Server.Implementations.Library { if (item is UserView view) { - if (view.ViewType == CollectionType.LiveTv) + if (view.ViewType == CollectionType.livetv) { return new[] { view.Id }; } @@ -1543,7 +1543,7 @@ namespace Emby.Server.Implementations.Library } // Handle grouping - if (user is not null && view.ViewType != CollectionType.Unknown && UserView.IsEligibleForGrouping(view.ViewType) + if (user is not null && view.ViewType != CollectionType.unknown && UserView.IsEligibleForGrouping(view.ViewType) && user.GetPreference(PreferenceKind.GroupedFolders).Length > 0) { return GetUserRootFolder() diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs index ac423ed09..dbf05c1db 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs @@ -61,7 +61,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio List files, CollectionType? collectionType) { - if (collectionType == CollectionType.Books) + if (collectionType == CollectionType.books) { return ResolveMultipleAudio(parent, files, true); } @@ -80,7 +80,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio var collectionType = args.GetCollectionType(); - var isBooksCollectionType = collectionType == CollectionType.Books; + var isBooksCollectionType = collectionType == CollectionType.books; if (args.IsDirectory) { @@ -112,7 +112,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio MediaBrowser.Controller.Entities.Audio.Audio item = null; - var isMusicCollectionType = collectionType == CollectionType.Music; + var isMusicCollectionType = collectionType == CollectionType.music; // Use regular audio type for mixed libraries, owned items and music if (isMixedCollectionType || diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs index 06e292f4c..0bfb7fbe6 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs @@ -55,7 +55,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio protected override MusicAlbum Resolve(ItemResolveArgs args) { var collectionType = args.GetCollectionType(); - var isMusicMediaFolder = collectionType == CollectionType.Music; + var isMusicMediaFolder = collectionType == CollectionType.music; // If there's a collection type and it's not music, don't allow it. if (!isMusicMediaFolder) diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs index 7d6f97b12..1bdae7f62 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs @@ -65,7 +65,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio var collectionType = args.GetCollectionType(); - var isMusicMediaFolder = collectionType == CollectionType.Music; + var isMusicMediaFolder = collectionType == CollectionType.music; // If there's a collection type and it's not music, it can't be a music artist if (!isMusicMediaFolder) diff --git a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs index b76bfe427..464a548ab 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs @@ -23,7 +23,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books var collectionType = args.GetCollectionType(); // Only process items that are in a collection folder containing books - if (collectionType != CollectionType.Books) + if (collectionType != CollectionType.books) { return null; } diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs index 50fd8b877..1a210e3cc 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs @@ -31,11 +31,11 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies private static readonly CollectionType[] _validCollectionTypes = new[] { - CollectionType.Movies, - CollectionType.HomeVideos, - CollectionType.MusicVideos, - CollectionType.TvShows, - CollectionType.Photos + CollectionType.movies, + CollectionType.homevideos, + CollectionType.musicvideos, + CollectionType.tvshows, + CollectionType.photos }; /// @@ -100,12 +100,12 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies Video movie = null; var files = args.GetActualFileSystemChildren().ToList(); - if (collectionType == CollectionType.MusicVideos) + if (collectionType == CollectionType.musicvideos) { movie = FindMovie(args, args.Path, args.Parent, files, DirectoryService, collectionType, false); } - if (collectionType == CollectionType.HomeVideos) + if (collectionType == CollectionType.homevideos) { movie = FindMovie