mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-13 10:48:26 -04:00
dev: Added initial version of the grpc api. Added relevant dummy settings to creds (they have no effect rn)
dev: Yt searches now INTERNALLY return multiple results but there is no way right now to paginate plain text results dev: moved some stuff around
This commit is contained in:
@@ -7,10 +7,9 @@ public sealed class DefaultSearchServiceFactory : ISearchServiceFactory, INServi
|
||||
{
|
||||
private readonly SearchesConfigService _scs;
|
||||
private readonly SearxSearchService _sss;
|
||||
private readonly YtDlpSearchService _ytdlp;
|
||||
private readonly GoogleSearchService _gss;
|
||||
|
||||
private readonly YtdlpYoutubeSearchService _ytdlp;
|
||||
private readonly YtdlYoutubeSearchService _ytdl;
|
||||
private readonly YoutubeDataApiSearchService _ytdata;
|
||||
private readonly InvidiousYtSearchService _iYtSs;
|
||||
private readonly GoogleScrapeService _gscs;
|
||||
@@ -20,19 +19,17 @@ public sealed class DefaultSearchServiceFactory : ISearchServiceFactory, INServi
|
||||
GoogleSearchService gss,
|
||||
GoogleScrapeService gscs,
|
||||
SearxSearchService sss,
|
||||
YtdlpYoutubeSearchService ytdlp,
|
||||
YtdlYoutubeSearchService ytdl,
|
||||
YtDlpSearchService ytdlp,
|
||||
YoutubeDataApiSearchService ytdata,
|
||||
InvidiousYtSearchService iYtSs)
|
||||
{
|
||||
_scs = scs;
|
||||
_sss = sss;
|
||||
_ytdlp = ytdlp;
|
||||
_gss = gss;
|
||||
_gscs = gscs;
|
||||
_iYtSs = iYtSs;
|
||||
|
||||
_ytdlp = ytdlp;
|
||||
_ytdl = ytdl;
|
||||
_ytdata = ytdata;
|
||||
}
|
||||
|
||||
@@ -57,9 +54,8 @@ public sealed class DefaultSearchServiceFactory : ISearchServiceFactory, INServi
|
||||
=> _scs.Data.YtProvider switch
|
||||
{
|
||||
YoutubeSearcher.YtDataApiv3 => _ytdata,
|
||||
YoutubeSearcher.Ytdlp => _ytdlp,
|
||||
YoutubeSearcher.Ytdl => _ytdl,
|
||||
YoutubeSearcher.Invidious => _iYtSs,
|
||||
_ => _ytdl
|
||||
YoutubeSearcher.Ytdlp => _ytdlp,
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user