add: Added .q support for invidious. If you have ytProvider set to invidious in data/searches.yml, invidious will be used to queue up songs and play them."work

This commit is contained in:
Kwoth
2024-09-18 13:26:34 +00:00
parent e4202b33f5
commit 0326e88910
25 changed files with 327 additions and 87 deletions

View File

@@ -7,7 +7,7 @@ namespace NadekoBot.Modules.Searches;
public partial class SearchesConfig : ICloneable<SearchesConfig>
{
[Comment("DO NOT CHANGE")]
public int Version { get; set; } = 0;
public int Version { get; set; } = 3;
[Comment("""
Which engine should .search command
@@ -26,7 +26,7 @@ public partial class SearchesConfig : ICloneable<SearchesConfig>
[Comment("""
Which search provider will be used for the `.youtube` command.
Which search provider will be used for the `.youtube` and `.q` commands.
- `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console
@@ -58,7 +58,6 @@ public partial class SearchesConfig : ICloneable<SearchesConfig>
[Comment("""
Set the invidious instance urls in case you want to use 'invidious' for `.youtube` search
Nadeko will use a random one for each request.
These instances may be used for music queue functionality in the future.
Use a fully qualified url. Example: https://my-invidious-instance.mydomain.com
Instances specified must have api available.

View File

@@ -54,5 +54,13 @@ public class SearchesConfigService : ConfigServiceBase<SearchesConfig>
c.Version = 2;
});
}
if (data.Version < 3)
{
ModifyConfig(c =>
{
c.Version = 3;
});
}
}
}