Merge pull request #819 from thornbill/media-segment-api

Add media segments API support
This commit is contained in:
Bill Thornton 2024-10-28 16:32:55 -04:00 committed by GitHub
commit 3db4861f2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 2 deletions

View File

@ -5,12 +5,12 @@
*/
import { describe, it, expect } from 'vitest';
import { getActivityLogApi, getApiKeyApi, getArtistsApi, getAudioApi, getBrandingApi, getChannelsApi, getClientLogApi, getCollectionApi, getConfigurationApi, getDashboardApi, getDevicesApi, getDisplayPreferencesApi, getDynamicHlsApi, getEnvironmentApi, getFilterApi, getGenresApi, getHlsSegmentApi, getImageApi, getInstantMixApi, getItemLookupApi, getItemRefreshApi, getItemUpdateApi, getItemsApi, getLibraryApi, getLibraryStructureApi, getLiveTvApi, getLocalizationApi, getLyricsApi, getMediaInfoApi, getMoviesApi, getMusicGenresApi, getPackageApi, getPersonsApi, getPlaylistsApi, getPlaystateApi, getPluginsApi, getQuickConnectApi, getRemoteImageApi, getScheduledTasksApi, getSearchApi, getSessionApi, getStartupApi, getStudiosApi, getSubtitleApi, getSuggestionsApi, getSyncPlayApi, getSystemApi, getTimeSyncApi, getTmdbApi, getTrailersApi, getTrickplayApi, getTvShowsApi, getUniversalAudioApi, getUserApi, getUserLibraryApi, getUserViewsApi, getVideoAttachmentsApi, getVideosApi, getYearsApi } from '..';
import { getActivityLogApi, getApiKeyApi, getArtistsApi, getAudioApi, getBrandingApi, getChannelsApi, getClientLogApi, getCollectionApi, getConfigurationApi, getDashboardApi, getDevicesApi, getDisplayPreferencesApi, getDynamicHlsApi, getEnvironmentApi, getFilterApi, getGenresApi, getHlsSegmentApi, getImageApi, getInstantMixApi, getItemLookupApi, getItemRefreshApi, getItemUpdateApi, getItemsApi, getLibraryApi, getLibraryStructureApi, getLiveTvApi, getLocalizationApi, getLyricsApi, getMediaInfoApi, getMediaSegmentsApi, getMoviesApi, getMusicGenresApi, getPackageApi, getPersonsApi, getPlaylistsApi, getPlaystateApi, getPluginsApi, getQuickConnectApi, getRemoteImageApi, getScheduledTasksApi, getSearchApi, getSessionApi, getStartupApi, getStudiosApi, getSubtitleApi, getSuggestionsApi, getSyncPlayApi, getSystemApi, getTimeSyncApi, getTmdbApi, getTrailersApi, getTrickplayApi, getTvShowsApi, getUniversalAudioApi, getUserApi, getUserLibraryApi, getUserViewsApi, getVideoAttachmentsApi, getVideosApi, getYearsApi } from '..';
import { SERVER_URL, TEST_CLIENT, TEST_DEVICE } from '../../../__helpers__/common';
import { Api } from '../../../api';
import { ActivityLogApi, ApiKeyApi, ArtistsApi, AudioApi, BrandingApi, ChannelsApi, ClientLogApi, CollectionApi, ConfigurationApi, DashboardApi, DevicesApi, DisplayPreferencesApi, DynamicHlsApi, EnvironmentApi, FilterApi, GenresApi, HlsSegmentApi, ImageApi, InstantMixApi, ItemLookupApi, ItemRefreshApi, ItemsApi, ItemUpdateApi, LibraryApi, LibraryStructureApi, LiveTvApi, LocalizationApi, LyricsApi, MediaInfoApi, MoviesApi, MusicGenresApi, PackageApi, PersonsApi, PlaylistsApi, PlaystateApi, PluginsApi, QuickConnectApi, RemoteImageApi, ScheduledTasksApi, SearchApi, SessionApi, StartupApi, StudiosApi, SubtitleApi, SuggestionsApi, SyncPlayApi, SystemApi, TimeSyncApi, TmdbApi, TrailersApi, TrickplayApi, TvShowsApi, UniversalAudioApi, UserApi, UserLibraryApi, UserViewsApi, VideoAttachmentsApi, VideosApi, YearsApi } from '../../../generated-client/api';
import { ActivityLogApi, ApiKeyApi, ArtistsApi, AudioApi, BrandingApi, ChannelsApi, ClientLogApi, CollectionApi, ConfigurationApi, DashboardApi, DevicesApi, DisplayPreferencesApi, DynamicHlsApi, EnvironmentApi, FilterApi, GenresApi, HlsSegmentApi, ImageApi, InstantMixApi, ItemLookupApi, ItemRefreshApi, ItemsApi, ItemUpdateApi, LibraryApi, LibraryStructureApi, LiveTvApi, LocalizationApi, LyricsApi, MediaInfoApi, MediaSegmentsApi, MoviesApi, MusicGenresApi, PackageApi, PersonsApi, PlaylistsApi, PlaystateApi, PluginsApi, QuickConnectApi, RemoteImageApi, ScheduledTasksApi, SearchApi, SessionApi, StartupApi, StudiosApi, SubtitleApi, SuggestionsApi, SyncPlayApi, SystemApi, TimeSyncApi, TmdbApi, TrailersApi, TrickplayApi, TvShowsApi, UniversalAudioApi, UserApi, UserLibraryApi, UserViewsApi, VideoAttachmentsApi, VideosApi, YearsApi } from '../../../generated-client/api';
/**
* Api helper function tests.
@ -50,6 +50,7 @@ describe('Api Utilities', () => {
expect(getLocalizationApi(api)).toBeInstanceOf(LocalizationApi);
expect(getLyricsApi(api)).toBeInstanceOf(LyricsApi);
expect(getMediaInfoApi(api)).toBeInstanceOf(MediaInfoApi);
expect(getMediaSegmentsApi(api)).toBeInstanceOf(MediaSegmentsApi);
expect(getMoviesApi(api)).toBeInstanceOf(MoviesApi);
expect(getMusicGenresApi(api)).toBeInstanceOf(MusicGenresApi);
expect(getPackageApi(api)).toBeInstanceOf(PackageApi);

View File

@ -33,6 +33,7 @@ export * from './live-tv-api';
export * from './localization-api';
export * from './lyrics-api';
export * from './media-info-api';
export * from './media-segments-api';
export * from './movies-api';
export * from './music-genres-api';
export * from './package-api';

View File

@ -0,0 +1,13 @@
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import type { Api } from '../../api';
import { MediaSegmentsApi } from '../../generated-client/api/media-segments-api';
export function getMediaSegmentsApi(api: Api): MediaSegmentsApi {
return new MediaSegmentsApi(api.configuration, undefined, api.axiosInstance);
}