Exemplo n.º 1
0
        public async Task <IEnumerable <StreamingData> > GetStreamInformation(int movieDbId, CancellationToken cancellationToken)
        {
            var providers = await _movieApi.GetTvWatchProviders(movieDbId, cancellationToken);

            var results = await GetUserWatchProvider(providers);

            var data = new List <StreamingData>();

            foreach (var result in results)
            {
                data.Add(new StreamingData
                {
                    Logo              = result.logo_path,
                    Order             = result.display_priority,
                    StreamingProvider = result.provider_name
                });
            }

            return(data);
        }