mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 18:28:27 -04:00
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:
@@ -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.
|
||||
|
@@ -54,5 +54,13 @@ public class SearchesConfigService : ConfigServiceBase<SearchesConfig>
|
||||
c.Version = 2;
|
||||
});
|
||||
}
|
||||
|
||||
if (data.Version < 3)
|
||||
{
|
||||
ModifyConfig(c =>
|
||||
{
|
||||
c.Version = 3;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user