From 4ee8e53705c91737d6fc2add90237f58d4aa3971 Mon Sep 17 00:00:00 2001 From: cxfksword <718792+cxfksword@users.noreply.github.com> Date: Fri, 14 Jul 2023 14:15:30 +0800 Subject: [PATCH] build: repack to one dll assembly --- .../DoubanApiTest.cs | 9 - Jellyfin.Plugin.MetaShark.Test/ImdbApiTest.cs | 10 - .../ParseNameTest.cs | 2 +- Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs | 2 +- Jellyfin.Plugin.MetaShark/ILRepack.targets | 27 ++ .../Jellyfin.Plugin.MetaShark.csproj | 3 + .../Model/DoubanSubject.cs | 7 +- .../ComposableAsync.Core/AssemblyInfo.cs | 4 - .../Awaitable/DispatcherAwaiter.cs | 43 -- .../DispatcherDelegatingHandler.cs | 30 -- .../Dispatcher/ComposedDispatcher.cs | 73 --- .../Dispatcher/DispatcherAdapter.cs | 63 --- .../Dispatcher/NullDispatcher.cs | 74 --- .../DispatcherExtension.cs | 90 ---- .../DispatcherManager/IDispatcherManager.cs | 19 - .../MonoDispatcherManager.cs | 36 -- .../DispatcherProviderExtension.cs | 18 - .../Disposable/ComposableAsyncDisposable.cs | 48 -- .../Disposable/IAsyncDisposable.cs | 17 - .../ComposableAsync.Core/IBasicDispatcher.cs | 57 --- .../ComposableAsync.Core/IDispatcher.cs | 98 ---- .../IDispatcherProvider.cs | 13 - .../AwaitableConstraintExtension.cs | 22 - .../ComposedAwaitableConstraint.cs | 47 -- .../CountByIntervalAwaitableConstraint.cs | 120 ----- .../Vendor/RateLimiter/DisposeAction.cs | 20 - .../RateLimiter/IAwaitableConstraint.cs | 29 -- .../Vendor/RateLimiter/ITime.cs | 26 -- .../Vendor/RateLimiter/LimitedSizeStack.cs | 35 -- ...stentCountByIntervalAwaitableConstraint.cs | 42 -- .../Vendor/RateLimiter/TimeLimiter.cs | 206 -------- .../Vendor/RateLimiter/TimeSystem.cs | 30 -- .../Vendor/TMDbLib/.editorconfig | 4 - .../Vendor/TMDbLib/Client/TMDbClient.cs | 291 ------------ .../TMDbLib/Client/TMDbClientAccount.cs | 257 ---------- .../Client/TMDbClientAuthentication.cs | 87 ---- .../Client/TMDbClientCertifications.cs | 28 -- .../TMDbLib/Client/TMDbClientChanges.cs | 109 ----- .../TMDbLib/Client/TMDbClientCollections.cs | 77 --- .../TMDbLib/Client/TMDbClientCompanies.cs | 65 --- .../TMDbLib/Client/TMDbClientConfiguration.cs | 89 ---- .../Vendor/TMDbLib/Client/TMDbClientCredit.cs | 29 -- .../TMDbLib/Client/TMDbClientDiscover.cs | 46 -- .../Vendor/TMDbLib/Client/TMDbClientFind.cs | 56 --- .../Vendor/TMDbLib/Client/TMDbClientGenres.cs | 76 --- .../TMDbLib/Client/TMDbClientGuestSessions.cs | 85 ---- .../TMDbLib/Client/TMDbClientKeywords.cs | 43 -- .../Vendor/TMDbLib/Client/TMDbClientLists.cs | 210 --------- .../Vendor/TMDbLib/Client/TMDbClientMovies.cs | 392 ---------------- .../TMDbLib/Client/TMDbClientNetworks.cs | 57 --- .../Vendor/TMDbLib/Client/TMDbClientPeople.cs | 170 ------- .../TMDbLib/Client/TMDbClientReviews.cs | 23 - .../Vendor/TMDbLib/Client/TMDbClientSearch.cs | 112 ----- .../TMDbLib/Client/TMDbClientTrending.cs | 52 --- .../Client/TMDbClientTvEpisodeGroups.cs | 34 -- .../TMDbLib/Client/TMDbClientTvEpisodes.cs | 219 --------- .../TMDbLib/Client/TMDbClientTvSeasons.cs | 164 ------- .../TMDbLib/Client/TMDbClientTvShows.cs | 377 --------------- .../Client/TMDbClientWatchProviders.cs | 64 --- .../TMDbLib/Objects/Account/AccountDetails.cs | 34 -- .../TMDbLib/Objects/Account/AccountSortBy.cs | 11 - .../Vendor/TMDbLib/Objects/Account/Avatar.cs | 10 - .../TMDbLib/Objects/Account/Gravatar.cs | 10 - .../Objects/Authentication/GuestSession.cs | 28 -- .../GuestSessionRequiredException.cs | 13 - .../Objects/Authentication/SessionType.cs | 9 - .../TMDbLib/Objects/Authentication/Token.cs | 31 -- .../Objects/Authentication/UserSession.cs | 16 - .../UserSessionRequiredException.cs | 13 - .../Certifications/CertificationItem.cs | 9 - .../Certifications/CertificationsContainer.cs | 9 - .../Vendor/TMDbLib/Objects/Changes/Change.cs | 14 - .../TMDbLib/Objects/Changes/ChangeAction.cs | 27 -- .../Objects/Changes/ChangeItemAdded.cs | 15 - .../TMDbLib/Objects/Changes/ChangeItemBase.cs | 26 -- .../Objects/Changes/ChangeItemCreated.cs | 10 - .../Objects/Changes/ChangeItemDeleted.cs | 15 - .../Objects/Changes/ChangeItemDestroyed.cs | 15 - .../Objects/Changes/ChangeItemUpdated.cs | 18 - .../Objects/Changes/ChangesContainer.cs | 11 - .../Objects/Changes/ChangesListItem.cs | 15 - .../TMDbLib/Objects/Collections/Collection.cs | 31 -- .../Objects/Collections/CollectionMethods.cs | 14 - .../TMDbLib/Objects/Companies/Company.cs | 36 -- .../Objects/Companies/CompanyMethods.cs | 14 - .../Objects/Configuration/APIConfiguration.cs | 14 - .../Configuration/APIConfigurationImages.cs | 30 -- .../TMDbLib/Objects/Countries/Country.cs | 13 - .../Vendor/TMDbLib/Objects/Credit/Credit.cs | 29 -- .../TMDbLib/Objects/Credit/CreditEpisode.cs | 26 -- .../TMDbLib/Objects/Credit/CreditMedia.cs | 26 -- .../TMDbLib/Objects/Credit/CreditPerson.cs | 13 - .../TMDbLib/Objects/Credit/CreditSeason.cs | 17 - .../TMDbLib/Objects/Discover/DiscoverBase.cs | 32 -- .../TMDbLib/Objects/Discover/DiscoverMovie.cs | 441 ------------------ .../Objects/Discover/DiscoverMovieSortBy.cs | 37 -- .../TMDbLib/Objects/Discover/DiscoverTv.cs | 259 ---------- .../Objects/Discover/DiscoverTvShowSortBy.cs | 21 - .../Objects/Exceptions/APIException.cs | 12 - .../Exceptions/GeneralHttpException.cs | 15 - .../Objects/Exceptions/NotFoundException.cs | 10 - .../RequestLimitExceededException.cs | 18 - .../Objects/Exceptions/TMDbException.cs | 12 - .../Objects/Exceptions/TMDbStatusMessage.cs | 13 - .../TMDbLib/Objects/Find/FindContainer.cs | 24 - .../Objects/Find/FindExternalSource.cs | 13 - .../Vendor/TMDbLib/Objects/Find/FindPerson.cs | 15 - .../TMDbLib/Objects/Find/FindTvSeason.cs | 32 -- .../TMDbLib/Objects/General/AccountState.cs | 28 -- .../Objects/General/AlternativeName.cs | 13 - .../Objects/General/AlternativeNames.cs | 14 - .../Objects/General/AlternativeTitle.cs | 22 - .../Objects/General/ConfigImageTypes.cs | 29 -- .../TMDbLib/Objects/General/CreditType.cs | 15 - .../Vendor/TMDbLib/Objects/General/Crew.cs | 14 - .../TMDbLib/Objects/General/CrewAggregate.cs | 15 - .../TMDbLib/Objects/General/CrewBase.cs | 35 -- .../Vendor/TMDbLib/Objects/General/CrewJob.cs | 16 - .../TMDbLib/Objects/General/DateRange.cs | 14 - .../TMDbLib/Objects/General/ExternalIds.cs | 19 - .../Objects/General/ExternalIdsMovie.cs | 19 - .../Objects/General/ExternalIdsPerson.cs | 19 - .../Objects/General/ExternalIdsTvEpisode.cs | 13 - .../Objects/General/ExternalIdsTvSeason.cs | 10 - .../Objects/General/ExternalIdsTvShow.cs | 22 - .../Vendor/TMDbLib/Objects/General/Genre.cs | 13 - .../TMDbLib/Objects/General/ImageData.cs | 31 -- .../Vendor/TMDbLib/Objects/General/Images.cs | 17 - .../TMDbLib/Objects/General/ImagesWithId.cs | 10 - .../Vendor/TMDbLib/Objects/General/Job.cs | 14 - .../Vendor/TMDbLib/Objects/General/Keyword.cs | 13 - .../TMDbLib/Objects/General/MediaType.cs | 24 - .../TMDbLib/Objects/General/PersonResult.cs | 27 -- .../TMDbLib/Objects/General/PostReply.cs | 13 - .../TMDbLib/Objects/General/PosterImages.cs | 14 - .../Objects/General/ProductionCompany.cs | 19 - .../Objects/General/ProductionCountry.cs | 12 - .../Objects/General/ResultContainer.cs | 14 - .../Objects/General/SearchContainer.cs | 20 - .../General/SearchContainerWithDates.cs | 10 - .../Objects/General/SearchContainerWithId.cs | 7 - .../Objects/General/SingleResultContainer.cs | 13 - .../TMDbLib/Objects/General/SortOrder.cs | 13 - .../TMDbLib/Objects/General/StillImages.cs | 14 - .../TMDbLib/Objects/General/TMDbConfig.cs | 14 - .../TMDbLib/Objects/General/Translation.cs | 25 - .../Objects/General/TranslationData.cs | 30 -- .../Objects/General/TranslationsContainer.cs | 14 - .../General/TranslationsContainerTv.cs | 14 - .../Vendor/TMDbLib/Objects/General/Video.cs | 37 -- .../Objects/General/WatchProviderItem.cs | 19 - .../Objects/General/WatchProviderRegion.cs | 19 - .../TMDbLib/Objects/General/WatchProviders.cs | 26 -- .../TMDbLib/Objects/Genres/GenreContainer.cs | 12 - .../TMDbLib/Objects/Languages/Language.cs | 16 - .../TMDbLib/Objects/Lists/AccountList.cs | 11 - .../TMDbLib/Objects/Lists/GenericList.cs | 15 - .../TMDbLib/Objects/Lists/ListCreateReply.cs | 19 - .../TMDbLib/Objects/Lists/ListStatus.cs | 13 - .../Vendor/TMDbLib/Objects/Lists/TMDbList.cs | 31 -- .../Objects/Movies/AlternativeTitles.cs | 15 - .../Vendor/TMDbLib/Objects/Movies/Cast.cs | 44 -- .../Vendor/TMDbLib/Objects/Movies/Country.cs | 23 - .../Vendor/TMDbLib/Objects/Movies/Credits.cs | 18 - .../Objects/Movies/KeywordsContainer.cs | 15 - .../TMDbLib/Objects/Movies/ListResult.cs | 35 -- .../Vendor/TMDbLib/Objects/Movies/Movie.cs | 136 ------ .../TMDbLib/Objects/Movies/MovieMethods.cs | 47 -- .../TMDbLib/Objects/Movies/ReleaseDateItem.cs | 28 -- .../TMDbLib/Objects/Movies/ReleaseDateType.cs | 12 - .../Objects/Movies/ReleaseDatesContainer.cs | 17 - .../Vendor/TMDbLib/Objects/Movies/Releases.cs | 14 - .../TMDbLib/Objects/Movies/SpokenLanguage.cs | 12 - .../TMDbLib/Objects/People/MovieCredits.cs | 17 - .../Vendor/TMDbLib/Objects/People/MovieJob.cs | 35 -- .../TMDbLib/Objects/People/MovieRole.cs | 32 -- .../Vendor/TMDbLib/Objects/People/Person.cs | 74 --- .../TMDbLib/Objects/People/PersonGender.cs | 13 - .../TMDbLib/Objects/People/PersonListType.cs | 7 - .../TMDbLib/Objects/People/PersonMethods.cs | 24 - .../TMDbLib/Objects/People/ProfileImages.cs | 15 - .../TMDbLib/Objects/People/TaggedImage.cs | 45 -- .../TMDbLib/Objects/People/TvCredits.cs | 17 - .../Vendor/TMDbLib/Objects/People/TvJob.cs | 35 -- .../Vendor/TMDbLib/Objects/People/TvRole.cs | 32 -- .../TMDbLib/Objects/Reviews/AuthorDetails.cs | 19 - .../Vendor/TMDbLib/Objects/Reviews/Review.cs | 23 - .../TMDbLib/Objects/Reviews/ReviewBase.cs | 23 - .../TMDbLib/Objects/Search/AccountSearchTv.cs | 10 - .../Objects/Search/AccountSearchTvEpisode.cs | 10 - .../TMDbLib/Objects/Search/KnownForBase.cs | 41 -- .../TMDbLib/Objects/Search/KnownForMovie.cs | 29 -- .../TMDbLib/Objects/Search/KnownForTv.cs | 27 -- .../TMDbLib/Objects/Search/SearchBase.cs | 17 - .../Objects/Search/SearchCollection.cs | 19 - .../TMDbLib/Objects/Search/SearchCompany.cs | 16 - .../TMDbLib/Objects/Search/SearchKeyword.cs | 13 - .../TMDbLib/Objects/Search/SearchList.cs | 34 -- .../TMDbLib/Objects/Search/SearchMovie.cs | 29 -- .../Objects/Search/SearchMovieTvBase.cs | 31 -- .../Objects/Search/SearchMovieWithRating.cs | 7 - .../TMDbLib/Objects/Search/SearchPerson.cs | 26 -- .../Vendor/TMDbLib/Objects/Search/SearchTv.cs | 30 -- .../TMDbLib/Objects/Search/SearchTvEpisode.cs | 44 -- .../TMDbLib/Objects/Search/SearchTvSeason.cs | 29 -- .../Objects/Search/SearchTvShowWithRating.cs | 10 - .../TMDbLib/Objects/Search/TvSeasonEpisode.cs | 47 -- .../TMDbLib/Objects/Timezones/Timezones.cs | 11 - .../TMDbLib/Objects/Trending/TimeWindow.cs | 12 - .../Vendor/TMDbLib/Objects/TvShows/Cast.cs | 14 - .../TMDbLib/Objects/TvShows/CastAggregate.cs | 15 - .../TMDbLib/Objects/TvShows/CastBase.cs | 35 -- .../TMDbLib/Objects/TvShows/CastRole.cs | 17 - .../TMDbLib/Objects/TvShows/ContentRating.cs | 12 - .../TMDbLib/Objects/TvShows/CreatedBy.cs | 23 - .../Vendor/TMDbLib/Objects/TvShows/Credits.cs | 18 - .../Objects/TvShows/CreditsAggregate.cs | 18 - .../Objects/TvShows/CreditsWithGuestStars.cs | 11 - .../Vendor/TMDbLib/Objects/TvShows/Network.cs | 13 - .../TMDbLib/Objects/TvShows/NetworkBase.cs | 16 - .../TMDbLib/Objects/TvShows/NetworkLogos.cs | 15 - .../Objects/TvShows/NetworkWithLogo.cs | 10 - .../TMDbLib/Objects/TvShows/TvAccountState.cs | 10 - .../TMDbLib/Objects/TvShows/TvEpisode.cs | 30 -- .../Objects/TvShows/TvEpisodeAccountState.cs | 13 - .../TvEpisodeAccountStateWithNumber.cs | 10 - .../TMDbLib/Objects/TvShows/TvEpisodeBase.cs | 32 -- .../TMDbLib/Objects/TvShows/TvEpisodeInfo.cs | 16 - .../Objects/TvShows/TvEpisodeMethods.cs | 22 - .../Objects/TvShows/TvEpisodeWithRating.cs | 7 - .../Vendor/TMDbLib/Objects/TvShows/TvGroup.cs | 23 - .../Objects/TvShows/TvGroupCollection.cs | 32 -- .../TMDbLib/Objects/TvShows/TvGroupEpisode.cs | 10 - .../TMDbLib/Objects/TvShows/TvGroupType.cs | 13 - .../TMDbLib/Objects/TvShows/TvSeason.cs | 50 -- .../Objects/TvShows/TvSeasonMethods.cs | 22 - .../Vendor/TMDbLib/Objects/TvShows/TvShow.cs | 168 ------- .../TMDbLib/Objects/TvShows/TvShowListType.cs | 16 - .../TMDbLib/Objects/TvShows/TvShowMethods.cs | 44 -- .../Vendor/TMDbLib/Properties/AssemblyInfo.cs | 3 - .../Vendor/TMDbLib/Rest/ParameterType.cs | 8 - .../Vendor/TMDbLib/Rest/RestClient.cs | 72 --- .../Vendor/TMDbLib/Rest/RestRequest.cs | 254 ---------- .../TMDbLib/Rest/RestRequestExtensions.cs | 38 -- .../Vendor/TMDbLib/Rest/RestResponse.cs | 59 --- .../Vendor/TMDbLib/TMDbLib.csproj | 33 -- .../Converters/AccountStateConverter.cs | 74 --- .../Converters/ChangeItemConverter.cs | 66 --- .../CustomDatetimeFormatConverter.cs | 29 -- .../Converters/EnumStringValueConverter.cs | 28 -- .../Converters/JsonCreationConverter.cs | 30 -- .../Utilities/Converters/KnownForConverter.cs | 30 -- .../Converters/SearchBaseConverter.cs | 64 --- .../Converters/TaggedImageConverter.cs | 52 --- .../TmdbIntArrayAsObjectConverter.cs | 48 -- .../Utilities/Converters/TmdbNullIntAsZero.cs | 26 -- .../Converters/TmdbPartialDateConverter.cs | 33 -- .../Converters/TmdbUtcTimeConverter.cs | 21 - .../Converters/TolerantEnumConverter.cs | 67 --- .../TMDbLib/Utilities/EnumExtensions.cs | 51 -- .../TMDbLib/Utilities/EnumMemberCache.cs | 97 ---- .../TMDbLib/Utilities/EnumValueAttribute.cs | 15 - .../Utilities/Serializer/ITMDbSerializer.cs | 11 - .../Serializer/SerializerExtensions.cs | 59 --- .../Serializer/TMDbJsonSerializer.cs | 43 -- .../Utilities/SimpleNamedValueCollection.cs | 56 --- .../Vendor/TMDbLib/Utilities/TMDbAPIProxy.cs | 49 -- 267 files changed, 34 insertions(+), 10478 deletions(-) create mode 100644 Jellyfin.Plugin.MetaShark/ILRepack.targets delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/AssemblyInfo.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Awaitable/DispatcherAwaiter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DelegatingHandler/DispatcherDelegatingHandler.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/ComposedDispatcher.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/DispatcherAdapter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/NullDispatcher.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherExtension.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherManager/IDispatcherManager.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherManager/MonoDispatcherManager.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherProviderExtension.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Disposable/ComposableAsyncDisposable.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Disposable/IAsyncDisposable.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IBasicDispatcher.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IDispatcher.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IDispatcherProvider.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/AwaitableConstraintExtension.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/ComposedAwaitableConstraint.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/CountByIntervalAwaitableConstraint.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/DisposeAction.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/IAwaitableConstraint.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/ITime.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/LimitedSizeStack.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/PersistentCountByIntervalAwaitableConstraint.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/TimeLimiter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/TimeSystem.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/.editorconfig delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClient.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientAccount.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientAuthentication.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCertifications.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientChanges.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCollections.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCompanies.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientConfiguration.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCredit.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientDiscover.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientFind.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientGenres.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientGuestSessions.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientKeywords.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientLists.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientMovies.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientNetworks.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientPeople.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientReviews.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientSearch.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTrending.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvEpisodeGroups.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvEpisodes.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvSeasons.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvShows.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientWatchProviders.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/AccountDetails.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/AccountSortBy.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/Avatar.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/Gravatar.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/GuestSession.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/GuestSessionRequiredException.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/SessionType.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/Token.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/UserSession.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/UserSessionRequiredException.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Certifications/CertificationItem.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Certifications/CertificationsContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/Change.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeAction.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemAdded.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemCreated.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemDeleted.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemDestroyed.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemUpdated.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangesContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangesListItem.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Collections/Collection.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Collections/CollectionMethods.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Companies/Company.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Companies/CompanyMethods.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Configuration/APIConfiguration.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Configuration/APIConfigurationImages.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Countries/Country.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/Credit.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditEpisode.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditMedia.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditPerson.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditSeason.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverMovie.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverMovieSortBy.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverTv.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverTvShowSortBy.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/APIException.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/GeneralHttpException.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/NotFoundException.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/RequestLimitExceededException.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/TMDbException.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/TMDbStatusMessage.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindExternalSource.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindPerson.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindTvSeason.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AccountState.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeName.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeNames.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeTitle.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ConfigImageTypes.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CreditType.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Crew.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewAggregate.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewJob.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/DateRange.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIds.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsMovie.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsPerson.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvEpisode.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvSeason.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvShow.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Genre.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ImageData.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Images.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ImagesWithId.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Job.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Keyword.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/MediaType.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PersonResult.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PostReply.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PosterImages.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ProductionCompany.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ProductionCountry.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ResultContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainerWithDates.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainerWithId.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SingleResultContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SortOrder.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/StillImages.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TMDbConfig.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Translation.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationData.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationsContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationsContainerTv.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Video.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviderItem.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviderRegion.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviders.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Genres/GenreContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Languages/Language.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/AccountList.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/GenericList.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/ListCreateReply.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/ListStatus.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/TMDbList.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/AlternativeTitles.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Cast.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Country.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Credits.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/KeywordsContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/ListResult.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Movie.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/MovieMethods.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/ReleaseDateItem.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/ReleaseDateType.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/ReleaseDatesContainer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Releases.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/SpokenLanguage.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/MovieCredits.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/MovieJob.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/MovieRole.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/Person.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/PersonGender.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/PersonListType.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/PersonMethods.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/ProfileImages.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/TaggedImage.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/TvCredits.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/TvJob.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/People/TvRole.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Reviews/AuthorDetails.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Reviews/Review.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Reviews/ReviewBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/AccountSearchTv.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/AccountSearchTvEpisode.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/KnownForBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/KnownForMovie.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/KnownForTv.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchCollection.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchCompany.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchKeyword.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchList.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchMovie.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchMovieTvBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchMovieWithRating.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchPerson.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchTv.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchTvEpisode.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchTvSeason.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/SearchTvShowWithRating.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Search/TvSeasonEpisode.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Timezones/Timezones.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Trending/TimeWindow.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/Cast.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/CastAggregate.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/CastBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/CastRole.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/ContentRating.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/CreatedBy.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/Credits.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/CreditsAggregate.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/CreditsWithGuestStars.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/Network.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/NetworkBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/NetworkLogos.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/NetworkWithLogo.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvAccountState.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvEpisode.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvEpisodeAccountState.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvEpisodeAccountStateWithNumber.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvEpisodeBase.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvEpisodeInfo.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvEpisodeMethods.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvEpisodeWithRating.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvGroup.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvGroupCollection.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvGroupEpisode.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvGroupType.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvSeason.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvSeasonMethods.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvShow.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvShowListType.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/TvShows/TvShowMethods.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Properties/AssemblyInfo.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Rest/ParameterType.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Rest/RestClient.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Rest/RestRequest.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Rest/RestRequestExtensions.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Rest/RestResponse.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/TMDbLib.csproj delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/AccountStateConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/ChangeItemConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/CustomDatetimeFormatConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/EnumStringValueConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/JsonCreationConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/KnownForConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/SearchBaseConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/TaggedImageConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/TmdbIntArrayAsObjectConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/TmdbNullIntAsZero.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/TmdbPartialDateConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/TmdbUtcTimeConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Converters/TolerantEnumConverter.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/EnumExtensions.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/EnumMemberCache.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/EnumValueAttribute.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Serializer/ITMDbSerializer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Serializer/SerializerExtensions.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/Serializer/TMDbJsonSerializer.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/SimpleNamedValueCollection.cs delete mode 100644 Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Utilities/TMDbAPIProxy.cs diff --git a/Jellyfin.Plugin.MetaShark.Test/DoubanApiTest.cs b/Jellyfin.Plugin.MetaShark.Test/DoubanApiTest.cs index c7bdd0f..1db6c1f 100644 --- a/Jellyfin.Plugin.MetaShark.Test/DoubanApiTest.cs +++ b/Jellyfin.Plugin.MetaShark.Test/DoubanApiTest.cs @@ -1,15 +1,6 @@ -using System.Reflection; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Jellyfin.Plugin.MetaShark.Api; using Jellyfin.Plugin.MetaShark.Core; -using Jellyfin.Plugin.MetaShark.Model; -using Jellyfin.Plugin.MetaShark.Providers; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; namespace Jellyfin.Plugin.MetaShark.Test { diff --git a/Jellyfin.Plugin.MetaShark.Test/ImdbApiTest.cs b/Jellyfin.Plugin.MetaShark.Test/ImdbApiTest.cs index e1ca810..dc57587 100644 --- a/Jellyfin.Plugin.MetaShark.Test/ImdbApiTest.cs +++ b/Jellyfin.Plugin.MetaShark.Test/ImdbApiTest.cs @@ -1,15 +1,5 @@ -using System.Reflection; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Jellyfin.Plugin.MetaShark.Api; -using Jellyfin.Plugin.MetaShark.Core; -using Jellyfin.Plugin.MetaShark.Model; -using Jellyfin.Plugin.MetaShark.Providers; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; namespace Jellyfin.Plugin.MetaShark.Test { diff --git a/Jellyfin.Plugin.MetaShark.Test/ParseNameTest.cs b/Jellyfin.Plugin.MetaShark.Test/ParseNameTest.cs index edc2104..b8ce6d7 100644 --- a/Jellyfin.Plugin.MetaShark.Test/ParseNameTest.cs +++ b/Jellyfin.Plugin.MetaShark.Test/ParseNameTest.cs @@ -8,7 +8,7 @@ using Jellyfin.Plugin.MetaShark.Core; using Jellyfin.Plugin.MetaShark.Model; using Jellyfin.Plugin.MetaShark.Providers; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; + namespace Jellyfin.Plugin.MetaShark.Test { diff --git a/Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs b/Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs index ce9e3ec..23ee214 100644 --- a/Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs +++ b/Jellyfin.Plugin.MetaShark/Api/TmdbApi.cs @@ -40,7 +40,7 @@ namespace Jellyfin.Plugin.MetaShark.Api var apiKey = string.IsNullOrEmpty(config?.TmdbApiKey) ? DEFAULT_API_KEY : config.TmdbApiKey; var host = string.IsNullOrEmpty(config?.TmdbHost) ? DEFAULT_API_HOST : config.TmdbHost; _tmDbClient = new TMDbClient(apiKey, true, host); - _tmDbClient.RequestTimeout = TimeSpan.FromSeconds(10); + _tmDbClient.Timeout = TimeSpan.FromSeconds(10); // Not really interested in NotFoundException _tmDbClient.ThrowApiExceptions = false; } diff --git a/Jellyfin.Plugin.MetaShark/ILRepack.targets b/Jellyfin.Plugin.MetaShark/ILRepack.targets new file mode 100644 index 0000000..c75f037 --- /dev/null +++ b/Jellyfin.Plugin.MetaShark/ILRepack.targets @@ -0,0 +1,27 @@ + + + + + false + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj b/Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj index 2226069..bd01029 100644 --- a/Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj +++ b/Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj @@ -15,9 +15,12 @@ + + + diff --git a/Jellyfin.Plugin.MetaShark/Model/DoubanSubject.cs b/Jellyfin.Plugin.MetaShark/Model/DoubanSubject.cs index 4dcd997..3fa2318 100644 --- a/Jellyfin.Plugin.MetaShark/Model/DoubanSubject.cs +++ b/Jellyfin.Plugin.MetaShark/Model/DoubanSubject.cs @@ -1,11 +1,8 @@ -using MediaBrowser.Model.Entities; -using Newtonsoft.Json; -using System; +using System; using System.Collections.Generic; using System.Data; using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Text.Json.Serialization; namespace Jellyfin.Plugin.MetaShark.Model { diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/AssemblyInfo.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/AssemblyInfo.cs deleted file mode 100644 index 1563afa..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/AssemblyInfo.cs +++ /dev/null @@ -1,4 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("ComposableAsync.Core.Test")] - diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Awaitable/DispatcherAwaiter.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Awaitable/DispatcherAwaiter.cs deleted file mode 100644 index 061840a..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Awaitable/DispatcherAwaiter.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Runtime.CompilerServices; -using System.Security; - -namespace ComposableAsync -{ - /// - /// Dispatcher awaiter, making a dispatcher awaitable - /// - public struct DispatcherAwaiter : INotifyCompletion - { - /// - /// Dispatcher never is synchronous - /// - public bool IsCompleted => false; - - private readonly IDispatcher _Dispatcher; - - /// - /// Construct a NotifyCompletion fom a dispatcher - /// - /// - public DispatcherAwaiter(IDispatcher dispatcher) - { - _Dispatcher = dispatcher; - } - - /// - /// Dispatch on complete - /// - /// - [SecuritySafeCritical] - public void OnCompleted(Action continuation) - { - _Dispatcher.Dispatch(continuation); - } - - /// - /// No Result - /// - public void GetResult() { } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DelegatingHandler/DispatcherDelegatingHandler.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DelegatingHandler/DispatcherDelegatingHandler.cs deleted file mode 100644 index dbd8b49..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DelegatingHandler/DispatcherDelegatingHandler.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; - -namespace ComposableAsync -{ - /// - /// A implementation based on - /// - internal class DispatcherDelegatingHandler : DelegatingHandler - { - private readonly IDispatcher _Dispatcher; - - /// - /// Build an from a - /// - /// - public DispatcherDelegatingHandler(IDispatcher dispatcher) - { - _Dispatcher = dispatcher; - InnerHandler = new HttpClientHandler(); - } - - protected override Task SendAsync(HttpRequestMessage request, - CancellationToken cancellationToken) - { - return _Dispatcher.Enqueue(() => base.SendAsync(request, cancellationToken), cancellationToken); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/ComposedDispatcher.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/ComposedDispatcher.cs deleted file mode 100644 index aed2434..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/ComposedDispatcher.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace ComposableAsync -{ - internal class ComposedDispatcher : IDispatcher, IAsyncDisposable - { - private readonly IDispatcher _First; - private readonly IDispatcher _Second; - - public ComposedDispatcher(IDispatcher first, IDispatcher second) - { - _First = first; - _Second = second; - } - - public void Dispatch(Action action) - { - _First.Dispatch(() => _Second.Dispatch(action)); - } - - public async Task Enqueue(Action action) - { - await _First.Enqueue(() => _Second.Enqueue(action)); - } - - public async Task Enqueue(Func action) - { - return await _First.Enqueue(() => _Second.Enqueue(action)); - } - - public async Task Enqueue(Func action) - { - await _First.Enqueue(() => _Second.Enqueue(action)); - } - - public async Task Enqueue(Func> action) - { - return await _First.Enqueue(() => _Second.Enqueue(action)); - } - - public async Task Enqueue(Func action, CancellationToken cancellationToken) - { - await _First.Enqueue(() => _Second.Enqueue(action, cancellationToken), cancellationToken); - } - - public async Task Enqueue(Func> action, CancellationToken cancellationToken) - { - return await _First.Enqueue(() => _Second.Enqueue(action, cancellationToken), cancellationToken); - } - - public async Task Enqueue(Func action, CancellationToken cancellationToken) - { - return await _First.Enqueue(() => _Second.Enqueue(action, cancellationToken), cancellationToken); - } - - public async Task Enqueue(Action action, CancellationToken cancellationToken) - { - await _First.Enqueue(() => _Second.Enqueue(action, cancellationToken), cancellationToken); - } - - public IDispatcher Clone() => new ComposedDispatcher(_First, _Second); - - public Task DisposeAsync() - { - return Task.WhenAll(DisposeAsync(_First), DisposeAsync(_Second)); - } - - private static Task DisposeAsync(IDispatcher disposable) => (disposable as IAsyncDisposable)?.DisposeAsync() ?? Task.CompletedTask; - - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/DispatcherAdapter.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/DispatcherAdapter.cs deleted file mode 100644 index d6532ad..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/DispatcherAdapter.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace ComposableAsync -{ - internal class DispatcherAdapter : IDispatcher - { - private readonly IBasicDispatcher _BasicDispatcher; - - public DispatcherAdapter(IBasicDispatcher basicDispatcher) - { - _BasicDispatcher = basicDispatcher; - } - - public IDispatcher Clone() => new DispatcherAdapter(_BasicDispatcher.Clone()); - - public void Dispatch(Action action) - { - _BasicDispatcher.Enqueue(action, CancellationToken.None); - } - - public Task Enqueue(Action action) - { - return _BasicDispatcher.Enqueue(action, CancellationToken.None); - } - - public Task Enqueue(Func action) - { - return _BasicDispatcher.Enqueue(action, CancellationToken.None); - } - - public Task Enqueue(Func action) - { - return _BasicDispatcher.Enqueue(action, CancellationToken.None); - } - - public Task Enqueue(Func> action) - { - return _BasicDispatcher.Enqueue(action, CancellationToken.None); - } - - public Task Enqueue(Func action, CancellationToken cancellationToken) - { - return _BasicDispatcher.Enqueue(action, cancellationToken); - } - - public Task Enqueue(Action action, CancellationToken cancellationToken) - { - return _BasicDispatcher.Enqueue(action, cancellationToken); - } - - public Task Enqueue(Func action, CancellationToken cancellationToken) - { - return _BasicDispatcher.Enqueue(action, cancellationToken); - } - - public Task Enqueue(Func> action, CancellationToken cancellationToken) - { - return _BasicDispatcher.Enqueue(action, cancellationToken); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/NullDispatcher.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/NullDispatcher.cs deleted file mode 100644 index 4882f9e..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Dispatcher/NullDispatcher.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace ComposableAsync -{ - /// - /// that run actions synchronously - /// - public sealed class NullDispatcher: IDispatcher - { - private NullDispatcher() { } - - /// - /// Returns a static null dispatcher - /// - public static IDispatcher Instance { get; } = new NullDispatcher(); - - /// - public void Dispatch(Action action) - { - action(); - } - - /// - public Task Enqueue(Action action) - { - action(); - return Task.CompletedTask; - } - - /// - public Task Enqueue(Func action) - { - return Task.FromResult(action()); - } - - /// - public async Task Enqueue(Func action) - { - await action(); - } - - /// - public async Task Enqueue(Func> action) - { - return await action(); - } - - public Task Enqueue(Func action, CancellationToken cancellationToken) - { - return Task.FromResult(action()); - } - - public Task Enqueue(Action action, CancellationToken cancellationToken) - { - action(); - return Task.CompletedTask; - } - - public async Task Enqueue(Func action, CancellationToken cancellationToken) - { - await action(); - } - - public async Task Enqueue(Func> action, CancellationToken cancellationToken) - { - return await action(); - } - - /// - public IDispatcher Clone() => Instance; - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherExtension.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherExtension.cs deleted file mode 100644 index ef29912..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherExtension.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; - -namespace ComposableAsync -{ - /// - /// extension methods provider - /// - public static class DispatcherExtension - { - /// - /// Returns awaitable to enter in the dispatcher context - /// This extension method make a dispatcher awaitable - /// - /// - /// - public static DispatcherAwaiter GetAwaiter(this IDispatcher dispatcher) - { - return new DispatcherAwaiter(dispatcher); - } - - /// - /// Returns a composed dispatcher applying the given dispatcher - /// after the first one - /// - /// - /// - /// - public static IDispatcher Then(this IDispatcher dispatcher, IDispatcher other) - { - if (dispatcher == null) - throw new ArgumentNullException(nameof(dispatcher)); - - if (other == null) - throw new ArgumentNullException(nameof(other)); - - return new ComposedDispatcher(dispatcher, other); - } - - /// - /// Returns a composed dispatcher applying the given dispatchers sequentially - /// - /// - /// - /// - public static IDispatcher Then(this IDispatcher dispatcher, params IDispatcher[] others) - { - return dispatcher.Then((IEnumerable)others); - } - - /// - /// Returns a composed dispatcher applying the given dispatchers sequentially - /// - /// - /// - /// - public static IDispatcher Then(this IDispatcher dispatcher, IEnumerable others) - { - if (dispatcher == null) - throw new ArgumentNullException(nameof(dispatcher)); - - if (others == null) - throw new ArgumentNullException(nameof(others)); - - return others.Aggregate(dispatcher, (cum, val) => cum.Then(val)); - } - - /// - /// Create a from an - /// - /// - /// - public static DelegatingHandler AsDelegatingHandler(this IDispatcher dispatcher) - { - return new DispatcherDelegatingHandler(dispatcher); - } - - /// - /// Create a from an - /// - /// - /// - public static IDispatcher ToFullDispatcher(this IBasicDispatcher @basicDispatcher) - { - return new DispatcherAdapter(@basicDispatcher); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherManager/IDispatcherManager.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherManager/IDispatcherManager.cs deleted file mode 100644 index 66c52d5..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherManager/IDispatcherManager.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace ComposableAsync -{ - /// - /// Dispatcher manager - /// - public interface IDispatcherManager : IAsyncDisposable - { - /// - /// true if the Dispatcher should be released - /// - bool DisposeDispatcher { get; } - - /// - /// Returns a consumable Dispatcher - /// - /// - IDispatcher GetDispatcher(); - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherManager/MonoDispatcherManager.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherManager/MonoDispatcherManager.cs deleted file mode 100644 index f26ef5c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherManager/MonoDispatcherManager.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Threading.Tasks; - -namespace ComposableAsync -{ - /// - /// implementation based on single - /// - public sealed class MonoDispatcherManager : IDispatcherManager - { - /// - public bool DisposeDispatcher { get; } - - /// - public IDispatcher GetDispatcher() => _Dispatcher; - - private readonly IDispatcher _Dispatcher; - - /// - /// Create - /// - /// - /// - public MonoDispatcherManager(IDispatcher dispatcher, bool shouldDispose = false) - { - _Dispatcher = dispatcher; - DisposeDispatcher = shouldDispose; - } - - /// - public Task DisposeAsync() - { - return DisposeDispatcher && (_Dispatcher is IAsyncDisposable disposable) ? - disposable.DisposeAsync() : Task.CompletedTask; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherProviderExtension.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherProviderExtension.cs deleted file mode 100644 index f7046a1..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/DispatcherProviderExtension.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace ComposableAsync -{ - /// - /// extension - /// - public static class DispatcherProviderExtension - { - /// - /// Returns the underlying - /// - /// - /// - public static IDispatcher GetAssociatedDispatcher(this IDispatcherProvider dispatcherProvider) - { - return dispatcherProvider?.Dispatcher ?? NullDispatcher.Instance; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Disposable/ComposableAsyncDisposable.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Disposable/ComposableAsyncDisposable.cs deleted file mode 100644 index 541d906..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Disposable/ComposableAsyncDisposable.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Collections.Concurrent; -using System.Linq; -using System.Threading.Tasks; - -namespace ComposableAsync -{ - /// - /// implementation aggregating other - /// - public sealed class ComposableAsyncDisposable : IAsyncDisposable - { - private readonly ConcurrentQueue _Disposables; - - /// - /// Build an empty ComposableAsyncDisposable - /// - public ComposableAsyncDisposable() - { - _Disposables = new ConcurrentQueue(); - } - - /// - /// Add an to the ComposableAsyncDisposable - /// and returns it - /// - /// - /// - /// - public T Add(T disposable) where T: IAsyncDisposable - { - if (disposable == null) - return default(T); - - _Disposables.Enqueue(disposable); - return disposable; - } - - /// - /// Dispose all the resources asynchronously - /// - /// - public Task DisposeAsync() - { - var tasks = _Disposables.ToArray().Select(disposable => disposable.DisposeAsync()).ToArray(); - return Task.WhenAll(tasks); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Disposable/IAsyncDisposable.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Disposable/IAsyncDisposable.cs deleted file mode 100644 index 3517491..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/Disposable/IAsyncDisposable.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Threading.Tasks; - -namespace ComposableAsync -{ - /// - /// Asynchronous version of IDisposable - /// For reference see discussion: https://github.com/dotnet/roslyn/issues/114 - /// - public interface IAsyncDisposable - { - /// - /// Performs asynchronously application-defined tasks associated with freeing, - /// releasing, or resetting unmanaged resources. - /// - Task DisposeAsync(); - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IBasicDispatcher.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IBasicDispatcher.cs deleted file mode 100644 index 6e054dd..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IBasicDispatcher.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace ComposableAsync -{ - /// - /// Simplified version of that can be converted - /// to a using the ToFullDispatcher extension method - /// - public interface IBasicDispatcher - { - /// - /// Clone dispatcher - /// - /// - IBasicDispatcher Clone(); - - /// - /// Enqueue the function and return a task corresponding - /// to the execution of the task - /// /// - /// - /// - /// - /// - Task Enqueue(Func action, CancellationToken cancellationToken); - - /// - /// Enqueue the action and return a task corresponding - /// to the execution of the task - /// - /// - /// - /// - Task Enqueue(Action action, CancellationToken cancellationToken); - - /// - /// Enqueue the task and return a task corresponding - /// to the execution of the task - /// - /// - /// - /// - Task Enqueue(Func action, CancellationToken cancellationToken); - - /// - /// Enqueue the task and return a task corresponding - /// to the execution of the original task - /// - /// - /// - /// - /// - Task Enqueue(Func> action, CancellationToken cancellationToken); - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IDispatcher.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IDispatcher.cs deleted file mode 100644 index d7eb14f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IDispatcher.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace ComposableAsync -{ - /// - /// Dispatcher executes an action or a function - /// on its own context - /// - public interface IDispatcher - { - /// - /// Execute action on dispatcher context in a - /// none-blocking way - /// - /// - void Dispatch(Action action); - - /// - /// Enqueue the action and return a task corresponding to - /// the completion of the action - /// - /// - /// - Task Enqueue(Action action); - - /// - /// Enqueue the function and return a task corresponding to - /// the result of the function - /// - /// - /// - /// - Task Enqueue(Func action); - - /// - /// Enqueue the task and return a task corresponding to - /// the completion of the task - /// - /// - /// - Task Enqueue(Func action); - - /// - /// Enqueue the task and return a task corresponding - /// to the execution of the original task - /// - /// - /// - /// - Task Enqueue(Func> action); - - /// - /// Enqueue the function and return a task corresponding - /// to the execution of the task - /// /// - /// - /// - /// - /// - Task Enqueue(Func action, CancellationToken cancellationToken); - - /// - /// Enqueue the action and return a task corresponding - /// to the execution of the task - /// - /// - /// - /// - Task Enqueue(Action action, CancellationToken cancellationToken); - - /// - /// Enqueue the task and return a task corresponding - /// to the execution of the task - /// - /// - /// - /// - Task Enqueue(Func action, CancellationToken cancellationToken); - - /// - /// Enqueue the task and return a task corresponding - /// to the execution of the original task - /// - /// - /// - /// - /// - Task Enqueue(Func> action, CancellationToken cancellationToken); - - /// - /// Clone dispatcher - /// - /// - IDispatcher Clone(); - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IDispatcherProvider.cs b/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IDispatcherProvider.cs deleted file mode 100644 index fb4c760..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/ComposableAsync.Core/IDispatcherProvider.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace ComposableAsync -{ - /// - /// Returns the fiber associated with an actor - /// - public interface IDispatcherProvider - { - /// - /// Returns the corresponding - /// - IDispatcher Dispatcher { get; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/AwaitableConstraintExtension.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/AwaitableConstraintExtension.cs deleted file mode 100644 index 0a2dd65..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/AwaitableConstraintExtension.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace RateLimiter -{ - /// - /// Provides extension to interface - /// - public static class AwaitableConstraintExtension - { - /// - /// Compose two awaitable constraint in a new one - /// - /// - /// - /// - public static IAwaitableConstraint Compose(this IAwaitableConstraint awaitableConstraint1, IAwaitableConstraint awaitableConstraint2) - { - if (awaitableConstraint1 == awaitableConstraint2) - return awaitableConstraint1; - - return new ComposedAwaitableConstraint(awaitableConstraint1, awaitableConstraint2); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/ComposedAwaitableConstraint.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/ComposedAwaitableConstraint.cs deleted file mode 100644 index 278de53..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/ComposedAwaitableConstraint.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace RateLimiter -{ - internal class ComposedAwaitableConstraint : IAwaitableConstraint - { - private readonly IAwaitableConstraint _AwaitableConstraint1; - private readonly IAwaitableConstraint _AwaitableConstraint2; - private readonly SemaphoreSlim _Semaphore = new SemaphoreSlim(1, 1); - - internal ComposedAwaitableConstraint(IAwaitableConstraint awaitableConstraint1, IAwaitableConstraint awaitableConstraint2) - { - _AwaitableConstraint1 = awaitableConstraint1; - _AwaitableConstraint2 = awaitableConstraint2; - } - - public IAwaitableConstraint Clone() - { - return new ComposedAwaitableConstraint(_AwaitableConstraint1.Clone(), _AwaitableConstraint2.Clone()); - } - - public async Task WaitForReadiness(CancellationToken cancellationToken) - { - await _Semaphore.WaitAsync(cancellationToken); - IDisposable[] disposables; - try - { - disposables = await Task.WhenAll(_AwaitableConstraint1.WaitForReadiness(cancellationToken), _AwaitableConstraint2.WaitForReadiness(cancellationToken)); - } - catch (Exception) - { - _Semaphore.Release(); - throw; - } - return new DisposeAction(() => - { - foreach (var disposable in disposables) - { - disposable.Dispose(); - } - _Semaphore.Release(); - }); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/CountByIntervalAwaitableConstraint.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/CountByIntervalAwaitableConstraint.cs deleted file mode 100644 index 460be4f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/CountByIntervalAwaitableConstraint.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; - -namespace RateLimiter -{ - /// - /// Provide an awaitable constraint based on number of times per duration - /// - public class CountByIntervalAwaitableConstraint : IAwaitableConstraint - { - /// - /// List of the last time stamps - /// - public IReadOnlyList TimeStamps => _TimeStamps.ToList(); - - /// - /// Stack of the last time stamps - /// - protected LimitedSizeStack _TimeStamps { get; } - - private int _Count { get; } - private TimeSpan _TimeSpan { get; } - private SemaphoreSlim _Semaphore { get; } = new SemaphoreSlim(1, 1); - private ITime _Time { get; } - - /// - /// Constructs a new AwaitableConstraint based on number of times per duration - /// - /// - /// - public CountByIntervalAwaitableConstraint(int count, TimeSpan timeSpan) : this(count, timeSpan, TimeSystem.StandardTime) - { - } - - internal CountByIntervalAwaitableConstraint(int count, TimeSpan timeSpan, ITime time) - { - if (count <= 0) - throw new ArgumentException("count should be strictly positive", nameof(count)); - - if (timeSpan.TotalMilliseconds <= 0) - throw new ArgumentException("timeSpan should be strictly positive", nameof(timeSpan)); - - _Count = count; - _TimeSpan = timeSpan; - _TimeStamps = new LimitedSizeStack(_Count); - _Time = time; - } - - /// - /// returns a task that will complete once the constraint is fulfilled - /// - /// - /// Cancel the wait - /// - /// - /// A disposable that should be disposed upon task completion - /// - public async Task WaitForReadiness(CancellationToken cancellationToken) - { - await _Semaphore.WaitAsync(cancellationToken); - var count = 0; - var now = _Time.GetNow(); - var target = now - _TimeSpan; - LinkedListNode element = _TimeStamps.First, last = null; - while ((element != null) && (element.Value > target)) - { - last = element; - element = element.Next; - count++; - } - - if (count < _Count) - return new DisposeAction(OnEnded); - - Debug.Assert(element == null); - Debug.Assert(last != null); - var timeToWait = last.Value.Add(_TimeSpan) - now; - try - { - await _Time.GetDelay(timeToWait, cancellationToken); - } - catch (Exception) - { - _Semaphore.Release(); - throw; - } - - return new DisposeAction(OnEnded); - } - - /// - /// Clone CountByIntervalAwaitableConstraint - /// - /// - public IAwaitableConstraint Clone() - { - return new CountByIntervalAwaitableConstraint(_Count, _TimeSpan, _Time); - } - - private void OnEnded() - { - var now = _Time.GetNow(); - _TimeStamps.Push(now); - OnEnded(now); - _Semaphore.Release(); - } - - /// - /// Called when action has been executed - /// - /// - protected virtual void OnEnded(DateTime now) - { - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/DisposeAction.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/DisposeAction.cs deleted file mode 100644 index 8fd44c0..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/DisposeAction.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace RateLimiter -{ - internal class DisposeAction : IDisposable - { - private Action _Act; - - public DisposeAction(Action act) - { - _Act = act; - } - - public void Dispose() - { - _Act?.Invoke(); - _Act = null; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/IAwaitableConstraint.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/IAwaitableConstraint.cs deleted file mode 100644 index a9d13d3..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/IAwaitableConstraint.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace RateLimiter -{ - /// - /// Represents a time constraints that can be awaited - /// - public interface IAwaitableConstraint - { - /// - /// returns a task that will complete once the constraint is fulfilled - /// - /// - /// Cancel the wait - /// - /// - /// A disposable that should be disposed upon task completion - /// - Task WaitForReadiness(CancellationToken cancellationToken); - - /// - /// Returns a new IAwaitableConstraint with same constraints but unused - /// - /// - IAwaitableConstraint Clone(); - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/ITime.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/ITime.cs deleted file mode 100644 index 0faa0cd..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/ITime.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace RateLimiter -{ - /// - /// Time abstraction - /// - internal interface ITime - { - /// - /// Return Now DateTime - /// - /// - DateTime GetNow(); - - /// - /// Returns a task delay - /// - /// - /// - /// - Task GetDelay(TimeSpan timespan, CancellationToken cancellationToken); - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/LimitedSizeStack.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/LimitedSizeStack.cs deleted file mode 100644 index bf1fe86..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/LimitedSizeStack.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Collections.Generic; - -namespace RateLimiter -{ - /// - /// LinkedList with a limited size - /// If the size exceeds the limit older entry are removed - /// - /// - public class LimitedSizeStack: LinkedList - { - private readonly int _MaxSize; - - /// - /// Construct the LimitedSizeStack with the given limit - /// - /// - public LimitedSizeStack(int maxSize) - { - _MaxSize = maxSize; - } - - /// - /// Push new entry. If he size exceeds the limit, the oldest entry is removed - /// - /// - public void Push(T item) - { - AddFirst(item); - - if (Count > _MaxSize) - RemoveLast(); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/PersistentCountByIntervalAwaitableConstraint.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/PersistentCountByIntervalAwaitableConstraint.cs deleted file mode 100644 index cda1e92..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/PersistentCountByIntervalAwaitableConstraint.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace RateLimiter -{ - /// - /// that is able to save own state. - /// - public sealed class PersistentCountByIntervalAwaitableConstraint : CountByIntervalAwaitableConstraint - { - private readonly Action _SaveStateAction; - - /// - /// Create an instance of . - /// - /// Maximum actions allowed per time interval. - /// Time interval limits are applied for. - /// Action is used to save state. - /// Initial timestamps. - public PersistentCountByIntervalAwaitableConstraint(int count, TimeSpan timeSpan, - Action saveStateAction, IEnumerable initialTimeStamps) : base(count, timeSpan) - { - _SaveStateAction = saveStateAction; - - if (initialTimeStamps == null) - return; - - foreach (var timeStamp in initialTimeStamps) - { - _TimeStamps.Push(timeStamp); - } - } - - /// - /// Save state - /// - protected override void OnEnded(DateTime now) - { - _SaveStateAction(now); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/TimeLimiter.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/TimeLimiter.cs deleted file mode 100644 index e36b8e9..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/TimeLimiter.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using ComposableAsync; - -namespace RateLimiter -{ - /// - /// TimeLimiter implementation - /// - public class TimeLimiter : IDispatcher - { - private readonly IAwaitableConstraint _AwaitableConstraint; - - internal TimeLimiter(IAwaitableConstraint awaitableConstraint) - { - _AwaitableConstraint = awaitableConstraint; - } - - /// - /// Perform the given task respecting the time constraint - /// returning the result of given function - /// - /// - /// - public Task Enqueue(Func perform) - { - return Enqueue(perform, CancellationToken.None); - } - - /// - /// Perform the given task respecting the time constraint - /// returning the result of given function - /// - /// - /// - /// - public Task Enqueue(Func> perform) - { - return Enqueue(perform, CancellationToken.None); - } - - /// - /// Perform the given task respecting the time constraint - /// - /// - /// - /// - public async Task Enqueue(Func perform, CancellationToken cancellationToken) - { - cancellationToken.ThrowIfCancellationRequested(); - using (await _AwaitableConstraint.WaitForReadiness(cancellationToken)) - { - await perform(); - } - } - - /// - /// Perform the given task respecting the time constraint - /// returning the result of given function - /// - /// - /// - /// - /// - public async Task Enqueue(Func> perform, CancellationToken cancellationToken) - { - cancellationToken.ThrowIfCancellationRequested(); - using (await _AwaitableConstraint.WaitForReadiness(cancellationToken)) - { - return await perform(); - } - } - - public IDispatcher Clone() => new TimeLimiter(_AwaitableConstraint.Clone()); - - private static Func Transform(Action act) - { - return () => { act(); return Task.FromResult(0); }; - } - - /// - /// Perform the given task respecting the time constraint - /// returning the result of given function - /// - /// - /// - /// - private static Func> Transform(Func compute) - { - return () => Task.FromResult(compute()); - } - - /// - /// Perform the given task respecting the time constraint - /// - /// - /// - public Task Enqueue(Action perform) - { - var transformed = Transform(perform); - return Enqueue(transformed); - } - - /// - /// Perform the given task respecting the time constraint - /// - /// - public void Dispatch(Action action) - { - Enqueue(action); - } - - /// - /// Perform the given task respecting the time constraint - /// returning the result of given function - /// - /// - /// - /// - public Task Enqueue(Func perform) - { - var transformed = Transform(perform); - return Enqueue(transformed); - } - - /// - /// Perform the given task respecting the time constraint - /// returning the result of given function - /// - /// - /// - /// - /// - public Task Enqueue(Func perform, CancellationToken cancellationToken) - { - var transformed = Transform(perform); - return Enqueue(transformed, cancellationToken); - } - - /// - /// Perform the given task respecting the time constraint - /// - /// - /// - /// - public Task Enqueue(Action perform, CancellationToken cancellationToken) - { - var transformed = Transform(perform); - return Enqueue(transformed, cancellationToken); - } - - /// - /// Returns a TimeLimiter based on a maximum number of times - /// during a given period - /// - /// - /// - /// - public static TimeLimiter GetFromMaxCountByInterval(int maxCount, TimeSpan timeSpan) - { - return new TimeLimiter(new CountByIntervalAwaitableConstraint(maxCount, timeSpan)); - } - - /// - /// Create that will save state using action passed through parameter. - /// - /// Maximum actions allowed per time interval. - /// Time interval limits are applied for. - /// Action is used to save state. - /// instance with . - public static TimeLimiter GetPersistentTimeLimiter(int maxCount, TimeSpan timeSpan, - Action saveStateAction) - { - return GetPersistentTimeLimiter(maxCount, timeSpan, saveStateAction, null); - } - - /// - /// Create with initial timestamps that will save state using action passed through parameter. - /// - /// Maximum actions allowed per time interval. - /// Time interval limits are applied for. - /// Action is used to save state. - /// Initial timestamps. - /// instance with . - public static TimeLimiter GetPersistentTimeLimiter(int maxCount, TimeSpan timeSpan, - Action saveStateAction, IEnumerable initialTimeStamps) - { - return new TimeLimiter(new PersistentCountByIntervalAwaitableConstraint(maxCount, timeSpan, saveStateAction, initialTimeStamps)); - } - - /// - /// Compose various IAwaitableConstraint in a TimeLimiter - /// - /// - /// - public static TimeLimiter Compose(params IAwaitableConstraint[] constraints) - { - var composed = constraints.Aggregate(default(IAwaitableConstraint), - (accumulated, current) => (accumulated == null) ? current : accumulated.Compose(current)); - return new TimeLimiter(composed); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/TimeSystem.cs b/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/TimeSystem.cs deleted file mode 100644 index 81b46e1..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/RateLimiter/TimeSystem.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace RateLimiter -{ - internal class TimeSystem : ITime - { - public static ITime StandardTime { get; } - - static TimeSystem() - { - StandardTime = new TimeSystem(); - } - - private TimeSystem() - { - } - - DateTime ITime.GetNow() - { - return DateTime.Now; - } - - Task ITime.GetDelay(TimeSpan timespan, CancellationToken cancellationToken) - { - return Task.Delay(timespan, cancellationToken); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/.editorconfig b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/.editorconfig deleted file mode 100644 index 4540e5d..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/.editorconfig +++ /dev/null @@ -1,4 +0,0 @@ -[*.cs] - -# CAC001: ConfigureAwaitChecker -dotnet_diagnostic.CAC001.severity = error \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClient.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClient.cs deleted file mode 100644 index 10e7e6c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClient.cs +++ /dev/null @@ -1,291 +0,0 @@ -using System; -using TMDbLib.Objects.Account; -using TMDbLib.Objects.Authentication; -using TMDbLib.Objects.General; -using ParameterType = TMDbLib.Rest.ParameterType; -using RestClient = TMDbLib.Rest.RestClient; -using RestRequest = TMDbLib.Rest.RestRequest; -using System.Net; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Rest; -using TMDbLib.Utilities.Serializer; - -namespace TMDbLib.Client -{ - public partial class TMDbClient : IDisposable - { - private const string ApiVersion = "3"; - private const string ProductionUrl = "api.themoviedb.org"; - - private readonly ITMDbSerializer _serializer; - private RestClient _client; - private TMDbConfig _config; - - public TMDbClient(string apiKey, bool useSsl = true, string baseUrl = ProductionUrl, ITMDbSerializer serializer = null, IWebProxy proxy = null) - { - DefaultLanguage = null; - DefaultImageLanguage = null; - DefaultCountry = null; - - _serializer = serializer ?? TMDbJsonSerializer.Instance; - - //Setup proxy to use during requests - //Proxy is optional. If passed, will be used in every request. - WebProxy = proxy; - - Initialize(baseUrl, useSsl, apiKey); - } - - /// - /// The account details of the user account associated with the current user session - /// - /// This value is automaticly populated when setting a user session - public AccountDetails ActiveAccount { get; private set; } - - public string ApiKey { get; private set; } - - public TMDbConfig Config - { - get - { - if (!HasConfig) - throw new InvalidOperationException("Call GetConfig() or SetConfig() first"); - return _config; - } - private set { _config = value; } - } - - /// - /// ISO 3166-1 code. Ex. US - /// - public string DefaultCountry { get; set; } - - /// - /// ISO 639-1 code. Ex en - /// - public string DefaultLanguage { get; set; } - - /// - /// ISO 639-1 code. Ex en - /// - public string DefaultImageLanguage { get; set; } - - public bool HasConfig { get; private set; } - - /// - /// Throw exceptions when TMDbs API returns certain errors, such as Not Found. - /// - public bool ThrowApiExceptions - { - get => _client.ThrowApiExceptions; - set => _client.ThrowApiExceptions = value; - } - - /// - /// The maximum number of times a call to TMDb will be retried - /// - /// Default is 0 - public int MaxRetryCount - { - get => _client.MaxRetryCount; - set => _client.MaxRetryCount = value; - } - - /// - /// The request timeout call to TMDb - /// - public TimeSpan RequestTimeout - { - get => _client.HttpClient.Timeout; - set => _client.HttpClient.Timeout = value; - } - - /// - /// The session id that will be used when TMDb requires authentication - /// - /// Use 'SetSessionInformation' to assign this value - public string SessionId { get; private set; } - - /// - /// The type of the session id, this will determine the level of access that is granted on the API - /// - /// Use 'SetSessionInformation' to assign this value - public SessionType SessionType { get; private set; } - - /// - /// Gets or sets the Web Proxy to use during requests to TMDb API. - /// - /// - /// The Web Proxy is optional. If set, every request will be sent through it. - /// Use the constructor for setting it. - /// - /// For convenience, this library also offers a implementation. - /// Check for more information. - /// - public IWebProxy WebProxy { get; private set; } - - /// - /// Used internally to assign a session id to a request. If no valid session is found, an exception is thrown. - /// - /// Request - /// The target session type to set. If set to Unassigned, the method will take the currently set session. - /// The location of the paramter in the resulting query - private void AddSessionId(RestRequest req, SessionType targetType = SessionType.Unassigned, ParameterType parameterType = ParameterType.QueryString) - { - if ((targetType == SessionType.Unassigned && SessionType == SessionType.GuestSession) || - (targetType == SessionType.GuestSession)) - { - // Either - // - We needed ANY session ID and had a Guest session id - // - We needed a Guest session id and had it - req.AddParameter("guest_session_id", SessionId, parameterType); - return; - } - - if ((targetType == SessionType.Unassigned && SessionType == SessionType.UserSession) || - (targetType == SessionType.UserSession)) - { - // Either - // - We needed ANY session ID and had a User session id - // - We needed a User session id and had it - req.AddParameter("session_id", SessionId, parameterType); - return; - } - - // We did not have the required session type ready - throw new UserSessionRequiredException(); - } - - public async Task GetConfigAsync() - { - TMDbConfig config = await _client.Create("configuration").GetOfT(CancellationToken.None).ConfigureAwait(false); - - if (config == null) - throw new Exception("Unable to retrieve configuration"); - - // Store config - Config = config; - HasConfig = true; - - return config; - } - - public Uri GetImageUrl(string size, string filePath, bool useSsl = false) - { - string baseUrl = useSsl ? Config.Images.SecureBaseUrl : Config.Images.BaseUrl; - return new Uri(baseUrl + size + filePath); - } - - [Obsolete("Use " + nameof(GetImageBytesAsync))] - public Task GetImageBytes(string size, string filePath, bool useSsl = false, CancellationToken token = default) - { - return GetImageBytesAsync(size, filePath, useSsl, token); - } - - public async Task GetImageBytesAsync(string size, string filePath, bool useSsl = false, CancellationToken token = default) - { - Uri url = GetImageUrl(size, filePath, useSsl); - - using HttpResponseMessage response = await _client.HttpClient.GetAsync(url, HttpCompletionOption.ResponseContentRead, token).ConfigureAwait(false); - response.EnsureSuccessStatusCode(); - - return await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); - } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("IDisposableAnalyzers.Correctness", "IDISP003:Dispose previous before re-assigning.", Justification = "Only called from ctor")] - private void Initialize(string baseUrl, bool useSsl, string apiKey) - { - if (string.IsNullOrWhiteSpace(baseUrl)) - throw new ArgumentException("baseUrl"); - - if (string.IsNullOrWhiteSpace(apiKey)) - throw new ArgumentException("apiKey"); - - ApiKey = apiKey; - - // Cleanup the provided url so that we don't get any issues when we are configuring the client - if (baseUrl.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) - baseUrl = baseUrl.Substring("http://".Length); - else if (baseUrl.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) - baseUrl = baseUrl.Substring("https://".Length); - - string httpScheme = useSsl ? "https" : "http"; - - _client = new RestClient(new Uri(string.Format("{0}://{1}/{2}/", httpScheme, baseUrl, ApiVersion)), _serializer, WebProxy); - _client.AddDefaultQueryString("api_key", apiKey); - } - - /// - /// Used internally to determine if the current client has the required session set, if not an appropriate exception will be thrown - /// - /// The type of session that is required by the calling method - /// Thrown if the calling method requires a user session and one isn't set on the client object - /// Thrown if the calling method requires a guest session and no session is set on the client object. (neither user or client type session) - private void RequireSessionId(SessionType sessionType) - { - if (string.IsNullOrWhiteSpace(SessionId)) - { - if (sessionType == SessionType.GuestSession) - throw new UserSessionRequiredException(); - else - throw new GuestSessionRequiredException(); - } - - if (sessionType == SessionType.UserSession && SessionType == SessionType.GuestSession) - throw new UserSessionRequiredException(); - } - - public void SetConfig(TMDbConfig config) - { - // Store config - Config = config; - HasConfig = true; - } - - /// - /// Use this method to set the current client's authentication information. - /// The session id assigned here will be used by the client when ever TMDb requires it. - /// - /// The session id to use when making calls that require authentication - /// The type of session id - /// - /// - Use the 'AuthenticationGetUserSessionAsync' and 'AuthenticationCreateGuestSessionAsync' methods to optain the respective session ids. - /// - User sessions have access to far for methods than guest sessions, these can currently only be used to rate media. - /// - public async Task SetSessionInformationAsync(string sessionId, SessionType sessionType) - { - ActiveAccount = null; - SessionId = sessionId; - if (!string.IsNullOrWhiteSpace(sessionId) && sessionType == SessionType.Unassigned) - { - throw new ArgumentException("When setting the session id it must always be either a guest or user session"); - } - - SessionType = string.IsNullOrWhiteSpace(sessionId) ? SessionType.Unassigned : sessionType; - - // Populate the related account information - if (sessionType == SessionType.UserSession) - { - try - { - ActiveAccount = await AccountGetDetailsAsync().ConfigureAwait(false); - } - catch (Exception) - { - // Unable to complete the full process so reset all values and throw the exception - ActiveAccount = null; - SessionId = null; - SessionType = SessionType.Unassigned; - throw; - } - } - } - - public virtual void Dispose() - { - _client?.Dispose(); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientAccount.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientAccount.cs deleted file mode 100644 index a4495ae..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientAccount.cs +++ /dev/null @@ -1,257 +0,0 @@ -using TMDbLib.Utilities; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Account; -using TMDbLib.Objects.Authentication; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Lists; -using TMDbLib.Objects.Search; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task> GetAccountListInternal(int page, AccountSortBy sortBy, SortOrder sortOrder, string language, AccountListsMethods method, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest request = _client.Create("account/{accountId}/" + method.GetDescription()); - request.AddUrlSegment("accountId", ActiveAccount.Id.ToString(CultureInfo.InvariantCulture)); - AddSessionId(request, SessionType.UserSession); - - if (page > 1) - request.AddParameter("page", page.ToString()); - - if (sortBy != AccountSortBy.Undefined) - request.AddParameter("sort_by", sortBy.GetDescription()); - - if (sortOrder != SortOrder.Undefined) - request.AddParameter("sort_order", sortOrder.GetDescription()); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - request.AddParameter("language", language); - - SearchContainer response = await request.GetOfT>(cancellationToken).ConfigureAwait(false); - - return response; - } - - /// - /// Change the favorite status of a specific movie. Either make the movie a favorite or remove that status depending on the supplied boolean value. - /// - /// The type of media to influence - /// The id of the movie/tv show to influence - /// True if you want the specified movie to be marked as favorite, false if not - /// Cancellation token - /// True if the the movie's favorite status was successfully updated, false if not - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task AccountChangeFavoriteStatusAsync(MediaType mediaType, int mediaId, bool isFavorite, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest request = _client.Create("account/{accountId}/favorite"); - request.AddUrlSegment("accountId", ActiveAccount.Id.ToString(CultureInfo.InvariantCulture)); - request.SetBody(new { media_type = mediaType.GetDescription(), media_id = mediaId, favorite = isFavorite }); - AddSessionId(request, SessionType.UserSession); - - PostReply response = await request.PostOfT(cancellationToken).ConfigureAwait(false); - - // status code 1 = "Success" - Returned when adding a movie as favorite for the first time - // status code 13 = "The item/record was deleted successfully" - When removing an item as favorite, no matter if it exists or not - // status code 12 = "The item/record was updated successfully" - Used when an item is already marked as favorite and trying to do so doing again - return response.StatusCode == 1 || response.StatusCode == 12 || response.StatusCode == 13; - } - - /// - /// Change the state of a specific movie on the users watchlist. Either add the movie to the list or remove it, depending on the specified boolean value. - /// - /// The type of media to influence - /// The id of the movie/tv show to influence - /// True if you want the specified movie to be part of the watchlist, false if not - /// A cancellation token - /// True if the the movie's status on the watchlist was successfully updated, false if not - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task AccountChangeWatchlistStatusAsync(MediaType mediaType, int mediaId, bool isOnWatchlist, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest request = _client.Create("account/{accountId}/watchlist"); - request.AddUrlSegment("accountId", ActiveAccount.Id.ToString(CultureInfo.InvariantCulture)); - request.SetBody(new { media_type = mediaType.GetDescription(), media_id = mediaId, watchlist = isOnWatchlist }); - AddSessionId(request, SessionType.UserSession); - - PostReply response = await request.PostOfT(cancellationToken).ConfigureAwait(false); - - // status code 1 = "Success" - // status code 13 = "The item/record was deleted successfully" - When removing an item from the watchlist, no matter if it exists or not - // status code 12 = "The item/record was updated successfully" - Used when an item is already on the watchlist and trying to add it again - return response.StatusCode == 1 || response.StatusCode == 12 || response.StatusCode == 13; - } - - /// - /// Will retrieve the details of the account associated with the current session id - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task AccountGetDetailsAsync(CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest request = _client.Create("account"); - AddSessionId(request, SessionType.UserSession); - - AccountDetails response = await request.GetOfT(cancellationToken).ConfigureAwait(false); - - return response; - } - - /// - /// Get a list of all the movies marked as favorite by the current user - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task> AccountGetFavoriteMoviesAsync( - int page = 1, - AccountSortBy sortBy = AccountSortBy.Undefined, - SortOrder sortOrder = SortOrder.Undefined, - string language = null, CancellationToken cancellationToken = default) - { - return await GetAccountListInternal(page, sortBy, sortOrder, language, AccountListsMethods.FavoriteMovies, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a list of all the tv shows marked as favorite by the current user - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task> AccountGetFavoriteTvAsync( - int page = 1, - AccountSortBy sortBy = AccountSortBy.Undefined, - SortOrder sortOrder = SortOrder.Undefined, - string language = null, CancellationToken cancellationToken = default) - { - return await GetAccountListInternal(page, sortBy, sortOrder, language, AccountListsMethods.FavoriteTv, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieve all lists associated with the provided account id - /// This can be lists that were created by the user or lists marked as favorite - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task> AccountGetListsAsync(int page = 1, string language = null, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest request = _client.Create("account/{accountId}/lists"); - request.AddUrlSegment("accountId", ActiveAccount.Id.ToString(CultureInfo.InvariantCulture)); - AddSessionId(request, SessionType.UserSession); - - if (page > 1) - { - request.AddQueryString("page", page.ToString()); - } - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - request.AddQueryString("language", language); - - SearchContainer response = await request.GetOfT>(cancellationToken).ConfigureAwait(false); - - return response; - } - - /// - /// Get a list of all the movies on the current users match list - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task> AccountGetMovieWatchlistAsync( - int page = 1, - AccountSortBy sortBy = AccountSortBy.Undefined, - SortOrder sortOrder = SortOrder.Undefined, - string language = null, CancellationToken cancellationToken = default) - { - return await GetAccountListInternal(page, sortBy, sortOrder, language, AccountListsMethods.MovieWatchlist, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a list of all the movies rated by the current user - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task> AccountGetRatedMoviesAsync( - int page = 1, - AccountSortBy sortBy = AccountSortBy.Undefined, - SortOrder sortOrder = SortOrder.Undefined, - string language = null, CancellationToken cancellationToken = default) - { - return await GetAccountListInternal(page, sortBy, sortOrder, language, AccountListsMethods.RatedMovies, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a list of all the tv show episodes rated by the current user - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task> AccountGetRatedTvShowEpisodesAsync( - int page = 1, - AccountSortBy sortBy = AccountSortBy.Undefined, - SortOrder sortOrder = SortOrder.Undefined, - string language = null, CancellationToken cancellationToken = default) - { - return await GetAccountListInternal(page, sortBy, sortOrder, language, AccountListsMethods.RatedTvEpisodes, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a list of all the tv shows rated by the current user - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task> AccountGetRatedTvShowsAsync( - int page = 1, - AccountSortBy sortBy = AccountSortBy.Undefined, - SortOrder sortOrder = SortOrder.Undefined, - string language = null, CancellationToken cancellationToken = default) - { - return await GetAccountListInternal(page, sortBy, sortOrder, language, AccountListsMethods.RatedTv, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a list of all the tv shows on the current users match list - /// - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task> AccountGetTvWatchlistAsync( - int page = 1, - AccountSortBy sortBy = AccountSortBy.Undefined, - SortOrder sortOrder = SortOrder.Undefined, - string language = null, CancellationToken cancellationToken = default) - { - return await GetAccountListInternal(page, sortBy, sortOrder, language, AccountListsMethods.TvWatchlist, cancellationToken).ConfigureAwait(false); - } - - private enum AccountListsMethods - { - [EnumValue("favorite/movies")] - FavoriteMovies, - [EnumValue("favorite/tv")] - FavoriteTv, - [EnumValue("rated/movies")] - RatedMovies, - [EnumValue("rated/tv")] - RatedTv, - [EnumValue("rated/tv/episodes")] - RatedTvEpisodes, - [EnumValue("watchlist/movies")] - MovieWatchlist, - [EnumValue("watchlist/tv")] - TvWatchlist, - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientAuthentication.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientAuthentication.cs deleted file mode 100644 index ba76409..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientAuthentication.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Threading.Tasks; -using System.Net; -using System.Threading; -using TMDbLib.Objects.Authentication; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - public async Task AuthenticationCreateGuestSessionAsync(CancellationToken cancellationToken = default) - { - RestRequest request = _client.Create("authentication/guest_session/new"); - //{ - // DateFormat = "yyyy-MM-dd HH:mm:ss UTC" - //}; - - GuestSession response = await request.GetOfT(cancellationToken).ConfigureAwait(false); - - return response; - } - - public async Task AuthenticationGetUserSessionAsync(string initialRequestToken, CancellationToken cancellationToken = default) - { - RestRequest request = _client.Create("authentication/session/new"); - request.AddParameter("request_token", initialRequestToken); - - using RestResponse response = await request.Get(cancellationToken).ConfigureAwait(false); - - if (response.StatusCode == HttpStatusCode.Unauthorized) - throw new UnauthorizedAccessException(); - - return await response.GetDataObject().ConfigureAwait(false); - } - - /// - /// Conveniance method combining 'AuthenticationRequestAutenticationTokenAsync', 'AuthenticationValidateUserTokenAsync' and 'AuthenticationGetUserSessionAsync' - /// - /// A valid TMDb username - /// The passoword for the provided login - /// A cancellation token - public async Task AuthenticationGetUserSessionAsync(string username, string password, CancellationToken cancellationToken = default) - { - Token token = await AuthenticationRequestAutenticationTokenAsync(cancellationToken).ConfigureAwait(false); - await AuthenticationValidateUserTokenAsync(token.RequestToken, username, password, cancellationToken).ConfigureAwait(false); - return await AuthenticationGetUserSessionAsync(token.RequestToken, cancellationToken).ConfigureAwait(false); - } - - public async Task AuthenticationRequestAutenticationTokenAsync(CancellationToken cancellationToken = default) - { - RestRequest request = _client.Create("authentication/token/new"); - - using RestResponse response = await request.Get(cancellationToken).ConfigureAwait(false); - Token token = await response.GetDataObject().ConfigureAwait(false); - - token.AuthenticationCallback = response.GetHeader("Authentication-Callback"); - - return token; - } - - public async Task AuthenticationValidateUserTokenAsync(string initialRequestToken, string username, string password, CancellationToken cancellationToken = default) - { - RestRequest request = _client.Create("authentication/token/validate_with_login"); - request.AddParameter("request_token", initialRequestToken); - request.AddParameter("username", username); - request.AddParameter("password", password); - - RestResponse response; - try - { - response = await request.Get(cancellationToken).ConfigureAwait(false); - } - catch (AggregateException ex) - { - throw ex.InnerException; - } - - using RestResponse _ = response; - - if (response.StatusCode == HttpStatusCode.Unauthorized) - { - throw new UnauthorizedAccessException("Call to TMDb returned unauthorized. Most likely the provided user credentials are invalid."); - } - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCertifications.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCertifications.cs deleted file mode 100644 index be6c5a4..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCertifications.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Certifications; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - public async Task GetMovieCertificationsAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("certification/movie/list"); - - CertificationsContainer resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task GetTvCertificationsAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("certification/tv/list"); - - CertificationsContainer resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientChanges.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientChanges.cs deleted file mode 100644 index d638054..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientChanges.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Changes; -using TMDbLib.Objects.General; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetChangesInternal(string type, int page = 0, int? id = null, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) - { - string resource; - if (id.HasValue) - resource = "{type}/{id}/changes"; - else - resource = "{type}/changes"; - - RestRequest req = _client.Create(resource); - req.AddUrlSegment("type", type); - - if (id.HasValue) - req.AddUrlSegment("id", id.Value.ToString()); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (startDate.HasValue) - req.AddParameter("start_date", startDate.Value.ToString("yyyy-MM-dd")); - if (endDate != null) - req.AddParameter("end_date", endDate.Value.ToString("yyyy-MM-dd")); - - using RestResponse resp = await req.Get(cancellationToken).ConfigureAwait(false); - T res = await resp.GetDataObject().ConfigureAwait(false); - - if (res is SearchContainer asSearch) - { - // https://github.com/LordMike/TMDbLib/issues/296 - asSearch.Results.RemoveAll(s => s.Id == 0); - } - - return res; - } - - /// - /// Get a list of movie ids that have been edited. - /// By default we show the last 24 hours and only 100 items per page. - /// The maximum number of days that can be returned in a single request is 14. - /// You can then use the movie changes API to get the actual data that has been changed. (.GetMovieChangesAsync) - /// - /// the change log system to support this was changed on October 5, 2012 and will only show movies that have been edited since. - public async Task> GetMoviesChangesAsync(int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) - { - return await GetChangesInternal>("movie", page, startDate: startDate, endDate: endDate, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a list of people ids that have been edited. - /// By default we show the last 24 hours and only 100 items per page. - /// The maximum number of days that can be returned in a single request is 14. - /// You can then use the person changes API to get the actual data that has been changed.(.GetPersonChangesAsync) - /// - /// the change log system to support this was changed on October 5, 2012 and will only show people that have been edited since. - public async Task> GetPeopleChangesAsync(int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) - { - return await GetChangesInternal>("person", page, startDate: startDate, endDate: endDate, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a list of TV show ids that have been edited. - /// By default we show the last 24 hours and only 100 items per page. - /// The maximum number of days that can be returned in a single request is 14. - /// You can then use the TV changes API to get the actual data that has been changed. (.GetTvShowChangesAsync) - /// - /// - /// the change log system to properly support TV was updated on May 13, 2014. - /// You'll likely only find the edits made since then to be useful in the change log system. - /// - public async Task> GetTvChangesAsync(int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) - { - return await GetChangesInternal>("tv", page, startDate: startDate, endDate: endDate, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieChangesAsync(int movieId, int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) - { - ChangesContainer changesContainer = await GetChangesInternal("movie", page, movieId, startDate, endDate, cancellationToken).ConfigureAwait(false); - return changesContainer.Changes; - } - - public async Task> GetPersonChangesAsync(int personId, int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) - { - ChangesContainer changesContainer = await GetChangesInternal("person", page, personId, startDate, endDate, cancellationToken).ConfigureAwait(false); - return changesContainer.Changes; - } - - public async Task> GetTvSeasonChangesAsync(int seasonId, int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) - { - ChangesContainer changesContainer = await GetChangesInternal("tv/season", page, seasonId, startDate, endDate, cancellationToken).ConfigureAwait(false); - return changesContainer.Changes; - } - - public async Task> GetTvEpisodeChangesAsync(int episodeId, int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) - { - ChangesContainer changesContainer = await GetChangesInternal("tv/episode", page, episodeId, startDate, endDate, cancellationToken).ConfigureAwait(false); - return changesContainer.Changes; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCollections.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCollections.cs deleted file mode 100644 index 8710452..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCollections.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Linq; -using System.Net; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Collections; -using TMDbLib.Objects.General; -using TMDbLib.Rest; -using TMDbLib.Utilities; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetCollectionMethodInternal(int collectionId, CollectionMethods collectionMethod, string language = null, CancellationToken cancellationToken = default) where T : new() - { - RestRequest req = _client.Create("collection/{collectionId}/{method}"); - req.AddUrlSegment("collectionId", collectionId.ToString()); - req.AddUrlSegment("method", collectionMethod.GetDescription()); - - if (language != null) - req.AddParameter("language", language); - - T resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task GetCollectionAsync(int collectionId, CollectionMethods extraMethods = CollectionMethods.Undefined, CancellationToken cancellationToken = default) - { - return await GetCollectionAsync(collectionId, DefaultLanguage, null, extraMethods, cancellationToken).ConfigureAwait(false); - } - - public async Task GetCollectionAsync(int collectionId, string language, string includeImageLanguages, CollectionMethods extraMethods = CollectionMethods.Undefined, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("collection/{collectionId}"); - req.AddUrlSegment("collectionId", collectionId.ToString()); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - includeImageLanguages ??= DefaultImageLanguage; - if (!string.IsNullOrWhiteSpace(includeImageLanguages)) - req.AddParameter("include_image_language", includeImageLanguages); - - string appends = string.Join(",", - Enum.GetValues(typeof(CollectionMethods)) - .OfType() - .Except(new[] { CollectionMethods.Undefined }) - .Where(s => extraMethods.HasFlag(s)) - .Select(s => s.GetDescription())); - - if (appends != string.Empty) - req.AddParameter("append_to_response", appends); - - //req.DateFormat = "yyyy-MM-dd"; - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - if (!response.IsValid) - return null; - - Collection item = await response.GetDataObject().ConfigureAwait(false); - - if (item != null) - item.Overview = WebUtility.HtmlDecode(item.Overview); - - return item; - } - - public async Task GetCollectionImagesAsync(int collectionId, string language = null, CancellationToken cancellationToken = default) - { - return await GetCollectionMethodInternal(collectionId, CollectionMethods.Images, language, cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCompanies.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCompanies.cs deleted file mode 100644 index ef334c3..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCompanies.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Companies; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Search; -using TMDbLib.Rest; -using TMDbLib.Utilities; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetCompanyMethodInternal(int companyId, CompanyMethods companyMethod, int page = 0, string language = null, CancellationToken cancellationToken = default) where T : new() - { - RestRequest req = _client.Create("company/{companyId}/{method}"); - req.AddUrlSegment("companyId", companyId.ToString()); - req.AddUrlSegment("method", companyMethod.GetDescription()); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - T resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task GetCompanyAsync(int companyId, CompanyMethods extraMethods = CompanyMethods.Undefined, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("company/{companyId}"); - req.AddUrlSegment("companyId", companyId.ToString()); - - string appends = string.Join(",", - Enum.GetValues(typeof(CompanyMethods)) - .OfType() - .Except(new[] { CompanyMethods.Undefined }) - .Where(s => extraMethods.HasFlag(s)) - .Select(s => s.GetDescription())); - - if (appends != string.Empty) - req.AddParameter("append_to_response", appends); - - //req.DateFormat = "yyyy-MM-dd"; - - Company resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetCompanyMoviesAsync(int companyId, int page = 0, CancellationToken cancellationToken = default) - { - return await GetCompanyMoviesAsync(companyId, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetCompanyMoviesAsync(int companyId, string language, int page = 0, CancellationToken cancellationToken = default) - { - return await GetCompanyMethodInternal>(companyId, CompanyMethods.Movies, page, language, cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientConfiguration.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientConfiguration.cs deleted file mode 100644 index 3511138..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientConfiguration.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Configuration; -using TMDbLib.Objects.Countries; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Languages; -using TMDbLib.Objects.Timezones; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - public async Task GetAPIConfiguration(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("configuration"); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - return (await response.GetDataObject().ConfigureAwait(false)); - } - - public async Task> GetCountriesAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("configuration/countries"); - - using RestResponse> response = await req.Get>(cancellationToken).ConfigureAwait(false); - - return await response.GetDataObject().ConfigureAwait(false); - } - - public async Task> GetLanguagesAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("configuration/languages"); - - using RestResponse> response = await req.Get>(cancellationToken).ConfigureAwait(false); - - return (await response.GetDataObject().ConfigureAwait(false)); - } - - public async Task> GetPrimaryTranslationsAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("configuration/primary_translations"); - - using RestResponse> response = await req.Get>(cancellationToken).ConfigureAwait(false); - - return (await response.GetDataObject().ConfigureAwait(false)); - } - - public async Task GetTimezonesAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("timezones/list"); - - using RestResponse>>> resp = await req.Get>>>(cancellationToken).ConfigureAwait(false); - - List>> item = await resp.GetDataObject().ConfigureAwait(false); - - if (item == null) - return null; - - Timezones result = new Timezones(); - result.List = new Dictionary>(); - - foreach (Dictionary> dictionary in item) - { - KeyValuePair> item1 = dictionary.First(); - - result.List[item1.Key] = item1.Value; - } - - return result; - } - - /// - /// Retrieves a list of departments and positions within - /// - /// Valid jobs and their departments - public async Task> GetJobsAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("configuration/jobs"); - - using RestResponse> response = await req.Get>(cancellationToken).ConfigureAwait(false); - - return (await response.GetDataObject().ConfigureAwait(false)); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCredit.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCredit.cs deleted file mode 100644 index 15dfe82..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientCredit.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Credit; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - public async Task GetCreditsAsync(string id, CancellationToken cancellationToken = default) - { - return await GetCreditsAsync(id, DefaultLanguage, cancellationToken).ConfigureAwait(false); - } - - public async Task GetCreditsAsync(string id, string language, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("credit/{id}"); - - if (!string.IsNullOrEmpty(language)) - req.AddParameter("language", language); - - req.AddUrlSegment("id", id); - - Credit resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientDiscover.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientDiscover.cs deleted file mode 100644 index 8d22b8f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientDiscover.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Discover; -using TMDbLib.Objects.General; -using TMDbLib.Rest; -using TMDbLib.Utilities; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - /// - /// Can be used to discover movies matching certain criteria - /// - public DiscoverMovie DiscoverMoviesAsync() - { - return new DiscoverMovie(this); - } - - internal async Task> DiscoverPerformAsync(string endpoint, string language, int page, SimpleNamedValueCollection parameters, CancellationToken cancellationToken = default) - { - RestRequest request = _client.Create(endpoint); - - if (page != 1 && page > 1) - request.AddParameter("page", page.ToString()); - - if (!string.IsNullOrWhiteSpace(language)) - request.AddParameter("language", language); - - foreach (KeyValuePair pair in parameters) - request.AddParameter(pair.Key, pair.Value); - - SearchContainer response = await request.GetOfT>(cancellationToken).ConfigureAwait(false); - return response; - } - - /// - /// Can be used to discover new tv shows matching certain criteria - /// - public DiscoverTv DiscoverTvShowsAsync() - { - return new DiscoverTv(this); - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientFind.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientFind.cs deleted file mode 100644 index 468b60b..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientFind.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Net; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Find; -using TMDbLib.Rest; -using TMDbLib.Utilities; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - /// - /// FindAsync movies, people and tv shows by an external id. - /// The following types can be found based on the specified external id's - /// - Movies: Imdb - /// - People: Imdb, FreeBaseMid, FreeBaseId, TvRage - /// - TV Series: Imdb, FreeBaseMid, FreeBaseId, TvRage, TvDb - /// - /// The source the specified id belongs to - /// The id of the object you wish to located - /// A list of all objects in TMDb that matched your id - /// A cancellation token - public Task FindAsync(FindExternalSource source, string id, CancellationToken cancellationToken = default) - { - return FindAsync(source, id, null, cancellationToken); - } - - /// - /// FindAsync movies, people and tv shows by an external id. - /// The following types can be found based on the specified external id's - /// - Movies: Imdb - /// - People: Imdb, FreeBaseMid, FreeBaseId, TvRage - /// - TV Series: Imdb, FreeBaseMid, FreeBaseId, TvRage, TvDb - /// - /// The source the specified id belongs to - /// The id of the object you wish to located - /// A list of all objects in TMDb that matched your id - /// If specified the api will attempt to return a localized result. ex: en,it,es. - /// A cancellation token - public async Task FindAsync(FindExternalSource source, string id, string language, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("find/{id}"); - - req.AddUrlSegment("id", WebUtility.UrlEncode(id)); - req.AddParameter("external_source", source.GetDescription()); - - language ??= DefaultLanguage; - if (!string.IsNullOrEmpty(language)) - req.AddParameter("language", language); - - FindContainer resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientGenres.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientGenres.cs deleted file mode 100644 index 729df15..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientGenres.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Genres; -using TMDbLib.Objects.Search; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - [Obsolete("GetGenreMovies is deprecated, use DiscoverMovies instead")] - public async Task> GetGenreMoviesAsync(int genreId, int page = 0, bool? includeAllMovies = null, CancellationToken cancellationToken = default) - { - return await GetGenreMoviesAsync(genreId, DefaultLanguage, page, includeAllMovies, cancellationToken).ConfigureAwait(false); - } - - [Obsolete("GetGenreMovies is deprecated, use DiscoverMovies instead")] - public async Task> GetGenreMoviesAsync(int genreId, string language, int page = 0, bool? includeAllMovies = null, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("genre/{genreId}/movies"); - req.AddUrlSegment("genreId", genreId.ToString()); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (includeAllMovies.HasValue) - req.AddParameter("include_all_movies", includeAllMovies.Value ? "true" : "false"); - - SearchContainerWithId resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetMovieGenresAsync(CancellationToken cancellationToken = default) - { - return await GetMovieGenresAsync(DefaultLanguage, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieGenresAsync(string language, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("genre/movie/list"); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - using RestResponse resp = await req.Get(cancellationToken).ConfigureAwait(false); - - return (await resp.GetDataObject().ConfigureAwait(false)).Genres; - } - - public async Task> GetTvGenresAsync(CancellationToken cancellationToken = default) - { - return await GetTvGenresAsync(DefaultLanguage, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvGenresAsync(string language, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("genre/tv/list"); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - using RestResponse resp = await req.Get(cancellationToken).ConfigureAwait(false); - - return (await resp.GetDataObject().ConfigureAwait(false)).Genres; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientGuestSessions.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientGuestSessions.cs deleted file mode 100644 index 420e264..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientGuestSessions.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Authentication; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Search; -using TMDbLib.Objects.TvShows; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - public async Task> GetGuestSessionRatedMoviesAsync(int page = 0, CancellationToken cancellationToken = default) - { - return await GetGuestSessionRatedMoviesAsync(DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetGuestSessionRatedMoviesAsync(string language, int page = 0, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest request = _client.Create("guest_session/{guest_session_id}/rated/movies"); - - if (page > 0) - request.AddParameter("page", page.ToString()); - - if (!string.IsNullOrEmpty(language)) - request.AddParameter("language", language); - - AddSessionId(request, SessionType.GuestSession, ParameterType.UrlSegment); - - SearchContainer resp = await request.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetGuestSessionRatedTvAsync(int page = 0, CancellationToken cancellationToken = default) - { - return await GetGuestSessionRatedTvAsync(DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetGuestSessionRatedTvAsync(string language, int page = 0, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest request = _client.Create("guest_session/{guest_session_id}/rated/tv"); - - if (page > 0) - request.AddParameter("page", page.ToString()); - - if (!string.IsNullOrEmpty(language)) - request.AddParameter("language", language); - - AddSessionId(request, SessionType.GuestSession, ParameterType.UrlSegment); - - SearchContainer resp = await request.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetGuestSessionRatedTvEpisodesAsync(int page = 0, CancellationToken cancellationToken = default) - { - return await GetGuestSessionRatedTvEpisodesAsync(DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetGuestSessionRatedTvEpisodesAsync(string language, int page = 0, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest request = _client.Create("guest_session/{guest_session_id}/rated/tv/episodes"); - - if (page > 0) - request.AddParameter("page", page.ToString()); - - if (!string.IsNullOrEmpty(language)) - request.AddParameter("language", language); - - AddSessionId(request, SessionType.GuestSession, ParameterType.UrlSegment); - - SearchContainer resp = await request.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientKeywords.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientKeywords.cs deleted file mode 100644 index 1991223..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientKeywords.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Search; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - public async Task GetKeywordAsync(int keywordId, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("keyword/{keywordId}"); - req.AddUrlSegment("keywordId", keywordId.ToString()); - - Keyword resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetKeywordMoviesAsync(int keywordId, int page = 0, CancellationToken cancellationToken = default) - { - return await GetKeywordMoviesAsync(keywordId, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetKeywordMoviesAsync(int keywordId, string language, int page = 0, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("keyword/{keywordId}/movies"); - req.AddUrlSegment("keywordId", keywordId.ToString()); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - - SearchContainerWithId resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientLists.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientLists.cs deleted file mode 100644 index baa6e6b..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientLists.cs +++ /dev/null @@ -1,210 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Authentication; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Lists; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetManipulateMediaListAsyncInternal(string listId, int movieId, string method, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - if (string.IsNullOrWhiteSpace(listId)) - throw new ArgumentNullException(nameof(listId)); - - // Movie Id is expected by the API and can not be null - if (movieId <= 0) - throw new ArgumentOutOfRangeException(nameof(movieId)); - - RestRequest req = _client.Create("list/{listId}/{method}"); - req.AddUrlSegment("listId", listId); - req.AddUrlSegment("method", method); - AddSessionId(req, SessionType.UserSession); - - req.SetBody(new { media_id = movieId }); - - using RestResponse response = await req.Post(cancellationToken).ConfigureAwait(false); - - // Status code 12 = "The item/record was updated successfully" - // Status code 13 = "The item/record was deleted successfully" - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Previous code checked for item=null - return item.StatusCode == 12 || item.StatusCode == 13; - } - - /// - /// Retrieve a list by it's id - /// - /// The id of the list you want to retrieve - /// If specified the api will attempt to return a localized result. ex: en,it,es - /// A cancellation token - public async Task GetListAsync(string listId, string language = null, CancellationToken cancellationToken = default) - { - if (string.IsNullOrWhiteSpace(listId)) - throw new ArgumentNullException(nameof(listId)); - - RestRequest req = _client.Create("list/{listId}"); - req.AddUrlSegment("listId", listId); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - GenericList resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - /// - /// Will check if the provided movie id is present in the specified list - /// - /// Id of the list to check in - /// Id of the movie to check for in the list - /// A cancellation token - public async Task GetListIsMoviePresentAsync(string listId, int movieId, CancellationToken cancellationToken = default) - { - if (string.IsNullOrWhiteSpace(listId)) - throw new ArgumentNullException(nameof(listId)); - - if (movieId <= 0) - throw new ArgumentOutOfRangeException(nameof(movieId)); - - RestRequest req = _client.Create("list/{listId}/item_status"); - req.AddUrlSegment("listId", listId); - req.AddParameter("movie_id", movieId.ToString()); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - return (await response.GetDataObject().ConfigureAwait(false)).ItemPresent; - } - - /// - /// Adds a movie to a specified list - /// - /// The id of the list to add the movie to - /// The id of the movie to add - /// A cancellation token - /// True if the method was able to add the movie to the list, will retrun false in case of an issue or when the movie was already added to the list - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task ListAddMovieAsync(string listId, int movieId, CancellationToken cancellationToken = default) - { - return await GetManipulateMediaListAsyncInternal(listId, movieId, "add_item", cancellationToken).ConfigureAwait(false); - } - - /// - /// Clears a list, without confirmation. - /// - /// The id of the list to clear - /// A cancellation token - /// True if the method was able to remove the movie from the list, will retrun false in case of an issue or when the movie was not present in the list - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task ListClearAsync(string listId, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - if (string.IsNullOrWhiteSpace(listId)) - throw new ArgumentNullException(nameof(listId)); - - RestRequest request = _client.Create("list/{listId}/clear"); - request.AddUrlSegment("listId", listId); - request.AddParameter("confirm", "true"); - AddSessionId(request, SessionType.UserSession); - - using RestResponse response = await request.Post(cancellationToken).ConfigureAwait(false); - - // Status code 12 = "The item/record was updated successfully" - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Previous code checked for item=null - return item.StatusCode == 12; - } - - /// - /// Creates a new list for the user associated with the current session - /// - /// The name of the new list - /// Optional description for the list - /// Optional language that might indicate the language of the content in the list - /// A cancellation token - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task ListCreateAsync(string name, string description = "", string language = null, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - if (string.IsNullOrWhiteSpace(name)) - throw new ArgumentNullException(nameof(name)); - - // Description is expected by the API and can not be null - if (string.IsNullOrWhiteSpace(description)) - description = ""; - - RestRequest req = _client.Create("list"); - AddSessionId(req, SessionType.UserSession); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - { - req.SetBody(new { name = name, description = description, language = language }); - - } - else - { - req.SetBody(new { name = name, description = description }); - } - - using RestResponse response = await req.Post(cancellationToken).ConfigureAwait(false); - - return (await response.GetDataObject().ConfigureAwait(false)).ListId; - } - - /// - /// Deletes the specified list that is owned by the user - /// - /// A list id that is owned by the user associated with the current session id - /// A cancellation token - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task ListDeleteAsync(string listId, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - if (string.IsNullOrWhiteSpace(listId)) - throw new ArgumentNullException(nameof(listId)); - - RestRequest req = _client.Create("list/{listId}"); - req.AddUrlSegment("listId", listId); - AddSessionId(req, SessionType.UserSession); - - using RestResponse response = await req.Delete(cancellationToken).ConfigureAwait(false); - - // Status code 13 = success - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Previous code checked for item=null - return item.StatusCode == 13; - } - - /// - /// Removes a movie from the specified list - /// - /// The id of the list to add the movie to - /// The id of the movie to add - /// A cancellation token - /// True if the method was able to remove the movie from the list, will retrun false in case of an issue or when the movie was not present in the list - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task ListRemoveMovieAsync(string listId, int movieId, CancellationToken cancellationToken = default) - { - return await GetManipulateMediaListAsyncInternal(listId, movieId, "remove_item", cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientMovies.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientMovies.cs deleted file mode 100644 index ea7a99f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientMovies.cs +++ /dev/null @@ -1,392 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Net; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Authentication; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Movies; -using TMDbLib.Objects.Reviews; -using TMDbLib.Objects.Search; -using TMDbLib.Rest; -using TMDbLib.Utilities; -using Credits = TMDbLib.Objects.Movies.Credits; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetMovieMethodInternal(int movieId, MovieMethods movieMethod, string dateFormat = null, - string country = null, - string language = null, string includeImageLanguage = null, int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) where T : new() - { - RestRequest req = _client.Create("movie/{movieId}/{method}"); - req.AddUrlSegment("movieId", movieId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("method", movieMethod.GetDescription()); - - if (country != null) - req.AddParameter("country", country); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - if (!string.IsNullOrWhiteSpace(includeImageLanguage)) - req.AddParameter("include_image_language", includeImageLanguage); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (startDate.HasValue) - req.AddParameter("start_date", startDate.Value.ToString("yyyy-MM-dd")); - if (endDate != null) - req.AddParameter("end_date", endDate.Value.ToString("yyyy-MM-dd")); - - T response = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return response; - } - - /// - /// Retrieves all information for a specific movie in relation to the current user account - /// - /// The id of the movie to get the account states for - /// A cancellation token - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task GetMovieAccountStateAsync(int movieId, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest req = _client.Create("movie/{movieId}/{method}"); - req.AddUrlSegment("movieId", movieId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("method", MovieMethods.AccountStates.GetDescription()); - AddSessionId(req, SessionType.UserSession); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - return await response.GetDataObject().ConfigureAwait(false); - } - - public async Task GetMovieAlternativeTitlesAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieAlternativeTitlesAsync(movieId, DefaultCountry, cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieAlternativeTitlesAsync(int movieId, string country, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal(movieId, MovieMethods.AlternativeTitles, country: country, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieAsync(int movieId, MovieMethods extraMethods = MovieMethods.Undefined, CancellationToken cancellationToken = default) - { - return await GetMovieAsync(movieId, DefaultLanguage, null, extraMethods, cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieAsync(string imdbId, MovieMethods extraMethods = MovieMethods.Undefined, CancellationToken cancellationToken = default) - { - return await GetMovieAsync(imdbId, DefaultLanguage, null, extraMethods, cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieAsync(int movieId, string language, string includeImageLanguage = null, MovieMethods extraMethods = MovieMethods.Undefined, CancellationToken cancellationToken = default) - { - return await GetMovieAsync(movieId.ToString(CultureInfo.InvariantCulture), language, includeImageLanguage, extraMethods, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieves a movie by its IMDb Id - /// - /// The IMDb id of the movie OR the TMDb id as string - /// Language to localize the results in. - /// If specified the api will attempt to return localized image results eg. en,it,es. - /// A list of additional methods to execute for this req as enum flags - /// A cancellation token - /// The reqed movie or null if it could not be found - /// Requires a valid user session when specifying the extra method 'AccountStates' flag - /// Thrown when the current client object doens't have a user session assigned, see remarks. - public async Task GetMovieAsync(string imdbId, string language, string includeImageLanguage = null, MovieMethods extraMethods = MovieMethods.Undefined, CancellationToken cancellationToken = default) - { - if (extraMethods.HasFlag(MovieMethods.AccountStates)) - RequireSessionId(SessionType.UserSession); - - RestRequest req = _client.Create("movie/{movieId}"); - req.AddUrlSegment("movieId", imdbId); - if (extraMethods.HasFlag(MovieMethods.AccountStates)) - AddSessionId(req, SessionType.UserSession); - - if (language != null) - req.AddParameter("language", language); - - includeImageLanguage ??= DefaultImageLanguage; - if (includeImageLanguage != null) - req.AddParameter("include_image_language", includeImageLanguage); - - string appends = string.Join(",", - Enum.GetValues(typeof(MovieMethods)) - .OfType() - .Except(new[] { MovieMethods.Undefined }) - .Where(s => extraMethods.HasFlag(s)) - .Select(s => s.GetDescription())); - - if (appends != string.Empty) - req.AddParameter("append_to_response", appends); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - if (!response.IsValid) - return null; - - Movie item = await response.GetDataObject().ConfigureAwait(false); - - // Patch up data, so that the end user won't notice that we share objects between req-types. - if (item.Videos != null) - item.Videos.Id = item.Id; - - if (item.AlternativeTitles != null) - item.AlternativeTitles.Id = item.Id; - - if (item.Credits != null) - item.Credits.Id = item.Id; - - if (item.Releases != null) - item.Releases.Id = item.Id; - - if (item.Keywords != null) - item.Keywords.Id = item.Id; - - if (item.Translations != null) - item.Translations.Id = item.Id; - - if (item.AccountStates != null) - item.AccountStates.Id = item.Id; - - if (item.ExternalIds != null) - item.ExternalIds.Id = item.Id; - - // Overview is the only field that is HTML encoded from the source. - item.Overview = WebUtility.HtmlDecode(item.Overview); - - return item; - } - - public async Task GetMovieCreditsAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal(movieId, MovieMethods.Credits, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns an object that contains all known exteral id's for the movie related to the specified TMDB id. - /// - /// The TMDb id of the target movie. - /// A cancellation token - public async Task GetMovieExternalIdsAsync(int id, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal(id, MovieMethods.ExternalIds, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieImagesAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieImagesAsync(movieId, DefaultLanguage, null, cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieImagesAsync(int movieId, string language, string includeImageLanguage = null, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal(movieId, MovieMethods.Images, language: language, includeImageLanguage: includeImageLanguage, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieKeywordsAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal(movieId, MovieMethods.Keywords, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieLatestAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("movie/latest"); - using RestResponse resp = await req.Get(cancellationToken).ConfigureAwait(false); - - Movie item = await resp.GetDataObject().ConfigureAwait(false); - - // Overview is the only field that is HTML encoded from the source. - if (item != null) - item.Overview = WebUtility.HtmlDecode(item.Overview); - - return item; - } - - public async Task> GetMovieListsAsync(int movieId, int page = 0, CancellationToken cancellationToken = default) - { - return await GetMovieListsAsync(movieId, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieListsAsync(int movieId, string language, int page = 0, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal>(movieId, MovieMethods.Lists, page: page, language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieRecommendationsAsync(int id, int page = 0, CancellationToken cancellationToken = default) - { - return await GetMovieRecommendationsAsync(id, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieRecommendationsAsync(int id, string language, int page = 0, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal>(id, MovieMethods.Recommendations, language: language, page: page, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieNowPlayingListAsync(string language = null, int page = 0, string region = null, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("movie/now_playing"); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (language != null) - req.AddParameter("language", language); - if (region != null) - req.AddParameter("region", region); - - SearchContainerWithDates resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetMoviePopularListAsync(string language = null, int page = 0, string region = null, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("movie/popular"); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (language != null) - req.AddParameter("language", language); - if (region != null) - req.AddParameter("region", region); - - SearchContainer resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetMovieReleaseDatesAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal>(movieId, MovieMethods.ReleaseDates, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task GetMovieReleasesAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal(movieId, MovieMethods.Releases, dateFormat: "yyyy-MM-dd", cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieReviewsAsync(int movieId, int page = 0, CancellationToken cancellationToken = default) - { - return await GetMovieReviewsAsync(movieId, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieReviewsAsync(int movieId, string language, int page = 0, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal>(movieId, MovieMethods.Reviews, page: page, language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieSimilarAsync(int movieId, int page = 0, CancellationToken cancellationToken = default) - { - return await GetMovieSimilarAsync(movieId, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieSimilarAsync(int movieId, string language, int page = 0, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal>(movieId, MovieMethods.Similar, page: page, language: language, dateFormat: "yyyy-MM-dd", cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieTopRatedListAsync(string language = null, int page = 0, string region = null, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("movie/top_rated"); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (language != null) - req.AddParameter("language", language); - if (region != null) - req.AddParameter("region", region); - - SearchContainer resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task GetMovieTranslationsAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal(movieId, MovieMethods.Translations, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetMovieUpcomingListAsync(string language = null, int page = 0, string region = null, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("movie/upcoming"); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (language != null) - req.AddParameter("language", language); - if (region != null) - req.AddParameter("region", region); - - SearchContainerWithDates resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetMovieVideosAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal>(movieId, MovieMethods.Videos, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task>> GetMovieWatchProvidersAsync(int movieId, CancellationToken cancellationToken = default) - { - return await GetMovieMethodInternal>>(movieId, MovieMethods.WatchProviders, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task MovieRemoveRatingAsync(int movieId, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest req = _client.Create("movie/{movieId}/rating"); - req.AddUrlSegment("movieId", movieId.ToString(CultureInfo.InvariantCulture)); - AddSessionId(req); - - using RestResponse response = await req.Delete(cancellationToken).ConfigureAwait(false); - - // status code 13 = "The item/record was deleted successfully." - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Previous code checked for item=null - return item != null && item.StatusCode == 13; - } - - /// - /// Change the rating of a specified movie. - /// - /// The id of the movie to rate - /// The rating you wish to assign to the specified movie. Value needs to be between 0.5 and 10 and must use increments of 0.5. Ex. using 7.1 will not work and return false. - /// A cancellation token - /// True if the the movie's rating was successfully updated, false if not - /// Requires a valid guest or user session - /// Thrown when the current client object doens't have a guest or user session assigned. - public async Task MovieSetRatingAsync(int movieId, double rating, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest req = _client.Create("movie/{movieId}/rating"); - req.AddUrlSegment("movieId", movieId.ToString(CultureInfo.InvariantCulture)); - AddSessionId(req); - - req.SetBody(new { value = rating }); - - using RestResponse response = await req.Post(cancellationToken).ConfigureAwait(false); - - // status code 1 = "Success" - // status code 12 = "The item/record was updated successfully" - Used when an item was previously rated by the user - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Previous code checked for item=null - return item.StatusCode == 1 || item.StatusCode == 12; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientNetworks.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientNetworks.cs deleted file mode 100644 index 2902560..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientNetworks.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.General; -using TMDbLib.Objects.TvShows; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - /// - /// Retrieves a network by it's TMDb id. A network is a distributor of media content ex. HBO, AMC - /// - /// The id of the network object to retrieve - /// A cancellation token - public async Task GetNetworkAsync(int networkId, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("network/{networkId}"); - req.AddUrlSegment("networkId", networkId.ToString(CultureInfo.InvariantCulture)); - - Network response = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return response; - } - - /// - /// Gets the logos of a network given a TMDb id - /// - /// The TMDb id of the network - /// A cancellation token - public async Task GetNetworkImagesAsync(int networkId, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("network/{networkId}/images"); - req.AddUrlSegment("networkId", networkId.ToString(CultureInfo.InvariantCulture)); - - NetworkLogos response = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return response; - } - - /// - /// Gets the alternative names of a network given a TMDb id - /// - /// The TMDb id of the network - /// A cancellation token - public async Task GetNetworkAlternativeNamesAsync(int networkId, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("network/{networkId}/alternative_names"); - req.AddUrlSegment("networkId", networkId.ToString(CultureInfo.InvariantCulture)); - - AlternativeNames response = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return response; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientPeople.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientPeople.cs deleted file mode 100644 index 57ef0c0..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientPeople.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.General; -using TMDbLib.Objects.People; -using TMDbLib.Rest; -using TMDbLib.Utilities; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetPersonMethodInternal(int personId, PersonMethods personMethod, string dateFormat = null, string country = null, string language = null, - int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default) where T : new() - { - RestRequest req = _client.Create("person/{personId}/{method}"); - req.AddUrlSegment("personId", personId.ToString()); - req.AddUrlSegment("method", personMethod.GetDescription()); - - // TODO: Dateformat? - //if (dateFormat != null) - // req.DateFormat = dateFormat; - - if (country != null) - req.AddParameter("country", country); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (startDate.HasValue) - req.AddParameter("startDate", startDate.Value.ToString("yyyy-MM-dd")); - if (endDate != null) - req.AddParameter("endDate", endDate.Value.ToString("yyyy-MM-dd")); - - T resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task GetLatestPersonAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("person/latest"); - - // TODO: Dateformat? - //req.DateFormat = "yyyy-MM-dd"; - - Person resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task GetPersonAsync(int personId, PersonMethods extraMethods = PersonMethods.Undefined, - CancellationToken cancellationToken = default) - { - return await GetPersonAsync(personId, DefaultLanguage, extraMethods, cancellationToken).ConfigureAwait(false); - } - - public async Task GetPersonAsync(int personId, string language, PersonMethods extraMethods = PersonMethods.Undefined, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("person/{personId}"); - req.AddUrlSegment("personId", personId.ToString()); - - if (language != null) - req.AddParameter("language", language); - - string appends = string.Join(",", - Enum.GetValues(typeof(PersonMethods)) - .OfType() - .Except(new[] { PersonMethods.Undefined }) - .Where(s => extraMethods.HasFlag(s)) - .Select(s => s.GetDescription())); - - if (appends != string.Empty) - req.AddParameter("append_to_response", appends); - - // TODO: Dateformat? - //req.DateFormat = "yyyy-MM-dd"; - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - if (!response.IsValid) - return null; - - Person item = await response.GetDataObject().ConfigureAwait(false); - - // Patch up data, so that the end user won't notice that we share objects between request-types. - if (item != null) - { - if (item.Images != null) - item.Images.Id = item.Id; - - if (item.TvCredits != null) - item.TvCredits.Id = item.Id; - - if (item.MovieCredits != null) - item.MovieCredits.Id = item.Id; - } - - return item; - } - - public async Task GetPersonExternalIdsAsync(int personId, CancellationToken cancellationToken = default) - { - return await GetPersonMethodInternal(personId, PersonMethods.ExternalIds, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task GetPersonImagesAsync(int personId, CancellationToken cancellationToken = default) - { - return await GetPersonMethodInternal(personId, PersonMethods.Images, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetPersonListAsync(PersonListType type, int page = 0, CancellationToken cancellationToken = default) - { - RestRequest req; - switch (type) - { - case PersonListType.Popular: - req = _client.Create("person/popular"); - break; - - default: - throw new ArgumentOutOfRangeException(nameof(type)); - } - - if (page >= 1) - req.AddParameter("page", page.ToString()); - - // TODO: Dateformat? - //req.DateFormat = "yyyy-MM-dd"; - - SearchContainer resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task GetPersonMovieCreditsAsync(int personId, CancellationToken cancellationToken = default) - { - return await GetPersonMovieCreditsAsync(personId, DefaultLanguage, cancellationToken).ConfigureAwait(false); - } - - public async Task GetPersonMovieCreditsAsync(int personId, string language, CancellationToken cancellationToken = default) - { - return await GetPersonMethodInternal(personId, PersonMethods.MovieCredits, language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetPersonTaggedImagesAsync(int personId, int page, CancellationToken cancellationToken = default) - { - return await GetPersonTaggedImagesAsync(personId, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetPersonTaggedImagesAsync(int personId, string language, int page, CancellationToken cancellationToken = default) - { - return await GetPersonMethodInternal>(personId, PersonMethods.TaggedImages, language: language, page: page, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task GetPersonTvCreditsAsync(int personId, CancellationToken cancellationToken = default) - { - return await GetPersonTvCreditsAsync(personId, DefaultLanguage, cancellationToken).ConfigureAwait(false); - } - - public async Task GetPersonTvCreditsAsync(int personId, string language, CancellationToken cancellationToken = default) - { - return await GetPersonMethodInternal(personId, PersonMethods.TvCredits, language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientReviews.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientReviews.cs deleted file mode 100644 index eadeece..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientReviews.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Reviews; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - public async Task GetReviewAsync(string reviewId, CancellationToken cancellationToken = default) - { - RestRequest request = _client.Create("review/{reviewId}"); - request.AddUrlSegment("reviewId", reviewId); - - // TODO: Dateformat? - //request.DateFormat = "yyyy-MM-dd"; - - Review resp = await request.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientSearch.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientSearch.cs deleted file mode 100644 index 124d972..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientSearch.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Search; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task SearchMethodInternal(string method, string query, int page, string language = null, bool? includeAdult = null, int year = 0, string dateFormat = null, string region = null, int primaryReleaseYear = 0, int firstAirDateYear = 0, CancellationToken cancellationToken = default) where T : new() - { - RestRequest req = _client.Create("search/{method}"); - req.AddUrlSegment("method", method); - req.AddParameter("query", query); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - if (year >= 1) - req.AddParameter("year", year.ToString()); - if (includeAdult.HasValue) - req.AddParameter("include_adult", includeAdult.Value ? "true" : "false"); - - // TODO: Dateformat? - //if (dateFormat != null) - // req.DateFormat = dateFormat; - - if (!string.IsNullOrWhiteSpace(region)) - req.AddParameter("region", region); - - if (primaryReleaseYear >= 1) - req.AddParameter("primary_release_year", primaryReleaseYear.ToString()); - if (firstAirDateYear >= 1) - req.AddParameter("first_air_date_year", firstAirDateYear.ToString()); - - T resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> SearchCollectionAsync(string query, int page = 0, CancellationToken cancellationToken = default) - { - return await SearchCollectionAsync(query, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchCollectionAsync(string query, string language, int page = 0, CancellationToken cancellationToken = default) - { - return await SearchMethodInternal>("collection", query, page, language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchCompanyAsync(string query, int page = 0, CancellationToken cancellationToken = default) - { - return await SearchMethodInternal>("company", query, page, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchKeywordAsync(string query, int page = 0, CancellationToken cancellationToken = default) - { - return await SearchMethodInternal>("keyword", query, page, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - [Obsolete("20200701 No longer present in public API")] - public async Task> SearchListAsync(string query, int page = 0, bool includeAdult = false, CancellationToken cancellationToken = default) - { - return await SearchMethodInternal>("list", query, page, includeAdult: includeAdult, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchMovieAsync(string query, int page = 0, bool includeAdult = false, int year = 0, string region = null, int primaryReleaseYear = 0, CancellationToken cancellationToken = default) - { - return await SearchMovieAsync(query, DefaultLanguage, page, includeAdult, year, region, primaryReleaseYear, cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchMovieAsync(string query, string language, int page = 0, bool includeAdult = false, int year = 0, string region = null, int primaryReleaseYear = 0, CancellationToken cancellationToken = default) - { - return await SearchMethodInternal>("movie", query, page, language, includeAdult, year, "yyyy-MM-dd", region, primaryReleaseYear, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchMultiAsync(string query, int page = 0, bool includeAdult = false, int year = 0, string region = null, CancellationToken cancellationToken = default) - { - return await SearchMultiAsync(query, DefaultLanguage, page, includeAdult, year, region, cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchMultiAsync(string query, string language, int page = 0, bool includeAdult = false, int year = 0, string region = null, CancellationToken cancellationToken = default) - { - return await SearchMethodInternal>("multi", query, page, language, includeAdult, year, "yyyy-MM-dd", region, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchPersonAsync(string query, int page = 0, bool includeAdult = false, string region = null, CancellationToken cancellationToken = default) - { - return await SearchPersonAsync(query, DefaultLanguage, page, includeAdult, region, cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchPersonAsync(string query, string language, int page = 0, bool includeAdult = false, string region = null, CancellationToken cancellationToken = default) - { - return await SearchMethodInternal>("person", query, page, language, includeAdult, region: region, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchTvShowAsync(string query, int page = 0, bool includeAdult = false, int firstAirDateYear = 0, CancellationToken cancellationToken = default) - { - return await SearchTvShowAsync(query, DefaultLanguage, page, includeAdult, firstAirDateYear, cancellationToken).ConfigureAwait(false); - } - - public async Task> SearchTvShowAsync(string query, string language, int page = 0, bool includeAdult = false, int firstAirDateYear = 0, CancellationToken cancellationToken = default) - { - return await SearchMethodInternal>("tv", query, page, language, includeAdult, firstAirDateYear: firstAirDateYear, cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTrending.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTrending.cs deleted file mode 100644 index f0134a6..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTrending.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Search; -using TMDbLib.Objects.Trending; -using TMDbLib.Rest; -using TMDbLib.Utilities; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - public async Task> GetTrendingMoviesAsync(TimeWindow timeWindow, int page = 0, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("trending/movie/{time_window}"); - req.AddUrlSegment("time_window", timeWindow.GetDescription()); - - if (page >= 1) - req.AddQueryString("page", page.ToString()); - - SearchContainer resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetTrendingTvAsync(TimeWindow timeWindow, int page = 0, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("trending/tv/{time_window}"); - req.AddUrlSegment("time_window", timeWindow.GetDescription()); - - if (page >= 1) - req.AddQueryString("page", page.ToString()); - - SearchContainer resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task> GetTrendingPeopleAsync(TimeWindow timeWindow, int page = 0, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("trending/person/{time_window}"); - req.AddUrlSegment("time_window", timeWindow.GetDescription()); - - if (page >= 1) - req.AddQueryString("page", page.ToString()); - - SearchContainer resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvEpisodeGroups.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvEpisodeGroups.cs deleted file mode 100644 index 0cc070d..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvEpisodeGroups.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.TvShows; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - /// - /// Retrieve a collection of tv episode groups by id - /// - /// Episode group id - /// If specified the api will attempt to return a localized result. ex: en,it,es - /// A cancellation token - /// The requested collection of tv episode groups - public async Task GetTvEpisodeGroupsAsync(string id, string language = null, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("tv/episode_group/{id}"); - req.AddUrlSegment("id", id); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - if (!response.IsValid) - return null; - - return await response.GetDataObject().ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvEpisodes.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvEpisodes.cs deleted file mode 100644 index f29a48b..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvEpisodes.cs +++ /dev/null @@ -1,219 +0,0 @@ -using System; -using System.Globalization; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Authentication; -using TMDbLib.Objects.General; -using TMDbLib.Objects.TvShows; -using TMDbLib.Rest; -using TMDbLib.Utilities; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetTvEpisodeMethodInternal(int tvShowId, int seasonNumber, int episodeNumber, TvEpisodeMethods tvShowMethod, string dateFormat = null, string language = null, CancellationToken cancellationToken = default) where T : new() - { - RestRequest req = _client.Create("tv/{id}/season/{season_number}/episode/{episode_number}/{method}"); - req.AddUrlSegment("id", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("season_number", seasonNumber.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("episode_number", episodeNumber.ToString(CultureInfo.InvariantCulture)); - - req.AddUrlSegment("method", tvShowMethod.GetDescription()); - - // TODO: Dateformat? - //if (dateFormat != null) - // req.DateFormat = dateFormat; - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - T resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - public async Task GetTvEpisodeAccountStateAsync(int tvShowId, int seasonNumber, int episodeNumber, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest req = _client.Create("tv/{id}/season/{season_number}/episode/{episode_number}/account_states"); - req.AddUrlSegment("id", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("season_number", seasonNumber.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("episode_number", episodeNumber.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("method", TvEpisodeMethods.AccountStates.GetDescription()); - AddSessionId(req, SessionType.UserSession); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - return await response.GetDataObject().ConfigureAwait(false); - } - - /// - /// Retrieve a specific episode using TMDb id of the associated tv show. - /// - /// TMDb id of the tv show the desired episode belongs to. - /// The season number of the season the episode belongs to. Note use 0 for specials. - /// The episode number of the episode you want to retrieve. - /// Enum flags indicating any additional data that should be fetched in the same request. - /// If specified the api will attempt to return a localized result. ex: en,it,es - /// If specified the api will attempt to return localized image results eg. en,it,es. - /// A cancellation token - public async Task GetTvEpisodeAsync(int tvShowId, int seasonNumber, int episodeNumber, TvEpisodeMethods extraMethods = TvEpisodeMethods.Undefined, string language = null, string includeImageLanguage = null, CancellationToken cancellationToken = default) - { - if (extraMethods.HasFlag(TvEpisodeMethods.AccountStates)) - RequireSessionId(SessionType.UserSession); - - RestRequest req = _client.Create("tv/{id}/season/{season_number}/episode/{episode_number}"); - req.AddUrlSegment("id", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("season_number", seasonNumber.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("episode_number", episodeNumber.ToString(CultureInfo.InvariantCulture)); - - if (extraMethods.HasFlag(TvEpisodeMethods.AccountStates)) - AddSessionId(req, SessionType.UserSession); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - includeImageLanguage ??= DefaultImageLanguage; - if (!string.IsNullOrWhiteSpace(includeImageLanguage)) - req.AddParameter("include_image_language", includeImageLanguage); - - string appends = string.Join(",", - Enum.GetValues(typeof(TvEpisodeMethods)) - .OfType() - .Except(new[] { TvEpisodeMethods.Undefined }) - .Where(s => extraMethods.HasFlag(s)) - .Select(s => s.GetDescription())); - - if (appends != string.Empty) - req.AddParameter("append_to_response", appends); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - if (!response.IsValid) - return null; - - TvEpisode item = await response.GetDataObject().ConfigureAwait(false); - - // No data to patch up so return - if (item == null) - return null; - - // Patch up data, so that the end user won't notice that we share objects between request-types. - if (item.Videos != null) - item.Videos.Id = item.Id ?? 0; - - if (item.Credits != null) - item.Credits.Id = item.Id ?? 0; - - if (item.Images != null) - item.Images.Id = item.Id ?? 0; - - if (item.ExternalIds != null) - item.ExternalIds.Id = item.Id ?? 0; - - return item; - } - - public async Task> GetTvEpisodesScreenedTheatricallyAsync(int tvShowId, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("tv/{tv_id}/screened_theatrically"); - req.AddUrlSegment("tv_id", tvShowId.ToString(CultureInfo.InvariantCulture)); - - return await req.GetOfT>(cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns a credits object for the specified episode. - /// - /// The TMDb id of the target tv show. - /// The season number of the season the episode belongs to. Note use 0 for specials. - /// The episode number of the episode you want to retrieve information for. - /// If specified the api will attempt to return a localized result. ex: en,it,es - /// A cancellation token - public async Task GetTvEpisodeCreditsAsync(int tvShowId, int seasonNumber, int episodeNumber, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvEpisodeMethodInternal(tvShowId, seasonNumber, episodeNumber, TvEpisodeMethods.Credits, dateFormat: "yyyy-MM-dd", language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns an object that contains all known exteral id's for the specified episode. - /// - /// The TMDb id of the target tv show. - /// The season number of the season the episode belongs to. Note use 0 for specials. - /// The episode number of the episode you want to retrieve information for. - /// A cancellation token - public async Task GetTvEpisodeExternalIdsAsync(int tvShowId, int seasonNumber, int episodeNumber, CancellationToken cancellationToken = default) - { - return await GetTvEpisodeMethodInternal(tvShowId, seasonNumber, episodeNumber, TvEpisodeMethods.ExternalIds, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieves all images all related to the season of specified episode. - /// - /// The TMDb id of the target tv show. - /// The season number of the season the episode belongs to. Note use 0 for specials. - /// The episode number of the episode you want to retrieve information for. - /// - /// If specified the api will attempt to return a localized result. ex: en,it,es. - /// For images this means that the image might contain language specifc text - /// - /// A cancellation token - public async Task GetTvEpisodeImagesAsync(int tvShowId, int seasonNumber, int episodeNumber, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvEpisodeMethodInternal(tvShowId, seasonNumber, episodeNumber, TvEpisodeMethods.Images, language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvEpisodeVideosAsync(int tvShowId, int seasonNumber, int episodeNumber, CancellationToken cancellationToken = default) - { - return await GetTvEpisodeMethodInternal>(tvShowId, seasonNumber, episodeNumber, TvEpisodeMethods.Videos, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task TvEpisodeRemoveRatingAsync(int tvShowId, int seasonNumber, int episodeNumber, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest req = _client.Create("tv/{id}/season/{season_number}/episode/{episode_number}/rating"); - req.AddUrlSegment("id", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("season_number", seasonNumber.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("episode_number", episodeNumber.ToString(CultureInfo.InvariantCulture)); - - AddSessionId(req); - - using RestResponse response = await req.Delete(cancellationToken).ConfigureAwait(false); - - // status code 13 = "The item/record was deleted successfully." - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Original code had a check for item=null - return item.StatusCode == 13; - } - - public async Task TvEpisodeSetRatingAsync(int tvShowId, int seasonNumber, int episodeNumber, double rating, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest req = _client.Create("tv/{id}/season/{season_number}/episode/{episode_number}/rating"); - req.AddUrlSegment("id", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("season_number", seasonNumber.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("episode_number", episodeNumber.ToString(CultureInfo.InvariantCulture)); - - AddSessionId(req); - - req.SetBody(new { value = rating }); - - using RestResponse response = await req.Post(cancellationToken).ConfigureAwait(false); - - // status code 1 = "Success" - // status code 12 = "The item/record was updated successfully" - Used when an item was previously rated by the user - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Original code had a check for item=null - return item.StatusCode == 1 || item.StatusCode == 12; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvSeasons.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvSeasons.cs deleted file mode 100644 index f793888..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvSeasons.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.Globalization; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Authentication; -using TMDbLib.Objects.General; -using TMDbLib.Objects.TvShows; -using TMDbLib.Rest; -using TMDbLib.Utilities; -using Credits = TMDbLib.Objects.TvShows.Credits; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetTvSeasonMethodInternal(int tvShowId, int seasonNumber, TvSeasonMethods tvShowMethod, string dateFormat = null, string language = null, CancellationToken cancellationToken = default) where T : new() - { - RestRequest req = _client.Create("tv/{id}/season/{season_number}/{method}"); - req.AddUrlSegment("id", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("season_number", seasonNumber.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("method", tvShowMethod.GetDescription()); - - // TODO: Dateformat? - //if (dateFormat != null) - // req.DateFormat = dateFormat; - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - T response = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return response; - } - - public async Task> GetTvSeasonAccountStateAsync(int tvShowId, int seasonNumber, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest req = _client.Create("tv/{id}/season/{season_number}/account_states"); - req.AddUrlSegment("id", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("season_number", seasonNumber.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("method", TvEpisodeMethods.AccountStates.GetDescription()); - AddSessionId(req, SessionType.UserSession); - - using RestResponse> response = await req.Get>(cancellationToken).ConfigureAwait(false); - - return await response.GetDataObject().ConfigureAwait(false); - } - - /// - /// Retrieve a season for a specifc tv Show by id. - /// - /// TMDb id of the tv show the desired season belongs to. - /// The season number of the season you want to retrieve. Note use 0 for specials. - /// Enum flags indicating any additional data that should be fetched in the same request. - /// If specified the api will attempt to return a localized result. ex: en,it,es - /// If specified the api will attempt to return localized image results eg. en,it,es. - /// A cancellation token - /// The requested season for the specified tv show - public async Task GetTvSeasonAsync(int tvShowId, int seasonNumber, TvSeasonMethods extraMethods = TvSeasonMethods.Undefined, string language = null, string includeImageLanguage = null, CancellationToken cancellationToken = default) - { - if (extraMethods.HasFlag(TvSeasonMethods.AccountStates)) - RequireSessionId(SessionType.UserSession); - - RestRequest req = _client.Create("tv/{id}/season/{season_number}"); - req.AddUrlSegment("id", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("season_number", seasonNumber.ToString(CultureInfo.InvariantCulture)); - - if (extraMethods.HasFlag(TvSeasonMethods.AccountStates)) - AddSessionId(req, SessionType.UserSession); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - includeImageLanguage ??= DefaultImageLanguage; - if (!string.IsNullOrWhiteSpace(includeImageLanguage)) - req.AddParameter("include_image_language", includeImageLanguage); - - string appends = string.Join(",", - Enum.GetValues(typeof(TvSeasonMethods)) - .OfType() - .Except(new[] { TvSeasonMethods.Undefined }) - .Where(s => extraMethods.HasFlag(s)) - .Select(s => s.GetDescription())); - - if (appends != string.Empty) - req.AddParameter("append_to_response", appends); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - if (!response.IsValid) - return null; - - TvSeason item = await response.GetDataObject().ConfigureAwait(false); - - // Nothing to patch up - if (item == null) - return null; - - if (item.Images != null) - item.Images.Id = item.Id ?? 0; - - if (item.Credits != null) - item.Credits.Id = item.Id ?? 0; - - if (item.ExternalIds != null) - item.ExternalIds.Id = item.Id ?? 0; - - if (item.AccountStates != null) - item.AccountStates.Id = item.Id ?? 0; - - if (item.Videos != null) - item.Videos.Id = item.Id ?? 0; - - return item; - } - - /// - /// Returns a credits object for the season of the tv show associated with the provided TMDb id. - /// - /// The TMDb id of the target tv show. - /// The season number of the season you want to retrieve information for. Note use 0 for specials. - /// If specified the api will attempt to return a localized result. ex: en,it,es - /// A cancellation token - public async Task GetTvSeasonCreditsAsync(int tvShowId, int seasonNumber, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvSeasonMethodInternal(tvShowId, seasonNumber, TvSeasonMethods.Credits, dateFormat: "yyyy-MM-dd", language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns an object that contains all known exteral id's for the season of the tv show related to the specified TMDB id. - /// - /// The TMDb id of the target tv show. - /// The season number of the season you want to retrieve information for. Note use 0 for specials. - /// A cancellation token - public async Task GetTvSeasonExternalIdsAsync(int tvShowId, int seasonNumber, CancellationToken cancellationToken = default) - { - return await GetTvSeasonMethodInternal(tvShowId, seasonNumber, TvSeasonMethods.ExternalIds, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieves all images all related to the season of specified tv show. - /// - /// The TMDb id of the target tv show. - /// The season number of the season you want to retrieve information for. Note use 0 for specials. - /// - /// If specified the api will attempt to return a localized result. ex: en,it,es. - /// For images this means that the image might contain language specifc text - /// - /// A cancellation token - public async Task GetTvSeasonImagesAsync(int tvShowId, int seasonNumber, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvSeasonMethodInternal(tvShowId, seasonNumber, TvSeasonMethods.Images, language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvSeasonVideosAsync(int tvShowId, int seasonNumber, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvSeasonMethodInternal>(tvShowId, seasonNumber, TvSeasonMethods.Videos, language: language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvShows.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvShows.cs deleted file mode 100644 index 1f8eb8a..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientTvShows.cs +++ /dev/null @@ -1,377 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.Authentication; -using TMDbLib.Objects.Changes; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Reviews; -using TMDbLib.Objects.Search; -using TMDbLib.Objects.TvShows; -using TMDbLib.Rest; -using TMDbLib.Utilities; -using Credits = TMDbLib.Objects.TvShows.Credits; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - private async Task GetTvShowMethodInternal(int id, TvShowMethods tvShowMethod, string dateFormat = null, string language = null, string includeImageLanguage = null, int page = 0, CancellationToken cancellationToken = default) where T : new() - { - RestRequest req = _client.Create("tv/{id}/{method}"); - req.AddUrlSegment("id", id.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("method", tvShowMethod.GetDescription()); - - // TODO: Dateformat? - //if (dateFormat != null) - // req.DateFormat = dateFormat; - - if (page > 0) - req.AddParameter("page", page.ToString()); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - includeImageLanguage ??= DefaultImageLanguage; - if (!string.IsNullOrWhiteSpace(includeImageLanguage)) - req.AddParameter("include_image_language", includeImageLanguage); - - T resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - private async Task> GetTvShowListInternal(int page, string language, string tvShowListType, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("tv/" + tvShowListType); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - if (page >= 1) - req.AddParameter("page", page.ToString()); - - SearchContainer response = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return response; - } - - public async Task GetLatestTvShowAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("tv/latest"); - - TvShow resp = await req.GetOfT(cancellationToken).ConfigureAwait(false); - - return resp; - } - - /// - /// Retrieves all information for a specific tv show in relation to the current user account - /// - /// The id of the tv show to get the account states for - /// A cancellation token - /// Requires a valid user session - /// Thrown when the current client object doens't have a user session assigned. - public async Task GetTvShowAccountStateAsync(int tvShowId, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.UserSession); - - RestRequest req = _client.Create("tv/{tvShowId}/{method}"); - req.AddUrlSegment("tvShowId", tvShowId.ToString(CultureInfo.InvariantCulture)); - req.AddUrlSegment("method", TvShowMethods.AccountStates.GetDescription()); - AddSessionId(req, SessionType.UserSession); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - return await response.GetDataObject().ConfigureAwait(false); - } - - public async Task> GetTvShowAlternativeTitlesAsync(int id, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal>(id, TvShowMethods.AlternativeTitles, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieve a tv Show by id. - /// - /// TMDb id of the tv show to retrieve. - /// Enum flags indicating any additional data that should be fetched in the same request. - /// If specified the api will attempt to return a localized result. ex: en,it,es. - /// If specified the api will attempt to return localized image results eg. en,it,es. - /// A cancellation token - /// The requested Tv Show - public async Task GetTvShowAsync(int id, TvShowMethods extraMethods = TvShowMethods.Undefined, string language = null, string includeImageLanguage = null, CancellationToken cancellationToken = default) - { - if (extraMethods.HasFlag(TvShowMethods.AccountStates)) - RequireSessionId(SessionType.UserSession); - - RestRequest req = _client.Create("tv/{id}"); - req.AddUrlSegment("id", id.ToString(CultureInfo.InvariantCulture)); - - if (extraMethods.HasFlag(TvShowMethods.AccountStates)) - AddSessionId(req, SessionType.UserSession); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - if (!string.IsNullOrWhiteSpace(includeImageLanguage)) - req.AddParameter("include_image_language", includeImageLanguage); - - string appends = string.Join(",", - Enum.GetValues(typeof(TvShowMethods)) - .OfType() - .Except(new[] { TvShowMethods.Undefined }) - .Where(s => extraMethods.HasFlag(s)) - .Select(s => s.GetDescription())); - - if (appends != string.Empty) - req.AddParameter("append_to_response", appends); - - using RestResponse response = await req.Get(cancellationToken).ConfigureAwait(false); - - if (!response.IsValid) - return null; - - TvShow item = await response.GetDataObject().ConfigureAwait(false); - - // No data to patch up so return - if (item == null) - return null; - - // Patch up data, so that the end user won't notice that we share objects between request-types. - if (item.Translations != null) - item.Translations.Id = id; - - if (item.AccountStates != null) - item.AccountStates.Id = id; - - if (item.Recommendations != null) - item.Recommendations.Id = id; - - if (item.ExternalIds != null) - item.ExternalIds.Id = id; - - return item; - } - - public async Task GetTvShowChangesAsync(int id, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal(id, TvShowMethods.Changes, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvShowContentRatingsAsync(int id, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal>(id, TvShowMethods.ContentRatings, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns a credits object for the tv show associated with the provided TMDb id. - /// - /// The TMDb id of the target tv show. - /// If specified the api will attempt to return a localized result. ex: en,it,es - /// A cancellation token - public async Task GetTvShowCreditsAsync(int id, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal(id, TvShowMethods.Credits, "yyyy-MM-dd", language, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns a credits object for the aggragation of tv show associated with the provided TMDb id. - /// - /// The TMDb id of the target tv show. - /// If specified the api will attempt to return a localized result. ex: en,it,es - /// A cancellation token - /// - public async Task GetAggregateCredits(int id, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal(id, TvShowMethods.CreditsAggregate, language: language, page: 0, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns an object that contains all known exteral id's for the tv show related to the specified TMDB id. - /// - /// The TMDb id of the target tv show. - /// A cancellation token - public async Task GetTvShowExternalIdsAsync(int id, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal(id, TvShowMethods.ExternalIds, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieves all images all related to the specified tv show. - /// - /// The TMDb id of the target tv show. - /// - /// If specified the api will attempt to return a localized result. ex: en,it,es. - /// For images this means that the image might contain language specifc text - /// - /// If you want to include a fallback language (especially useful for backdrops) you can use the include_image_language parameter. This should be a comma separated value like so: include_image_language=en,null. - /// A cancellation token - public async Task GetTvShowImagesAsync(int id, string language = null, string includeImageLanguage = null, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal(id, TvShowMethods.Images, language: language, includeImageLanguage: includeImageLanguage, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvShowReviewsAsync(int id, string language = null, int page = 0, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal>(id, TvShowMethods.Reviews, language: language, page: page, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvShowKeywordsAsync(int id, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal>(id, TvShowMethods.Keywords, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Fetches a dynamic list of TV Shows - /// - /// Type of list to fetch - /// Page - /// Only relevant for list type AiringToday - /// A cancellation token - /// - public async Task> GetTvShowListAsync(TvShowListType list, int page = 0, string timezone = null, CancellationToken cancellationToken = default) - { - return await GetTvShowListAsync(list, DefaultLanguage, page, timezone, cancellationToken).ConfigureAwait(false); - } - - /// - /// Fetches a dynamic list of TV Shows - /// - /// Type of list to fetch - /// Language - /// Page - /// Only relevant for list type AiringToday - /// A cancellation token - /// - public async Task> GetTvShowListAsync(TvShowListType list, string language, int page = 0, string timezone = null, CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("tv/{method}"); - req.AddUrlSegment("method", list.GetDescription()); - - if (page > 0) - req.AddParameter("page", page.ToString()); - - if (!string.IsNullOrEmpty(timezone)) - req.AddParameter("timezone", timezone); - - language ??= DefaultLanguage; - if (!string.IsNullOrWhiteSpace(language)) - req.AddParameter("language", language); - - SearchContainer resp = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return resp; - } - - /// - /// Get the list of popular TV shows. This list refreshes every day. - /// - /// - /// Returns the basic information about a tv show. - /// For additional data use the main GetTvShowAsync method using the tv show id as parameter. - /// - public async Task> GetTvShowPopularAsync(int page = -1, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvShowListInternal(page, language, "popular", cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvShowSimilarAsync(int id, int page = 0, CancellationToken cancellationToken = default) - { - return await GetTvShowSimilarAsync(id, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvShowSimilarAsync(int id, string language, int page = 0, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal>(id, TvShowMethods.Similar, language: language, page: page, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvShowRecommendationsAsync(int id, int page = 0, CancellationToken cancellationToken = default) - { - return await GetTvShowRecommendationsAsync(id, DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvShowRecommendationsAsync(int id, string language, int page = 0, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal>(id, TvShowMethods.Recommendations, language: language, page: page, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the list of top rated TV shows. By default, this list will only include TV shows that have 2 or more votes. This list refreshes every day. - /// - /// - /// Returns the basic information about a tv show. - /// For additional data use the main GetTvShowAsync method using the tv show id as parameter - /// - public async Task> GetTvShowTopRatedAsync(int page = -1, string language = null, CancellationToken cancellationToken = default) - { - return await GetTvShowListInternal(page, language, "top_rated", cancellationToken).ConfigureAwait(false); - } - - public async Task GetTvShowTranslationsAsync(int id, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal(id, TvShowMethods.Translations, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task> GetTvShowVideosAsync(int id, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal>(id, TvShowMethods.Videos, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task>> GetTvShowWatchProvidersAsync(int id, CancellationToken cancellationToken = default) - { - return await GetTvShowMethodInternal>>(id, TvShowMethods.WatchProviders, cancellationToken: cancellationToken).ConfigureAwait(false); - } - - public async Task TvShowRemoveRatingAsync(int tvShowId, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest req = _client.Create("tv/{tvShowId}/rating"); - req.AddUrlSegment("tvShowId", tvShowId.ToString(CultureInfo.InvariantCulture)); - AddSessionId(req); - - using RestResponse response = await req.Delete(cancellationToken).ConfigureAwait(false); - - // status code 13 = "The item/record was deleted successfully." - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Original code had a check for item=null - return item.StatusCode == 13; - } - - /// - /// Change the rating of a specified tv show. - /// - /// The id of the tv show to rate - /// The rating you wish to assign to the specified tv show. Value needs to be between 0.5 and 10 and must use increments of 0.5. Ex. using 7.1 will not work and return false. - /// A cancellation token - /// True if the the tv show's rating was successfully updated, false if not - /// Requires a valid guest or user session - /// Thrown when the current client object doens't have a guest or user session assigned. - public async Task TvShowSetRatingAsync(int tvShowId, double rating, CancellationToken cancellationToken = default) - { - RequireSessionId(SessionType.GuestSession); - - RestRequest req = _client.Create("tv/{tvShowId}/rating"); - req.AddUrlSegment("tvShowId", tvShowId.ToString(CultureInfo.InvariantCulture)); - AddSessionId(req); - - req.SetBody(new { value = rating }); - - using RestResponse response = await req.Post(cancellationToken).ConfigureAwait(false); - - // status code 1 = "Success" - // status code 12 = "The item/record was updated successfully" - Used when an item was previously rated by the user - PostReply item = await response.GetDataObject().ConfigureAwait(false); - - // TODO: Original code had a check for item=null - return item.StatusCode == 1 || item.StatusCode == 12; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientWatchProviders.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientWatchProviders.cs deleted file mode 100644 index c8db67c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Client/TMDbClientWatchProviders.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Objects.General; -using TMDbLib.Rest; - -namespace TMDbLib.Client -{ - public partial class TMDbClient - { - /// - /// Returns a list of all of the countries TMDb has watch provider (OTT/streaming) data for. - /// - /// A cancellation token - /// Uses to translate data - public async Task> GetWatchProviderRegionsAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("watch/providers/regions"); - if (DefaultLanguage != null) - req.AddParameter("language", DefaultLanguage); - - ResultContainer response = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return response; - } - - /// - /// Returns a list of the watch provider (OTT/streaming) data TMDb has available for movies. - /// - /// A cancellation token - /// Uses and to filter or translate data - public async Task> GetMovieWatchProvidersAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("watch/providers/movie"); - if (DefaultLanguage != null) - req.AddParameter("language", DefaultLanguage); - - if (DefaultCountry != null) - req.AddParameter("watch_region", DefaultCountry); - - ResultContainer response = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return response; - } - - /// - /// Returns a list of the watch provider (OTT/streaming) data TMDb has available for shows. - /// - /// A cancellation token - /// Uses and to filter or translate data - public async Task> GetTvWatchProvidersAsync(CancellationToken cancellationToken = default) - { - RestRequest req = _client.Create("watch/providers/tv"); - if (DefaultLanguage != null) - req.AddParameter("language", DefaultLanguage); - - if (DefaultCountry != null) - req.AddParameter("watch_region", DefaultCountry); - - ResultContainer response = await req.GetOfT>(cancellationToken).ConfigureAwait(false); - - return response; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/AccountDetails.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/AccountDetails.cs deleted file mode 100644 index 759ba30..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/AccountDetails.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Account -{ - public class AccountDetails - { - [JsonProperty("avatar")] - public Avatar Avatar { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("include_adult")] - public bool IncludeAdult { get; set; } - - /// - /// A country code, e.g. US - /// - [JsonProperty("iso_3166_1")] - public string Iso_3166_1 { get; set; } - - /// - /// A language code, e.g. en - /// - [JsonProperty("iso_639_1")] - public string Iso_639_1 { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("username")] - public string Username { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/AccountSortBy.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/AccountSortBy.cs deleted file mode 100644 index 2685afd..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/AccountSortBy.cs +++ /dev/null @@ -1,11 +0,0 @@ -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Account -{ - public enum AccountSortBy - { - Undefined = 0, - [EnumValue("created_at")] - CreatedAt = 1, - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/Avatar.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/Avatar.cs deleted file mode 100644 index f756ec0..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/Avatar.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Account -{ - public class Avatar - { - [JsonProperty("gravatar")] - public Gravatar Gravatar { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/Gravatar.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/Gravatar.cs deleted file mode 100644 index 7e74e65..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Account/Gravatar.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Account -{ - public class Gravatar - { - [JsonProperty("hash")] - public string Hash { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/GuestSession.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/GuestSession.cs deleted file mode 100644 index 4aa6372..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/GuestSession.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using Newtonsoft.Json; -using TMDbLib.Utilities.Converters; - -namespace TMDbLib.Objects.Authentication -{ - /// - /// A guest session can be used to rate movies/tv shows without having a registered TMDb user account. - /// You should only generate a single guest session per user (or device) as you will be able to attach the ratings to a TMDb user account in the future. - /// There is also IP limits in place so you should always make sure it's the end user doing the guest session actions. - /// If a guest session is not used for the first time within 24 hours, it will be automatically discarded. - /// - public class GuestSession - { - /// - /// The date / time before which the session must be used for the first time else it will expire. Time is expressed as local time. - /// - [JsonProperty("expires_at")] - [JsonConverter(typeof(CustomDatetimeFormatConverter))] - public DateTime ExpiresAt { get; set; } - - [JsonProperty("guest_session_id")] - public string GuestSessionId { get; set; } - - [JsonProperty("success")] - public bool Success { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/GuestSessionRequiredException.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/GuestSessionRequiredException.cs deleted file mode 100644 index f1af1b9..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/GuestSessionRequiredException.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace TMDbLib.Objects.Authentication -{ - public class GuestSessionRequiredException : Exception - { - public GuestSessionRequiredException() - : base("The method you called requires a valid guest or user session to be set on the client object. Please use the 'SetSessionInformation' method to do so.") - { - - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/SessionType.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/SessionType.cs deleted file mode 100644 index 5e90948..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/SessionType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TMDbLib.Objects.Authentication -{ - public enum SessionType - { - Unassigned = 0, - GuestSession = 1, - UserSession = 2 - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/Token.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/Token.cs deleted file mode 100644 index 60ada62..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/Token.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using Newtonsoft.Json; -using TMDbLib.Utilities.Converters; - -namespace TMDbLib.Objects.Authentication -{ - /// - /// A request token is required in order to request a user authenticated session id. - /// Request tokens will expire after 60 minutes. - /// As soon as a valid session id has been created the token will be useless. - /// - public class Token - { - // This field is populated by custom code - [JsonIgnore] - public string AuthenticationCallback { get; set; } - - /// - /// The date / time before which the token must be used, else it will expire. Time is expressed as local time. - /// - [JsonProperty("expires_at")] - [JsonConverter(typeof(CustomDatetimeFormatConverter))] - public DateTime ExpiresAt { get; set; } - - [JsonProperty("request_token")] - public string RequestToken { get; set; } - - [JsonProperty("success")] - public bool Success { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/UserSession.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/UserSession.cs deleted file mode 100644 index d41c4d0..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/UserSession.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Authentication -{ - /// - /// Session object that can be retrieved after the user has correctly authenticated himself on the TMDb site. (using the referal url from the token provided previously) - /// - public class UserSession - { - [JsonProperty("session_id")] - public string SessionId { get; set; } - - [JsonProperty("success")] - public bool Success { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/UserSessionRequiredException.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/UserSessionRequiredException.cs deleted file mode 100644 index c02cde8..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Authentication/UserSessionRequiredException.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace TMDbLib.Objects.Authentication -{ - public class UserSessionRequiredException : Exception - { - public UserSessionRequiredException() - : base("The method you called requires a valid user session to be set on the client object. Please use the 'SetSessionInformation' method to do so.") - { - - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Certifications/CertificationItem.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Certifications/CertificationItem.cs deleted file mode 100644 index cfb6a0e..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Certifications/CertificationItem.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TMDbLib.Objects.Certifications -{ - public class CertificationItem - { - public string Certification { get; set; } - public string Meaning { get; set; } - public int Order { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Certifications/CertificationsContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Certifications/CertificationsContainer.cs deleted file mode 100644 index 6520ccd..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Certifications/CertificationsContainer.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.Generic; - -namespace TMDbLib.Objects.Certifications -{ - public class CertificationsContainer - { - public Dictionary> Certifications { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/Change.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/Change.cs deleted file mode 100644 index 81b4ab0..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/Change.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Changes -{ - public class Change - { - [JsonProperty("items")] - public List Items { get; set; } - - [JsonProperty("key")] - public string Key { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeAction.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeAction.cs deleted file mode 100644 index 64a32da..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeAction.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Utilities; -using TMDbLib.Utilities.Converters; - -namespace TMDbLib.Objects.Changes -{ - [JsonConverter(typeof(EnumStringValueConverter))] - public enum ChangeAction - { - Unknown, - - [EnumValue("added")] - Added = 1, - - [EnumValue("created")] - Created = 2, - - [EnumValue("updated")] - Updated = 3, - - [EnumValue("deleted")] - Deleted = 4, - - [EnumValue("destroyed")] - Destroyed = 5 - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemAdded.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemAdded.cs deleted file mode 100644 index 9bd6087..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemAdded.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Changes -{ - public class ChangeItemAdded : ChangeItemBase - { - public ChangeItemAdded() - { - Action = ChangeAction.Added; - } - - [JsonProperty("value")] - public object Value { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemBase.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemBase.cs deleted file mode 100644 index f571aa7..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemBase.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using Newtonsoft.Json; -using TMDbLib.Utilities.Converters; - -namespace TMDbLib.Objects.Changes -{ - public abstract class ChangeItemBase - { - [JsonProperty("action")] - public ChangeAction Action { get; set; } - - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A language code, e.g. en - /// This field is not always set - /// - [JsonProperty("iso_639_1")] - public string Iso_639_1 { get; set; } - - [JsonProperty("time")] - [JsonConverter(typeof(TmdbUtcTimeConverter))] - public DateTime Time { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemCreated.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemCreated.cs deleted file mode 100644 index 6405e4c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemCreated.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TMDbLib.Objects.Changes -{ - public class ChangeItemCreated : ChangeItemBase - { - public ChangeItemCreated() - { - Action = ChangeAction.Created; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemDeleted.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemDeleted.cs deleted file mode 100644 index 806367d..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemDeleted.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Changes -{ - public class ChangeItemDeleted : ChangeItemBase - { - public ChangeItemDeleted() - { - Action = ChangeAction.Deleted; - } - - [JsonProperty("original_value")] - public object OriginalValue { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemDestroyed.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemDestroyed.cs deleted file mode 100644 index 325047b..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemDestroyed.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Changes -{ - public class ChangeItemDestroyed : ChangeItemBase - { - public ChangeItemDestroyed() - { - Action = ChangeAction.Destroyed; - } - - [JsonProperty("value")] - public object Value { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemUpdated.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemUpdated.cs deleted file mode 100644 index 16904e3..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangeItemUpdated.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Changes -{ - public class ChangeItemUpdated : ChangeItemBase - { - public ChangeItemUpdated() - { - Action = ChangeAction.Updated; - } - - [JsonProperty("original_value")] - public object OriginalValue { get; set; } - - [JsonProperty("value")] - public object Value { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangesContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangesContainer.cs deleted file mode 100644 index da1a186..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangesContainer.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Changes -{ - public class ChangesContainer - { - [JsonProperty("changes")] - public List Changes { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangesListItem.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangesListItem.cs deleted file mode 100644 index e86ab83..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Changes/ChangesListItem.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Utilities.Converters; - -namespace TMDbLib.Objects.Changes -{ - public class ChangesListItem - { - [JsonProperty("adult")] - public bool? Adult { get; set; } - - [JsonProperty("id")] - [JsonConverter(typeof(TmdbNullIntAsZero))] - public int Id { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Collections/Collection.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Collections/Collection.cs deleted file mode 100644 index 1ec3cce..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Collections/Collection.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Search; - -namespace TMDbLib.Objects.Collections -{ - public class Collection - { - [JsonProperty("backdrop_path")] - public string BackdropPath { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("images")] - public Images Images { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("overview")] - public string Overview { get; set; } - - [JsonProperty("parts")] - public List Parts { get; set; } - - [JsonProperty("poster_path")] - public string PosterPath { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Collections/CollectionMethods.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Collections/CollectionMethods.cs deleted file mode 100644 index f6f6c86..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Collections/CollectionMethods.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Collections -{ - [Flags] - public enum CollectionMethods - { - [EnumValue("Undefined")] - Undefined = 0, - [EnumValue("images")] - Images = 1 - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Companies/Company.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Companies/Company.cs deleted file mode 100644 index 081ebf5..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Companies/Company.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Search; - -namespace TMDbLib.Objects.Companies -{ - public class Company - { - [JsonProperty("description")] - public string Description { get; set; } - - [JsonProperty("headquarters")] - public string Headquarters { get; set; } - - [JsonProperty("homepage")] - public string Homepage { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("logo_path")] - public string LogoPath { get; set; } - - [JsonProperty("movies")] - public SearchContainer Movies { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("parent_company")] - public SearchCompany ParentCompany { get; set; } - - [JsonProperty("origin_country")] - public string OriginCountry { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Companies/CompanyMethods.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Companies/CompanyMethods.cs deleted file mode 100644 index 08e9d1f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Companies/CompanyMethods.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Companies -{ - [Flags] - public enum CompanyMethods - { - [EnumValue("Undefined")] - Undefined = 0, - [EnumValue("movies")] - Movies = 1 - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Configuration/APIConfiguration.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Configuration/APIConfiguration.cs deleted file mode 100644 index eec8d95..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Configuration/APIConfiguration.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace TMDbLib.Objects.Configuration -{ - public class APIConfiguration - { - [JsonProperty("images")] - public APIConfigurationImages Images { get; set; } - - [JsonProperty("change_keys")] - public List ChangeKeys { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Configuration/APIConfigurationImages.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Configuration/APIConfigurationImages.cs deleted file mode 100644 index e5a4187..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Configuration/APIConfigurationImages.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Newtonsoft.Json; -using System.Collections.Generic; - - -namespace TMDbLib.Objects.Configuration -{ - public class APIConfigurationImages - { - [JsonProperty("base_url")] - public string BaseUrl { get; set; } - - [JsonProperty("secure_base_url")] - public string SecureBaseUrl { get; set; } - - [JsonProperty("backdrop_sizes")] - public List BackdropSizes { get; set; } - - [JsonProperty("logo_sizes")] - public List LogoSizes { get; set; } - - [JsonProperty("poster_sizes")] - public List PosterSizes { get; set; } - - [JsonProperty("profile_sizes")] - public List ProfileSizes { get; set; } - - [JsonProperty("still_sizes")] - public List StillSizes { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Countries/Country.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Countries/Country.cs deleted file mode 100644 index ce28d7f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Countries/Country.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Countries -{ - public class Country - { - [JsonProperty("iso_3166_1")] - public string Iso_3166_1 { get; set; } - - [JsonProperty("english_name")] - public string EnglishName { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/Credit.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/Credit.cs deleted file mode 100644 index c6e5852..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/Credit.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Objects.General; - -namespace TMDbLib.Objects.Credit -{ - public class Credit - { - [JsonProperty("credit_type")] - public CreditType CreditType { get; set; } - - [JsonProperty("department")] - public string Department { get; set; } - - [JsonProperty("id")] - public string Id { get; set; } - - [JsonProperty("job")] - public string Job { get; set; } - - [JsonProperty("media")] - public CreditMedia Media { get; set; } - - [JsonProperty("media_type")] - public MediaType MediaType { get; set; } - - [JsonProperty("person")] - public CreditPerson Person { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditEpisode.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditEpisode.cs deleted file mode 100644 index 0bf8cd2..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditEpisode.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Credit -{ - public class CreditEpisode - { - [JsonProperty("air_date")] - public DateTime? AirDate { get; set; } - - [JsonProperty("episode_number")] - public int EpisodeNumber { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("overview")] - public string Overview { get; set; } - - [JsonProperty("season_number")] - public int SeasonNumber { get; set; } - - [JsonProperty("still_path")] - public string StillPath { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditMedia.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditMedia.cs deleted file mode 100644 index 49267a5..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditMedia.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Credit -{ - public class CreditMedia - { - [JsonProperty("character")] - public string Character { get; set; } - - [JsonProperty("episodes")] - public List Episodes { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("original_name")] - public string OriginalName { get; set; } - - [JsonProperty("seasons")] - public List Seasons { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditPerson.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditPerson.cs deleted file mode 100644 index 6605f04..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditPerson.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Credit -{ - public class CreditPerson - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditSeason.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditSeason.cs deleted file mode 100644 index cb44ad9..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Credit/CreditSeason.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Credit -{ - public class CreditSeason - { - [JsonProperty("air_date")] - public DateTime? AirDate { get; set; } - - [JsonProperty("poster_path")] - public string PosterPath { get; set; } - - [JsonProperty("season_number")] - public int SeasonNumber { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverBase.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverBase.cs deleted file mode 100644 index eebabd8..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverBase.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Threading; -using System.Threading.Tasks; -using TMDbLib.Client; -using TMDbLib.Objects.General; -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Discover -{ - public abstract class DiscoverBase - { - private readonly TMDbClient _client; - private readonly string _endpoint; - protected readonly SimpleNamedValueCollection Parameters; - - public DiscoverBase(string endpoint, TMDbClient client) - { - _endpoint = endpoint; - _client = client; - Parameters = new SimpleNamedValueCollection(); - } - - public async Task> Query(int page = 0, CancellationToken cancellationToken = default) - { - return await Query(_client.DefaultLanguage, page, cancellationToken).ConfigureAwait(false); - } - - public async Task> Query(string language, int page = 0, CancellationToken cancellationToken = default) - { - return await _client.DiscoverPerformAsync(_endpoint, language, page, Parameters, cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverMovie.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverMovie.cs deleted file mode 100644 index 3bca5a3..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverMovie.cs +++ /dev/null @@ -1,441 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using TMDbLib.Objects.Companies; -using TMDbLib.Objects.General; -using TMDbLib.Client; -using TMDbLib.Objects.Search; -using TMDbLib.Objects.TvShows; -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Discover -{ - public class DiscoverMovie : DiscoverBase - { - public DiscoverMovie(TMDbClient client) - : base("discover/movie", client) - { - } - - private void ClearCertification() - { - Parameters.Remove("certification_country"); - Parameters.Remove("certification"); - Parameters.Remove("certification.lte"); - Parameters.Remove("certification.gte"); - } - - /// - /// Toggle the inclusion of adult titles. Expected value is a boolean, true or false. Default is false. - /// - public DiscoverMovie IncludeAdultMovies(bool include = true) - { - Parameters["include_adult"] = include.ToString(); - return this; - } - - /// - /// Toggle the inclusion of items marked as a video. Expected value is a boolean, true or false. Default is true. - /// - public DiscoverMovie IncludeVideoMovies(bool include = true) - { - Parameters["include_video"] = include.ToString(); - return this; - } - - /// - /// Only include movies that have this person id added as a cast member. Expected value is an integer (the id of a person). - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfCast(IEnumerable castIds) - { - Parameters["with_cast"] = string.Join(",", castIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies that have this person id added as a cast member. - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfCast(IEnumerable casts) - { - return IncludeWithAllOfCast(casts.Select(s => s.Id)); - } - - /// - /// Only include movies that have this company id added as a crew member. Expected value is an integer (the id of a company). - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfCompany(IEnumerable companyIds) - { - Parameters["with_companies"] = string.Join(",", companyIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies that have this company id added as a crew member. - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfCompany(IEnumerable companies) - { - return IncludeWithAllOfCompany(companies.Select(s => s.Id)); - } - - /// - /// Only include movies that have this person id added as a crew member. Expected value is an integer (the id of a person). - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfCrew(IEnumerable crewIds) - { - Parameters["with_crew"] = string.Join(",", crewIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies that have this person id added as a crew member. - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfCrew(IEnumerable crews) - { - return IncludeWithAllOfCrew(crews.Select(s => s.Id)); - } - - /// - /// Only include movies with the specified genres. Expected value is an integer (the id of a genre). - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfGenre(IEnumerable genreIds) - { - Parameters["with_genres"] = string.Join(",", genreIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies with the specified genres. - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfGenre(IEnumerable genres) - { - return IncludeWithAllOfGenre(genres.Select(s => s.Id)); - } - - /// - /// Only include movies with the specified keywords. Expected value is an integer (the id of a keyword). - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfKeywords(IEnumerable keywordIds) - { - Parameters["with_keywords"] = string.Join(",", keywordIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies with the specified keywords. - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfKeywords(IEnumerable keywords) - { - return IncludeWithAllOfKeywords(keywords.Select(s => s.Id)); - } - - /// - /// Only include movies that have these person id's added as a cast or crew member. Expected value is an integer (the id or ids of a person). - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfPeople(IEnumerable peopleIds) - { - Parameters["with_people"] = string.Join(",", peopleIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies that have these person id's added as a cast or crew member. - /// This method performs an AND query. - /// - public DiscoverMovie IncludeWithAllOfPeople(IEnumerable people) - { - return IncludeWithAllOfPeople(people.Select(s => s.Id)); - } - - /// - /// Only include movies that have this person id added as a cast member. Expected value is an integer (the id of a person). - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfCast(IEnumerable castIds) - { - Parameters["with_cast"] = string.Join("|", castIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies that have this person id added as a cast member. - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfCast(IEnumerable casts) - { - return IncludeWithAnyOfCast(casts.Select(s => s.Id)); - } - - /// - /// Only include movies that have this company id added as a crew member. Expected value is an integer (the id of a company). - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfCompany(IEnumerable companyIds) - { - Parameters["with_companies"] = string.Join("|", companyIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies that have this company id added as a crew member. - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfCompany(IEnumerable companies) - { - return IncludeWithAnyOfCompany(companies.Select(s => s.Id)); - } - - /// - /// Only include movies that have this person id added as a crew member. Expected value is an integer (the id of a person). - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfCrew(IEnumerable crewIds) - { - Parameters["with_crew"] = string.Join("|", crewIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies that have this person id added as a crew member. - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfCrew(IEnumerable crews) - { - return IncludeWithAnyOfCrew(crews.Select(s => s.Id)); - } - - /// - /// Only include movies with the specified genres. Expected value is an integer (the id of a genre). - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfGenre(IEnumerable castIds) - { - Parameters["with_genres"] = string.Join("|", castIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies with the specified genres. - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfGenre(IEnumerable genres) - { - return IncludeWithAnyOfGenre(genres.Select(s => s.Id)); - } - - /// - /// Only include movies with the specified keywords. Expected value is an integer (the id of a keyword). - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfKeywords(IEnumerable keywordIds) - { - Parameters["with_keywords"] = string.Join("|", keywordIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies with the specified keywords. - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfKeywords(IEnumerable keywords) - { - return IncludeWithAnyOfKeywords(keywords.Select(s => s.Id)); - } - - /// - /// Only include movies that have these person id's added as a cast or crew member. Expected value is an integer (the id or ids of a person). - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfPeople(IEnumerable peopleIds) - { - Parameters["with_people"] = string.Join("|", peopleIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include movies that have these person id's added as a cast or crew member. - /// This method performs an OR query. - /// - public DiscoverMovie IncludeWithAnyOfPeople(IEnumerable people) - { - return IncludeWithAnyOfPeople(people.Select(s => s.Id)); - } - - /// - /// Available options are: popularity.ascpopularity.descrelease_date.ascrelease_date.descrevenue.ascrevenue.descprimary_release_date.ascprimary_release_date.descoriginal_title.ascoriginal_title.descvote_average.ascvote_average.descvote_count.ascvote_count.desc - /// - public DiscoverMovie OrderBy(DiscoverMovieSortBy sortBy) - { - Parameters["sort_by"] = sortBy.GetDescription(); - return this; - } - - /// - /// Filter the results by all available release dates that have the specified value added as a year. Expected value is an integer (year). - /// - public DiscoverMovie WhereAnyReleaseDateIsInYear(int year) - { - Parameters["year"] = year.ToString("0000"); - return this; - } - - /// - /// Only include movies with this certification. Expected value is a valid certification for the specificed 'certification_country'. - /// - public DiscoverMovie WhereCertificationIs(string country, string certification) - { - ClearCertification(); - - Parameters["certification_country"] = country; - Parameters["certification"] = certification; - - return this; - } - - /// - /// Only include movies with this certification and lower. Expected value is a valid certification for the specificed 'certification_country'. - /// - public DiscoverMovie WhereCertificationIsAtMost(string country, string maxCertification) - { - ClearCertification(); - - Parameters["certification_country"] = country; - Parameters["certification.lte"] = maxCertification; - - return this; - } - - /// - /// Only include movies with this certification and higher. Expected value is a valid certification for the specificed 'certification_country'. - /// - public DiscoverMovie WhereCertificationIsAtLeast(string country, string minCertification) - { - ClearCertification(); - - Parameters["certification_country"] = country; - Parameters["certification.gte"] = minCertification; - - return this; - } - - /// - /// Filter by the primary release date and only include those which are greater than or equal to the specified value. Expected format is YYYY-MM-DD. - /// - public DiscoverMovie WherePrimaryReleaseDateIsAfter(DateTime date) - { - Parameters["primary_release_date.gte"] = date.ToString("yyyy-MM-dd"); - return this; - } - - /// - /// Filter by the primary release date and only include those which are greater than or equal to the specified value. Expected format is YYYY-MM-DD. - /// - public DiscoverMovie WherePrimaryReleaseDateIsBefore(DateTime date) - { - Parameters["primary_release_date.lte"] = date.ToString("yyyy-MM-dd"); - return this; - } - - /// - /// Filter the results so that only the primary release date year has this value. Expected value is a year. - /// - public DiscoverMovie WherePrimaryReleaseIsInYear(int year) - { - Parameters["primary_release_year"] = year.ToString("0000"); - return this; - } - - /// - /// Filter by all available release dates and only include those which are greater or equal to the specified value. Expected format is YYYY-MM-DD. - /// - public DiscoverMovie WhereReleaseDateIsAfter(DateTime date) - { - Parameters["release_date.gte"] = date.ToString("yyyy-MM-dd"); - return this; - } - - /// - /// Filter by all available release dates and only include those which are less or equal to the specified value. Expected format is YYYY-MM-DD. - /// - public DiscoverMovie WhereReleaseDateIsBefore(DateTime date) - { - Parameters["release_date.lte"] = date.ToString("yyyy-MM-dd"); - return this; - } - - /// - /// Filter movies by their vote average and only include those that have an average rating that is equal to or higher than the specified value. Expected value is a float. - /// - public DiscoverMovie WhereVoteAverageIsAtLeast(double score) - { - // TODO: Apply culture to the ToString - Parameters["vote_average.gte"] = score.ToString(); - return this; - } - - /// - /// Filter movies by their vote average and only include those that have an average rating that is equal to or lower than the specified value. Expected value is a float. - /// - public DiscoverMovie WhereVoteAverageIsAtMost(double score) - { - // TODO: Apply culture to the ToString - Parameters["vote_average.lte"] = score.ToString(); - return this; - } - - /// - /// Filter movies by their vote count and only include movies that have a vote count that is equal to or lower than the specified value. - /// - public DiscoverMovie WhereVoteCountIsAtLeast(int count) - { - Parameters["vote_count.gte"] = count.ToString(); - return this; - } - - /// - /// Filter movies by their vote count and only include movies that have a vote count that is equal to or lower than the specified value. Expected value is an integer. - /// - public DiscoverMovie WhereVoteCountIsAtMost(int count) - { - Parameters["vote_count.lte"] = count.ToString(); - return this; - } - - /// - /// Specifies which region to use for release date filtering (using ISO 3166-1 code) - /// - public DiscoverMovie WhereReleaseDateIsInRegion(string region) - { - Parameters["region"] = region; - return this; - } - - /// - /// Specifies which language to use for translatable fields - /// - public DiscoverMovie WhereLanguageIs(string language) - { - Parameters["language"] = language; - return this; - } - - /// - /// Specifies which language to use for translatable fields - /// - public DiscoverMovie WhereOriginalLanguageIs(string language) - { - Parameters["with_original_language"] = language; - return this; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverMovieSortBy.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverMovieSortBy.cs deleted file mode 100644 index 39cff7a..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverMovieSortBy.cs +++ /dev/null @@ -1,37 +0,0 @@ -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Discover -{ - public enum DiscoverMovieSortBy - { - Undefined, - [EnumValue("popularity.asc")] - Popularity, - [EnumValue("popularity.desc")] - PopularityDesc, - [EnumValue("release_date.asc")] - ReleaseDate, - [EnumValue("release_date.desc")] - ReleaseDateDesc, - [EnumValue("revenue.asc")] - Revenue, - [EnumValue("revenue.desc")] - RevenueDesc, - [EnumValue("primary_release_date.asc")] - PrimaryReleaseDate, - [EnumValue("primary_release_date.desc")] - PrimaryReleaseDateDesc, - [EnumValue("original_title.asc")] - OriginalTitle, - [EnumValue("original_title.desc")] - OriginalTitleDesc, - [EnumValue("vote_average.asc")] - VoteAverage, - [EnumValue("vote_average.desc")] - VoteAverageDesc, - [EnumValue("vote_count.asc")] - VoteCount, - [EnumValue("vote_count.desc")] - VoteCountDesc - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverTv.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverTv.cs deleted file mode 100644 index f2d290c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverTv.cs +++ /dev/null @@ -1,259 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using TMDbLib.Client; -using TMDbLib.Objects.Companies; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Search; -using TMDbLib.Objects.TvShows; -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Discover -{ - public class DiscoverTv : DiscoverBase - { - public DiscoverTv(TMDbClient client) - : base("discover/tv", client) - { - - } - - /// - /// Available options are vote_average.desc, vote_average.asc, first_air_date.desc, first_air_date.asc, popularity.desc, popularity.asc - /// - public DiscoverTv OrderBy(DiscoverTvShowSortBy sortBy) - { - Parameters["sort_by"] = sortBy.GetDescription(); - return this; - } - - /// - /// Specify a timeone to calculate proper date offsets. A list of valid timezones can be found by using the timezones/list method. - /// - public DiscoverTv UseTimezone(string timezone) - { - Parameters["timezone"] = timezone; - return this; - } - - /// - /// The minimum episode air date to include. Expected format is YYYY-MM-DD. Can be used in conjunction with a specified timezone. - /// - public DiscoverTv WhereAirDateIsAfter(DateTime date) - { - Parameters["air_date.gte"] = date.ToString("yyyy-MM-dd"); - return this; - } - - /// - /// The maximum episode air date to include. Expected format is YYYY-MM-DD. Can be used in conjunction with a specified timezone. - /// - public DiscoverTv WhereAirDateIsBefore(DateTime date) - { - Parameters["air_date.lte"] = date.ToString("yyyy-MM-dd"); - return this; - } - - /// - /// The minimum release to include. Expected format is YYYY-MM-DD. - /// - public DiscoverTv WhereFirstAirDateIsAfter(DateTime date) - { - Parameters["first_air_date.gte"] = date.ToString("yyyy-MM-dd"); - return this; - } - - /// - /// The maximum release to include. Expected format is YYYY-MM-DD. - /// - public DiscoverTv WhereFirstAirDateIsBefore(DateTime date) - { - Parameters["first_air_date.lte"] = date.ToString("yyyy-MM-dd"); - return this; - } - - /// - /// Filter the results release dates to matches that include this value. Expected value is a year. - /// - public DiscoverTv WhereFirstAirDateIsInYear(int year) - { - Parameters["first_air_date_year"] = year.ToString("0000"); - return this; - } - - /// - /// Only include TV shows with the specified genres. Expected value is an integer (the id of a genre). Multiple values can be specified. Comma separated indicates an 'AND' query, while a pipe (|) separated value indicates an 'OR'. - /// - public DiscoverTv WhereGenresInclude(IEnumerable genres) - { - return WhereGenresInclude(genres.Select(s => s.Id)); - } - - /// - /// Only include TV shows with the specified genres. Expected value is an integer (the id of a genre). Multiple values can be specified. Comma separated indicates an 'AND' query, while a pipe (|) separated value indicates an 'OR'. - /// - public DiscoverTv WhereGenresInclude(IEnumerable genreIds) - { - Parameters["with_genres"] = string.Join(",", genreIds.Select(s => s.ToString())); - return this; - } - - /// - /// Filter TV shows to include a specific network. Expected value is an integer (the id of a network). They can be comma separated to indicate an 'AND' query. - /// - public DiscoverTv WhereNetworksInclude(IEnumerable networks) - { - return WhereNetworksInclude(networks.Select(s => s.Id)); - } - - /// - /// Filter TV shows to include a specific network. Expected value is an integer (the id of a network). They can be comma separated to indicate an 'AND' query. - /// - public DiscoverTv WhereNetworksInclude(IEnumerable networkIds) - { - Parameters["with_networks"] = string.Join(",", networkIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include TV shows that are equal to, or have a higher average rating than this value. Expected value is a float. - /// - public DiscoverTv WhereVoteAverageIsAtLeast(double score) - { - // TODO: Apply culture to the ToString - Parameters["vote_average.gte"] = score.ToString(); - return this; - } - - /// - /// Only include TV shows that are equal to, or have a vote count higher than this value. Expected value is an integer. - /// - public DiscoverTv WhereVoteCountIsAtLeast(int count) - { - Parameters["vote_count.gte"] = count.ToString(); - return this; - } - - /// - /// Specifies which language to use for translatable fields - /// - public DiscoverTv WhereOriginalLanguageIs(string language) - { - Parameters["with_original_language"] = language; - return this; - } - - /// - /// Only include TV shows that are equal to, or have a runtime higher than this value. Expected value is an integer (minutes). - /// - public DiscoverTv WhereRuntimeIsAtLeast(int minutes) - { - Parameters["with_runtime.gte"] = minutes.ToString(); - return this; - } - - /// - /// Only include TV shows that are equal to, or have a runtime lower than this value. Expected value is an integer (minutes). - /// - public DiscoverTv WhereRuntimeIsAtMost(int minutes) - { - Parameters["with_runtime.lte"] = minutes.ToString(); - return this; - } - - /// - /// Toggle the inclusion of TV shows with null first air data. Expected value is a boolean, true or false. - /// - public DiscoverTv IncludeNullFirstAirDates(bool include) - { - Parameters["include_null_first_air_dates"] = include.ToString(); - return this; - } - - /// - /// Exclude TV shows with the specified genres. Expected value is a list of Generes. - /// - public DiscoverTv WhereGenresExclude(IEnumerable genres) - { - return WhereGenresInclude(genres.Select(s => s.Id)); - } - - /// - /// Exclude TV shows with the specified genres. Expected value is an integer (the id of a genre). - /// - public DiscoverTv WhereGenresExclude(IEnumerable genreIds) - { - Parameters["without_genres"] = string.Join(",", genreIds.Select(s => s.ToString())); - return this; - } - - /// - /// Only include TV shows with the specified companies. Expected value is an list of companies. - /// - public DiscoverTv WhereCompaniesInclude(IEnumerable companies) - { - return WhereCompaniesInclude(companies.Select(s => s.Id)); - } - - /// - /// Only include TV shows with the specified companies. Expected value is a list of integer (the id of a company). - /// - public DiscoverTv WhereCompaniesInclude(IEnumerable companyIds) - { - Parameters["with_companies"] = string.Join(",", companyIds.Select(s => s.ToString())); - return this; - } - - /// - /// Filter results to include items that have been screened theatrically. - /// - public DiscoverTv WhereScreenedTheatrically(bool theatrical) - { - Parameters["screened_theatrically"] = theatrical.ToString(); - return this; - } - - /// - /// Filter TV shows to include a specific keyword. Expected value is a list of keywords. - /// - public DiscoverTv WhereKeywordsInclude(IEnumerable keywords) - { - return WhereKeywordsInclude(keywords.Select(s => s.Id)); - } - - /// - /// Filter TV shows to include a specific keyword. Expected value is a list of integer (the id of a keyword). - /// - public DiscoverTv WhereKeywordsInclude(IEnumerable keywordIds) - { - Parameters["with_keywords"] = string.Join(",", keywordIds.Select(s => s.ToString())); - return this; - } - - /// - /// Filter TV shows to exclude a specific keyword. Expected value is a list of keywords. - /// - public DiscoverTv WhereKeywordsExclude(IEnumerable keywords) - { - return WhereKeywordsInclude(keywords.Select(s => s.Id)); - } - - /// - /// Filter TV shows to exclude a specific keyword. Expected value is a list of integer (the id of a keyword). - /// - public DiscoverTv WhereKeywordsExclude(IEnumerable keywordIds) - { - Parameters["without_keywords"] = string.Join("|", keywordIds.Select(s => s.ToString())); - return this; - } - - /// - /// Specifies which language to use for translatable fields - /// - public DiscoverTv WhereLanguageIs(string language) - { - Parameters["language"] = language; - return this; - } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverTvShowSortBy.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverTvShowSortBy.cs deleted file mode 100644 index c93059c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Discover/DiscoverTvShowSortBy.cs +++ /dev/null @@ -1,21 +0,0 @@ -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Discover -{ - public enum DiscoverTvShowSortBy - { - Undefined, - [EnumValue("vote_average.asc")] - VoteAverage, - [EnumValue("vote_average.desc")] - VoteAverageDesc, - [EnumValue("first_air_date.asc")] - FirstAirDate, - [EnumValue("first_air_date.desc")] - FirstAirDateDesc, - [EnumValue("popularity.asc")] - Popularity, - [EnumValue("popularity.desc")] - PopularityDesc - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/APIException.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/APIException.cs deleted file mode 100644 index e1f24b6..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/APIException.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace TMDbLib.Objects.Exceptions -{ - public class APIException : TMDbException - { - public TMDbStatusMessage StatusMessage { get; } - - public APIException(string message, TMDbStatusMessage statusMessage) : base(message) - { - StatusMessage = statusMessage; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/GeneralHttpException.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/GeneralHttpException.cs deleted file mode 100644 index 01302cb..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/GeneralHttpException.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Net; - -namespace TMDbLib.Objects.Exceptions -{ - public class GeneralHttpException : TMDbException - { - public HttpStatusCode HttpStatusCode { get; } - - public GeneralHttpException(HttpStatusCode httpStatusCode) - : base("TMDb returned an unexpected HTTP error") - { - HttpStatusCode = httpStatusCode; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/NotFoundException.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/NotFoundException.cs deleted file mode 100644 index 706951d..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/NotFoundException.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TMDbLib.Objects.Exceptions -{ - public class NotFoundException : APIException - { - public NotFoundException(TMDbStatusMessage statusMessage) - : base("The requested item was not found", statusMessage) - { - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/RequestLimitExceededException.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/RequestLimitExceededException.cs deleted file mode 100644 index 097c323..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/RequestLimitExceededException.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace TMDbLib.Objects.Exceptions -{ - public class RequestLimitExceededException : APIException - { - public DateTimeOffset? RetryOn { get; } - - public TimeSpan? RetryAfter { get; } - - internal RequestLimitExceededException(TMDbStatusMessage statusMessage, DateTimeOffset? retryOn, TimeSpan? retryAfter) - : base("You have exceeded the maximum number of request allowed by TMDb please try again later", statusMessage) - { - RetryOn = retryOn; - RetryAfter = retryAfter; - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/TMDbException.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/TMDbException.cs deleted file mode 100644 index f497c32..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/TMDbException.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace TMDbLib.Objects.Exceptions -{ - public class TMDbException : Exception - { - public TMDbException(string message) - : base(message) - { - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/TMDbStatusMessage.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/TMDbStatusMessage.cs deleted file mode 100644 index e572cd5..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Exceptions/TMDbStatusMessage.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Exceptions -{ - public class TMDbStatusMessage - { - [JsonProperty("status_code")] - public int StatusCode { get; set; } - - [JsonProperty("status_message")] - public string StatusMessage { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindContainer.cs deleted file mode 100644 index 4df289c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindContainer.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.Search; - -namespace TMDbLib.Objects.Find -{ - public class FindContainer - { - [JsonProperty("movie_results")] - public List MovieResults { get; set; } - - [JsonProperty("person_results")] - public List PersonResults { get; set; } // Unconfirmed type - - [JsonProperty("tv_episode_results")] - public List TvEpisode { get; set; } - - [JsonProperty("tv_results")] - public List TvResults { get; set; } - - [JsonProperty("tv_season_results")] - public List TvSeason { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindExternalSource.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindExternalSource.cs deleted file mode 100644 index b1101d6..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindExternalSource.cs +++ /dev/null @@ -1,13 +0,0 @@ -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.Find -{ - public enum FindExternalSource - { - [EnumValue("imdb_id")] - Imdb, - - [EnumValue("tvdb_id")] - TvDb - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindPerson.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindPerson.cs deleted file mode 100644 index 1079546..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindPerson.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Objects.Search; -using TMDbLib.Objects.People; - -namespace TMDbLib.Objects.Find -{ - public class FindPerson : SearchPerson - { - [JsonProperty("gender")] - public PersonGender Gender { get; set; } - - [JsonProperty("known_for_department")] - public string KnownForDepartment { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindTvSeason.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindTvSeason.cs deleted file mode 100644 index d83a45f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Find/FindTvSeason.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Find -{ - public class FindTvSeason - { - [JsonProperty("air_date")] - public DateTime? AirDate { get; set; } - - [JsonProperty("episode_count")] - public int EpisodeCount { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("overview")] - public string Overview { get; set; } - - [JsonProperty("poster_path")] - public string PosterPath { get; set; } - - [JsonProperty("season_number")] - public int SeasonNumber { get; set; } - - [JsonProperty("show_id")] - public int ShowId { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AccountState.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AccountState.cs deleted file mode 100644 index 20ae92f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AccountState.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class AccountState - { - /// - /// Represents the current favorite status of the related movie for the current user session. - /// - [JsonProperty("favorite")] - public bool Favorite { get; set; } - - /// - /// The TMDb id for the related movie - /// - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("rating")] - public double? Rating { get; set; } - - /// - /// Represents the presence of the related movie on the current user's watchlist. - /// - [JsonProperty("watchlist")] - public bool Watchlist { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeName.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeName.cs deleted file mode 100644 index 0dcacca..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeName.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class AlternativeName - { - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("type")] - public string Type { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeNames.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeNames.cs deleted file mode 100644 index 7a80327..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeNames.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace TMDbLib.Objects.General -{ - public class AlternativeNames - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("results")] - public List Results { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeTitle.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeTitle.cs deleted file mode 100644 index 8b0f96e..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/AlternativeTitle.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class AlternativeTitle - { - /// - /// A country code, e.g. US - /// - [JsonProperty("iso_3166_1")] - public string Iso_3166_1 { get; set; } - - [JsonProperty("title")] - public string Title { get; set; } - - /// - /// The type of title (e.g. working title, DVD title, modern title) - /// - [JsonProperty("type")] - public string Type { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ConfigImageTypes.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ConfigImageTypes.cs deleted file mode 100644 index 4b24f9f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ConfigImageTypes.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ConfigImageTypes - { - [JsonProperty("backdrop_sizes")] - public List BackdropSizes { get; set; } - - [JsonProperty("base_url")] - public string BaseUrl { get; set; } - - [JsonProperty("logo_sizes")] - public List LogoSizes { get; set; } - - [JsonProperty("poster_sizes")] - public List PosterSizes { get; set; } - - [JsonProperty("profile_sizes")] - public List ProfileSizes { get; set; } - - [JsonProperty("secure_base_url")] - public string SecureBaseUrl { get; set; } - - [JsonProperty("still_sizes")] - public List StillSizes { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CreditType.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CreditType.cs deleted file mode 100644 index 06681b3..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CreditType.cs +++ /dev/null @@ -1,15 +0,0 @@ -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.General -{ - public enum CreditType - { - Unknown, - - [EnumValue("crew")] - Crew = 1, - - [EnumValue("cast")] - Cast = 2 - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Crew.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Crew.cs deleted file mode 100644 index 5971fec..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Crew.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Objects.People; - -namespace TMDbLib.Objects.General -{ - public class Crew : CrewBase - { - [JsonProperty("credit_id")] - public string CreditId { get; set; } - - [JsonProperty("job")] - public string Job { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewAggregate.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewAggregate.cs deleted file mode 100644 index cb86bf4..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewAggregate.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.People; - -namespace TMDbLib.Objects.General -{ - public class CrewAggregate : CrewBase - { - [JsonProperty("jobs")] - public List Jobs { get; set; } - - [JsonProperty("total_episode_count")] - public int TotalEpisodeCount { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewBase.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewBase.cs deleted file mode 100644 index 03b081e..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewBase.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Objects.People; - -namespace TMDbLib.Objects.General -{ - public class CrewBase - { - [JsonProperty("department")] - public string Department { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("profile_path")] - public string ProfilePath { get; set; } - - [JsonProperty("gender")] - public PersonGender Gender { get; set; } - - [JsonProperty("adult")] - public bool Adult { get; set; } - - [JsonProperty("known_for_department")] - public string KnownForDepartment { get; set; } - - [JsonProperty("original_name")] - public string OriginalName { get; set; } - - [JsonProperty("popularity")] - public float Popularity { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewJob.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewJob.cs deleted file mode 100644 index aa60e9e..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/CrewJob.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class CrewJob - { - [JsonProperty("job")] - public string Job { get; set; } - - [JsonProperty("credit_id")] - public string CreditId { get; set; } - - [JsonProperty("episode_count")] - public int EpisodeCount { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/DateRange.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/DateRange.cs deleted file mode 100644 index 8b5eb21..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/DateRange.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class DateRange - { - [JsonProperty("maximum")] - public DateTime Maximum { get; set; } - - [JsonProperty("minimum")] - public DateTime Minimum { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIds.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIds.cs deleted file mode 100644 index 5bf61cb..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIds.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ExternalIds - { - [JsonProperty("freebase_id")] - public string FreebaseId { get; set; } - - [JsonProperty("freebase_mid")] - public string FreebaseMid { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("tvrage_id")] - public string TvrageId { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsMovie.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsMovie.cs deleted file mode 100644 index ffe5a62..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsMovie.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ExternalIdsMovie : ExternalIds - { - [JsonProperty("imdb_id")] - public string ImdbId { get; set; } - - [JsonProperty("facebook_id")] - public string FacebookId { get; set; } - - [JsonProperty("twitter_id")] - public string TwitterId { get; set; } - - [JsonProperty("instagram_id")] - public string InstagramId { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsPerson.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsPerson.cs deleted file mode 100644 index a72ed78..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsPerson.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ExternalIdsPerson : ExternalIds - { - [JsonProperty("facebook_id")] - public string FacebookId { get; set; } - - [JsonProperty("imdb_id")] - public string ImdbId { get; set; } - - [JsonProperty("twitter_id")] - public string TwitterId { get; set; } - - [JsonProperty("instagram_id")] - public string InstagramId { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvEpisode.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvEpisode.cs deleted file mode 100644 index c833c49..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvEpisode.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ExternalIdsTvEpisode : ExternalIds - { - [JsonProperty("imdb_id")] - public string ImdbId { get; set; } - - [JsonProperty("tvdb_id")] - public string TvdbId { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvSeason.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvSeason.cs deleted file mode 100644 index 3770a30..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvSeason.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ExternalIdsTvSeason : ExternalIds - { - [JsonProperty("tvdb_id")] - public string TvdbId { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvShow.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvShow.cs deleted file mode 100644 index 7880423..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ExternalIdsTvShow.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ExternalIdsTvShow : ExternalIds - { - [JsonProperty("imdb_id")] - public string ImdbId { get; set; } - - [JsonProperty("tvdb_id")] - public string TvdbId { get; set; } - - [JsonProperty("facebook_id")] - public string FacebookId { get; set; } - - [JsonProperty("twitter_id")] - public string TwitterId { get; set; } - - [JsonProperty("instagram_id")] - public string InstagramId { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Genre.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Genre.cs deleted file mode 100644 index e58e7a2..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Genre.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class Genre - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ImageData.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ImageData.cs deleted file mode 100644 index 71ef534..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ImageData.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ImageData - { - [JsonProperty("aspect_ratio")] - public double AspectRatio { get; set; } - - [JsonProperty("file_path")] - public string FilePath { get; set; } - - [JsonProperty("height")] - public int Height { get; set; } - - /// - /// A language code, e.g. en - /// - [JsonProperty("iso_639_1")] - public string Iso_639_1 { get; set; } - - [JsonProperty("vote_average")] - public double VoteAverage { get; set; } - - [JsonProperty("vote_count")] - public int VoteCount { get; set; } - - [JsonProperty("width")] - public int Width { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Images.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Images.cs deleted file mode 100644 index 32a4fca..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Images.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class Images - { - [JsonProperty("backdrops")] - public List Backdrops { get; set; } - - [JsonProperty("posters")] - public List Posters { get; set; } - - [JsonProperty("logos")] - public List Logos { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ImagesWithId.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ImagesWithId.cs deleted file mode 100644 index 0ed63ad..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ImagesWithId.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ImagesWithId : Images - { - [JsonProperty("id")] - public int Id { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Job.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Job.cs deleted file mode 100644 index 8e1130a..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Job.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class Job - { - [JsonProperty("department")] - public string Department { get; set; } - - [JsonProperty("jobs")] - public List Jobs { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Keyword.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Keyword.cs deleted file mode 100644 index 584633a..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Keyword.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class Keyword - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/MediaType.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/MediaType.cs deleted file mode 100644 index 17d9056..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/MediaType.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Utilities; -using TMDbLib.Utilities.Converters; - -namespace TMDbLib.Objects.General -{ - [JsonConverter(typeof(EnumStringValueConverter))] - public enum MediaType - { - Unknown, - - [EnumValue("movie")] - Movie = 1, - - [EnumValue("tv")] - Tv = 2, - - [EnumValue("person")] - Person = 3, - - [EnumValue("episode")] - Episode = 4 - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PersonResult.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PersonResult.cs deleted file mode 100644 index e190ac1..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PersonResult.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.Search; - -namespace TMDbLib.Objects.General -{ - public class PersonResult - { - [JsonProperty("adult")] - public bool Adult { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("known_for")] - public List KnownFor { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("popularity")] - public double Popularity { get; set; } - - [JsonProperty("profile_path")] - public string ProfilePath { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PostReply.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PostReply.cs deleted file mode 100644 index 68c0863..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PostReply.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - internal class PostReply - { - [JsonProperty("status_code")] - public int StatusCode { get; set; } - - [JsonProperty("status_message")] - public string StatusMessage { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PosterImages.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PosterImages.cs deleted file mode 100644 index 65dbad2..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/PosterImages.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class PosterImages - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("posters")] - public List Posters { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ProductionCompany.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ProductionCompany.cs deleted file mode 100644 index f200d75..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ProductionCompany.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ProductionCompany - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("logo_path")] - public string LogoPath { get; set; } - - [JsonProperty("origin_country")] - public string OriginCountry { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ProductionCountry.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ProductionCountry.cs deleted file mode 100644 index 4a42e50..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ProductionCountry.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace TMDbLib.Objects.General -{ - public class ProductionCountry - { - /// - /// A country code, e.g. US - /// - public string Iso_3166_1 { get; set; } - - public string Name { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ResultContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ResultContainer.cs deleted file mode 100644 index 03715a5..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/ResultContainer.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class ResultContainer - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("results")] - public List Results { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainer.cs deleted file mode 100644 index 0af2c95..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainer.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class SearchContainer - { - [JsonProperty("page")] - public int Page { get; set; } - - [JsonProperty("results")] - public List Results { get; set; } - - [JsonProperty("total_pages")] - public int TotalPages { get; set; } - - [JsonProperty("total_results")] - public int TotalResults { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainerWithDates.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainerWithDates.cs deleted file mode 100644 index 76f5f1b..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainerWithDates.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class SearchContainerWithDates : SearchContainer - { - [JsonProperty("dates")] - public DateRange Dates { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainerWithId.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainerWithId.cs deleted file mode 100644 index d041e3f..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SearchContainerWithId.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace TMDbLib.Objects.General -{ - public class SearchContainerWithId : SearchContainer - { - public int Id { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SingleResultContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SingleResultContainer.cs deleted file mode 100644 index 006daa1..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SingleResultContainer.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class SingleResultContainer - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("results")] - public T Results { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SortOrder.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SortOrder.cs deleted file mode 100644 index 443fdfa..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/SortOrder.cs +++ /dev/null @@ -1,13 +0,0 @@ -using TMDbLib.Utilities; - -namespace TMDbLib.Objects.General -{ - public enum SortOrder - { - Undefined = 0, - [EnumValue("asc")] - Ascending = 1, - [EnumValue("desc")] - Descending = 2 - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/StillImages.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/StillImages.cs deleted file mode 100644 index 2640bbc..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/StillImages.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class StillImages - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("stills")] - public List Stills { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TMDbConfig.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TMDbConfig.cs deleted file mode 100644 index 3af229b..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TMDbConfig.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class TMDbConfig - { - [JsonProperty("change_keys")] - public List ChangeKeys { get; set; } - - [JsonProperty("images")] - public ConfigImageTypes Images { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Translation.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Translation.cs deleted file mode 100644 index fc46ee5..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Translation.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class Translation - { - [JsonProperty("english_name")] - public string EnglishName { get; set; } - - /// - /// A language code, e.g. en - /// - [JsonProperty("iso_639_1")] - public string Iso_639_1 { get; set; } - - [JsonProperty("iso_3166_1")] - public string Iso_3166_1 { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("data")] - public TranslationData Data { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationData.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationData.cs deleted file mode 100644 index e3610a4..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationData.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class TranslationData - { - [JsonProperty("name")] - public string Name { get; set; } - - // Private hack to ensure two properties (name, title) are deserialized into Name. - // Tv Shows and Movies will use different names for their translation data. - [JsonProperty("title")] - private string Title - { - set => Name = value; - } - - [JsonProperty("overview")] - public string Overview { get; set; } - - [JsonProperty("homepage")] - public string HomePage { get; set; } - - [JsonProperty("tagline")] - public string Tagline { get; set; } - - [JsonProperty("runtime")] - public int Runtime { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationsContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationsContainer.cs deleted file mode 100644 index 496707e..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationsContainer.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class TranslationsContainer - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("translations")] - public List Translations { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationsContainerTv.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationsContainerTv.cs deleted file mode 100644 index cffd92a..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/TranslationsContainerTv.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class TranslationsContainerTv - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("translations")] - public List Translations { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Video.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Video.cs deleted file mode 100644 index 694aa63..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/Video.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class Video - { - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A country code, e.g. US - /// - [JsonProperty("iso_3166_1")] - public string Iso_3166_1 { get; set; } - - /// - /// A language code, e.g. en - /// - [JsonProperty("iso_639_1")] - public string Iso_639_1 { get; set; } - - [JsonProperty("key")] - public string Key { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("site")] - public string Site { get; set; } - - [JsonProperty("size")] - public int Size { get; set; } - - [JsonProperty("type")] - public string Type { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviderItem.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviderItem.cs deleted file mode 100644 index ae4f271..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviderItem.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class WatchProviderItem - { - [JsonProperty("display_priority")] - public int? DisplayPriority { get; set; } - - [JsonProperty("logo_path")] - public string LogoPath { get; set; } - - [JsonProperty("provider_id")] - public int? ProviderId { get; set; } - - [JsonProperty("provider_name")] - public string ProviderName { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviderRegion.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviderRegion.cs deleted file mode 100644 index d6301ea..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviderRegion.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class WatchProviderRegion - { - /// - /// A country code, e.g. US - /// - [JsonProperty("iso_3166_1")] - public string Iso_3166_1 { get; set; } - - [JsonProperty("english_name")] - public string EnglishName { get; set; } - - [JsonProperty("native_name")] - public string NativeName { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviders.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviders.cs deleted file mode 100644 index 1867e0b..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/General/WatchProviders.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.General -{ - public class WatchProviders - { - [JsonProperty("link")] - public string Link { get; set; } - - [JsonProperty("flatrate")] - public List FlatRate { get; set; } - - [JsonProperty("rent")] - public List Rent { get; set; } - - [JsonProperty("buy")] - public List Buy { get; set; } - - [JsonProperty("free")] - public List Free { get; set; } - - [JsonProperty("ads")] - public List Ads { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Genres/GenreContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Genres/GenreContainer.cs deleted file mode 100644 index 09599a7..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Genres/GenreContainer.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.General; - -namespace TMDbLib.Objects.Genres -{ - public class GenreContainer - { - [JsonProperty("genres")] - public List Genres { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Languages/Language.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Languages/Language.cs deleted file mode 100644 index c57c924..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Languages/Language.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Languages -{ - public class Language - { - [JsonProperty("iso_639_1")] - public string Iso_639_1 { get; set; } - - [JsonProperty("english_name")] - public string EnglishName { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/AccountList.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/AccountList.cs deleted file mode 100644 index 1595c39..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/AccountList.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Objects.General; - -namespace TMDbLib.Objects.Lists -{ - public class AccountList : TMDbList - { - [JsonProperty("list_type")] - public MediaType ListType { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/GenericList.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/GenericList.cs deleted file mode 100644 index 7b24513..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/GenericList.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.Search; - -namespace TMDbLib.Objects.Lists -{ - public class GenericList : TMDbList - { - [JsonProperty("created_by")] - public string CreatedBy { get; set; } - - [JsonProperty("items")] - public List Items { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/ListCreateReply.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/ListCreateReply.cs deleted file mode 100644 index 0e497fc..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/ListCreateReply.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Lists -{ - internal class ListCreateReply - { - [JsonProperty("list_id")] - public string ListId { get; set; } - - [JsonProperty("status_code")] - public int StatusCode { get; set; } - - [JsonProperty("status_message")] - public string StatusMessage { get; set; } - - [JsonProperty("success")] - public bool Success { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/ListStatus.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/ListStatus.cs deleted file mode 100644 index 11fec4a..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/ListStatus.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Lists -{ - public class ListStatus - { - [JsonProperty("id")] - public string Id { get; set; } - - [JsonProperty("item_present")] - public bool ItemPresent { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/TMDbList.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/TMDbList.cs deleted file mode 100644 index cf60f96..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Lists/TMDbList.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Lists -{ - public abstract class TMDbList - { - [JsonProperty("description")] - public string Description { get; set; } - - [JsonProperty("favorite_count")] - public int FavoriteCount { get; set; } - - [JsonProperty("id")] - public TId Id { get; set; } - - /// - /// A language code, e.g. en - /// - [JsonProperty("iso_639_1")] - public string Iso_639_1 { get; set; } - - [JsonProperty("item_count")] - public int ItemCount { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("poster_path")] - public string PosterPath { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/AlternativeTitles.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/AlternativeTitles.cs deleted file mode 100644 index d882b2b..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/AlternativeTitles.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.General; - -namespace TMDbLib.Objects.Movies -{ - public class AlternativeTitles - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("titles")] - public List Titles { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Cast.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Cast.cs deleted file mode 100644 index f6317a2..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Cast.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Objects.People; - -namespace TMDbLib.Objects.Movies -{ - public class Cast - { - [JsonProperty("cast_id")] - public int CastId { get; set; } - - [JsonProperty("character")] - public string Character { get; set; } - - [JsonProperty("credit_id")] - public string CreditId { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("order")] - public int Order { get; set; } - - [JsonProperty("profile_path")] - public string ProfilePath { get; set; } - - [JsonProperty("gender")] - public PersonGender Gender { get; set; } - - [JsonProperty("adult")] - public bool Adult { get; set; } - - [JsonProperty("known_for_department")] - public string KnownForDepartment { get; set; } - - [JsonProperty("original_name")] - public string OriginalName { get; set; } - - [JsonProperty("popularity")] - public float Popularity { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Country.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Country.cs deleted file mode 100644 index 427796d..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Country.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using Newtonsoft.Json; - -namespace TMDbLib.Objects.Movies -{ - public class Country - { - [JsonProperty("certification")] - public string Certification { get; set; } - - /// - /// A country code, e.g. US - /// - [JsonProperty("iso_3166_1")] - public string Iso_3166_1 { get; set; } - - [JsonProperty("primary")] - public bool Primary { get; set; } - - [JsonProperty("release_date")] - public DateTime? ReleaseDate { get; set; } - } -} diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Credits.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Credits.cs deleted file mode 100644 index 2333b6c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Credits.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.General; - -namespace TMDbLib.Objects.Movies -{ - public class Credits - { - [JsonProperty("cast")] - public List Cast { get; set; } - - [JsonProperty("crew")] - public List Crew { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/KeywordsContainer.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/KeywordsContainer.cs deleted file mode 100644 index 5431b9c..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/KeywordsContainer.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.General; - -namespace TMDbLib.Objects.Movies -{ - public class KeywordsContainer - { - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("keywords")] - public List Keywords { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/ListResult.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/ListResult.cs deleted file mode 100644 index abce722..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/ListResult.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Newtonsoft.Json; -using TMDbLib.Objects.General; - -namespace TMDbLib.Objects.Movies -{ - public class ListResult - { - [JsonProperty("description")] - public string Description { get; set; } - - [JsonProperty("favorite_count")] - public int FavoriteCount { get; set; } - - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// A language code, e.g. en - /// - [JsonProperty("iso_639_1")] - public string Iso_639_1 { get; set; } - - [JsonProperty("item_Count")] - public int ItemCount { get; set; } - - [JsonProperty("list_type")] - public MediaType ListType { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("poster_path")] - public string PosterPath { get; set; } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Movie.cs b/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Movie.cs deleted file mode 100644 index b69616a..0000000 --- a/Jellyfin.Plugin.MetaShark/Vendor/TMDbLib/Objects/Movies/Movie.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.Collections.Generic; -using Newtonsoft.Json; -using TMDbLib.Objects.Changes; -using TMDbLib.Objects.General; -using TMDbLib.Objects.Reviews; -using TMDbLib.Objects.Search; - -namespace TMDbLib.Objects.Movies -{ - public class Movie - { - [JsonProperty("account_states")] - public AccountState AccountStates { get; set; } - - [JsonProperty("adult")] - public bool Adult { get; set; } - - [JsonProperty("alternative_titles")] - public AlternativeTitles AlternativeTitles { get; set; } - - [JsonProperty("backdrop_path")] - public string BackdropPath { get; set; } - - [JsonProperty("belongs_to_collection")] - public SearchCollection BelongsToCollection { get; set; } - - [JsonProperty("budget")] - public long Budget { get; set; } - - [JsonProperty("changes")] - public ChangesContainer Changes { get; set; } - - [JsonProperty("credits")] - public Credits Credits { get; set; } - - [JsonProperty("genres")] - public List Genres { get; set; } - - [JsonProperty("homepage")] - public string Homepage { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("images")] - public Images Images { get; set; } - - [JsonProperty("imdb_id")] - public string ImdbId { get; set; } - - [JsonProperty("keywords")] - public KeywordsContainer Keywords { get; set; } - - [JsonProperty("lists")] - public SearchContainer Lists { get; set; } - - [JsonProperty("original_language")] - public string OriginalLanguage { get; set; } - - [JsonProperty("original_title")] - public string OriginalTitle { get; set; } - - [JsonProperty("overview")] - public string Overview { get; set; } - - [JsonProperty("popularity")] - public double Popularity { get; set; } - - [JsonProperty("poster_path")] - public string PosterPath { get; set; } - - [JsonProperty("production_companies")] - public List ProductionCompanies { get; set; } - - [JsonProperty("production_countries")] - public List ProductionCountries { get; set; } - - [JsonProperty("release_date")] - public DateTime? ReleaseDate { get; set; } - - [JsonProperty("release_dates")] - public ResultContainer ReleaseDates { get; set; } - - [JsonProperty("external_ids")] - public ExternalIdsMovie ExternalIds { get; set; } - - [JsonProperty("releases")] - public Releases Releases { get; set; } - - [JsonProperty("revenue")] - public long Revenue { get; set; } - - [JsonProperty("reviews")] - public SearchContainer Reviews { get; set; } - - [JsonProperty("runtime")] - public int? Runtime { get; set; } - - [JsonProperty("similar")] - public SearchContainer Similar { get; set; } - - [JsonProperty("recommendations")] - public SearchContainer Recommendations { get; set; } - - [JsonProperty("spoken_languages")] - public List SpokenLanguages { get; set; } - - [JsonProperty("status")] - public string Status { get; set; } - - [JsonProperty("tagline")] - public string Tagline { get; set; } - - [JsonProperty("title")] - public string Title { get; set; } - - [JsonProperty("translations")] - public TranslationsContainer Translations { get; set; } - - [JsonProperty("video")] - public bool Video { get; set; } - - [JsonProperty("videos")] - public ResultContainer