mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
cleanup and throttle API calls
This commit is contained in:
parent
85302bded0
commit
7a7abf577e
2 changed files with 2 additions and 8 deletions
|
@ -15,8 +15,6 @@ namespace NzbDrone.Core.ImportLists.Youtube
|
|||
public abstract class YoutubeImportListBase<TSettings> : ImportListBase<TSettings>
|
||||
where TSettings : YoutubePlaylistSettings, new()
|
||||
{
|
||||
private IHttpClient _httpClient;
|
||||
|
||||
protected YoutubeImportListBase(IImportListStatusService importListStatusService,
|
||||
IConfigService configService,
|
||||
IParsingService parsingService,
|
||||
|
@ -24,7 +22,6 @@ namespace NzbDrone.Core.ImportLists.Youtube
|
|||
Logger logger)
|
||||
: base(importListStatusService, configService, parsingService, logger)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
}
|
||||
|
||||
public override ImportListType ListType => ImportListType.Youtube;
|
||||
|
@ -45,11 +42,6 @@ namespace NzbDrone.Core.ImportLists.Youtube
|
|||
return CleanupListItems(releases);
|
||||
}
|
||||
|
||||
public IList<YoutubeImportListItemInfo> MapYoutubeReleases(IList<YoutubeImportListItemInfo> items)
|
||||
{
|
||||
return items;
|
||||
}
|
||||
|
||||
public abstract IList<YoutubeImportListItemInfo> Fetch(YouTubeService service);
|
||||
|
||||
protected override void Test(List<ValidationFailure> failures)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using DryIoc.ImTools;
|
||||
using FluentValidation.Results;
|
||||
using Google.Apis.YouTube.v3;
|
||||
|
@ -62,6 +63,7 @@ namespace NzbDrone.Core.ImportLists.Youtube
|
|||
results.Add(listItem);
|
||||
}
|
||||
|
||||
Thread.Sleep(TimeSpan.FromSeconds(1));
|
||||
playlist = req.Execute();
|
||||
}
|
||||
while (playlist.NextPageToken != null && page < 10);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue