Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube Shorts not supported? #1026

Open
almatross opened this issue Mar 18, 2023 · 5 comments
Open

Youtube Shorts not supported? #1026

almatross opened this issue Mar 18, 2023 · 5 comments

Comments

@almatross
Copy link

I was trying to play a youtube short with

!pl https://www.youtube.com/shorts/OOXZx0QkY04

That returned a Error: Could not load. (youtube: The id could not get parsed.)

This is the stack trace

2023-03-18 12:16:24.3274|DEBUG|0|Bot.TryCatchCommand Command Error (Could not load. (youtube: The id could not get parsed.))                                                     TS3AudioBot.AudioBotException: Could not load. (youtube: The id could not get parsed.)
   at TS3AudioBot.ResourceFactories.ResourceResolver.Load(ResolveContext ctx, String message, String audioType) in C:\projects\ts3audiobot\TS3AudioBot\ResourceFactories\ResourceResolver.cs:line 136
   at TS3AudioBot.Audio.PlayManager.Play(InvokerData invoker, String link, String audioType, PlayInfo meta) in C:\projects\ts3audiobot\TS3AudioBot\Audio\PlayManager.cs:line 122    at TS3AudioBot.MainCommands.CommandPlay(PlayManager playManager, InvokerData invoker, String url, String[] attributes) in C:\projects\ts3audiobot\TS3AudioBot\MainCommands.cs:line 1195
   at TS3AudioBot.CommandSystem.Commands.FunctionCommand.ExecuteFunction(Object[] parameters) in C:\projects\ts3audiobot\TS3AudioBot\CommandSystem\Commands\FunctionCommand.cs:line 81
   at TS3AudioBot.CommandSystem.Commands.FunctionCommand.Execute(ExecutionInformation info, IReadOnlyList`1 arguments) in C:\projects\ts3audiobot\TS3AudioBot\CommandSystem\Commands\FunctionCommand.cs:line 203
   at TS3AudioBot.CommandSystem.BotCommand.Execute(ExecutionInformation info, IReadOnlyList`1 arguments) in C:\projects\ts3audiobot\TS3AudioBot\CommandSystem\BotCommand.cs:line 131                                                                                                                                                                                 at TS3AudioBot.CommandSystem.Commands.OverloadedFunctionCommand.Execute(ExecutionInformation info, IReadOnlyList`1 arguments) in C:\projects\ts3audiobot\TS3AudioBot\CommandSystem\Commands\OverloadedFunctionCommand.cs:line 84
   at TS3AudioBot.CommandSystem.Commands.CommandGroup.Execute(ExecutionInformation info, IReadOnlyList`1 arguments) in C:\projects\ts3audiobot\TS3AudioBot\CommandSystem\Commands\CommandGroup.cs:line 63                                                                                                                                                            at TS3AudioBot.CommandSystem.Commands.RootCommand.Execute(ExecutionInformation info, IReadOnlyList`1 arguments) in C:\projects\ts3audiobot\TS3AudioBot\CommandSystem\Commands\RootCommand.cs:line 41
   at TS3AudioBot.CommandSystem.CommandManager.Execute(ExecutionInformation info, String command) in C:\projects\ts3audiobot\TS3AudioBot\CommandSystem\CommandManager.cs:line 401   at TS3AudioBot.Bot.<>c__DisplayClass42_0.<<CallScript>b__0>d.MoveNext() in C:\projects\ts3audiobot\TS3AudioBot\Bot.cs:line 503
--- End of stack trace from previous location where exception was thrown ---
   at TS3AudioBot.Bot.TryCatchCommand(ExecutionInformation info, Boolean answer, Func`1 action) in C:\projects\ts3audiobot\TS3AudioBot\Bot.cs:line 530
2023-03-18 12:16:24.4520|DEBUG|0|TsFullClient.SendCommandBase [O] sendtextmessage targetmode=3 target=1 msg=[B][COLOR=red]Error:\s[\/B]Could\snot\sload.\s(youtube:\sThe\sid\scould\snot\sget\sparsed.) return_code=3

I'm guessing this is just not supported or am I doing something wrong? yt-dlp downloads the youtube short normally

Flakebi added a commit that referenced this issue Mar 26, 2023
Just need to extract the id from the url, the rest works as before.
Fixes #1026.
@Flakebi
Copy link
Collaborator

Flakebi commented Mar 26, 2023

YouTube shorts were indeed not working because the bot failed to extract the video id. I pushed a fix to the develop branch, it should work now.

@almatross
Copy link
Author

Thanks. I cannot test it unfortunately as the howto for build for Linux keeps failing for dotnet5

/usr/share/dotnet/sdk/5.0.408/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 6.0.  Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 6.0. [/home/alma/ts3audiobotbuild/TS3AudioBot/TSLib/TSLib.csproj]

dotnet 6 also didn't work as there were serveral errors like

/home/alma/ts3audiobotbuild/TS3AudioBot/TSLib/TSLibAutogen/TSLibAutogen.Autogen/Messages.g.cs(5873,10): error CS0246: The type or namespace name 'IconHash' could not be found (are you missing a using directive or an assembly reference?) [/home/alma/ts3audiobotbuild/TS3AudioBot/TSLib/TSLib.csproj] 

@Flakebi
Copy link
Collaborator

Flakebi commented Apr 15, 2023

Can you check if your submodules are up-to-date? git status should say that ‘Your branch is up to date’. You can always run git submodule update --init --recursive if you are unsure.
Also, can you try dotnet 6 and running dotnet run -c Release --project TS3AudioBot?

That is working for me.

Sounds like the build instructions are out-of-date as they still refer to .net 5.

@almatross
Copy link
Author

almatross commented Apr 26, 2023

Working for me too now.
Thanks.

@DeadLyBro
Copy link

or change url like this;
youtube.com/shorts/id
to
youtube.com/watch?v=id

I'm using yt-dlp. Idk if its work with youtube-dl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants