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 playlist does not start from the autoexec service #961

Closed
trick72 opened this issue Nov 5, 2024 · 11 comments
Closed

youtube playlist does not start from the autoexec service #961

trick72 opened this issue Nov 5, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@trick72
Copy link

trick72 commented Nov 5, 2024

Context

Please provide any relevant information about your setup

  • Add-on Version: 7.1.0.1
  • Kodi Version: 21.1
  • Kodi GUI Language:gb-en
  • Operating System:Librelec latest on Raspberry PI 5
  • Operating System Language: English

Expected Behavior

When starting up my box, I have created the autoexec.py and addon.xml as described in https://kodi.wiki/view/Autoexec_Service.
The contents of my autoexec.py is:
import xbmc
xbmc.executebuiltin("RunPlugin(plugin://plugin.video.youtube/play/?playlist_id=PL6R9gjAqjmXj3PKCl7Ddgs6-xhBo5Dy1l&pp=gAQBiAQB&order=shuffle&play=1)")

Therefore, the youtube playlist should start playing automatically on startup


Current Behavior

What is the current behavior?

when starting up, I get several times the message "no streams found" with the youtube addon logo in the upper right corner of the screen. (probably as many times as there are videos in the playlist). At the end I got the error "One or more items failed to play, check the log for more details") and further nothing happens.


Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. create autoexec.py and addon.xml in storage.kodi\addons\service.autoexec
  2. reboot
  3. enable the new autoexec service in add-ons

Log

Please include a complete debug log.

I see this for each item in playlist:
2024-11-05 14:42:15.412 T:1036 error : Playlist Player: skipping unplayable item: 30, path [plugin://plugin.video.youtube/play/?video_id=oJL-lCzEXgI]
2024-11-05 14:42:15.414 T:1079 info : [plugin.video.youtube] Running: YouTube (7.1.0.1+unofficial.1) on Omega (Kodi-21.1) with Python 3.11.9
Path: /play/
Params: {'video_id': 'jK9UUcd29AQ'}
2024-11-05 14:42:16.073 T:1079 error : [plugin.video.youtube] yt_play.play_video - No streams found:
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/plugin.py", line 16, in
plugin_runner.run()
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/plugin_runner.py", line 62, in run
plugin.run(provider, context, focused=(current_uri == new_uri))
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/plugin/xbmc/xbmc_plugin.py", line 175, in run
result, options = provider.navigate(context)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/kodion/abstract_provider.py", line 174, in navigate
result = handler(provider=self, context=context, re_match=re_match)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/yt_play.py", line 361, in process
media_item = _play_stream(provider, context)
File "/storage/.kodi/addons/plugin.video.youtube/resources/lib/youtube_plugin/youtube/helper/yt_play.py", line 79, in _play_stream
exc=exc, details=''.join(format_stack())


Additional Information

Please provide any additional information that may be helpful.

When I manually stop and the start the autoexec service in my addons, than the youtube playlist does start to play right away. This indicates the contents of autoexec.py is working. Also when I double-click the autoexec.py in file manager, the playlist starts to play immediately without problems. So I only have this error when rebooting and starting up


@trick72 trick72 added the bug Something isn't working label Nov 5, 2024
@MoojMidge
Copy link
Collaborator

You will need to provide a full debug log.

The parts of the log that are not included are the parts that can explain why the issue is occurring, as opposed to the parts that are included which simply confirm that the issue has occurred.

@trick72
Copy link
Author

trick72 commented Nov 6, 2024

kodi.log

Sorry for that. Here is the full log at that time

@MoojMidge
Copy link
Collaborator

Thanks but it needs to be a debug log. Instructions for how to create one are here:
https://kodi.wiki/view/Log_file/Easy

@trick72
Copy link
Author

trick72 commented Nov 6, 2024

kodi.log
This is the full debug log... but very strange... when I boot now with the option "debug logging" enabled, the issue is gone and the playlist starts playing right away like it should... I see the fps, and debug log location white text in the upper left corner than.
When I disable debug logging and reboot, the issue is there again. So it seems more like a focus issue or something... very strange

@MoojMidge
Copy link
Collaborator

There are two issues:

  1. You have selected stream features that mean there are very limited streams available to use, and the ones that are available require this plugin to start a http server
  2. Your autoexec service is running before this plugin starts so the http server is not available

The first issue you can resolve by using the Setup Wizard in this plugin, to set it up correctly by selecting the recommended settings for a RPi5.

Will need to think about whether anything can be done about the second issue

@trick72
Copy link
Author

trick72 commented Nov 7, 2024

I used the setup wizard and set it to Rpi5 (so in fact almost all streams enabled) but this didn't solve the issue.
A few other things I noticed:

  • when it is going through the playlist during startup, displaying the "no streams found" error for each entry in the playlist very fast after each other, when I press the "back" key during this process, it starts playing a video right away, and continue to play the playlist without issues anymore.
  • when i don't press any key nothing happens and I'm just presented with the main kodi screen. However, than, I cannot play any video in the youtube plugin anymore. All give the "no streams" error, even single videos I select. Only when I restart the "inputstream adaptive" service the videos start playing again, also a full playlist.
  • when I disable the startup service entirely and boot into kodi, so it starts up without trying to start that playlist, and than I go to the youtube plugin, I can play any video or playlist I want without having to restart the inputstream adaptive.
  • I used to run the 7.1.0.1 Leia version with an older librelec on a raspberry 1, and I did not have any issues there. The playlist ran successfully with simply the autoexec.py in the userdata folder (so it did not use that autoexec.service in that older version)
  • When I enable debug logging, for some reason, it works with the autoexec service script and playing start right away. Sadly, there is that white text displaying fps and other stuff, so it isn't really usable, otherwise I could have that as a temporary workaround

@MoojMidge
Copy link
Collaborator

MoojMidge commented Nov 7, 2024

  • Only when I restart the "inputstream adaptive" service

How do you do this?

Try updating to the latest beta version:
https://github.com/anxdpanic/plugin.video.youtube/releases/tag/v7.1.1%2Bbeta.5

Then instead of a Kodi debug log, you can enable the following plugin setting:
Setting > Advanced > Logging > Enable debug logging

@trick72
Copy link
Author

trick72 commented Nov 8, 2024

kodi.log

I installed beta5 and enabled debug logging there. When I reboot now, the playlist start playing right away without the stream errors and I don't see the white text in the left corner so that looks great. Sadly I already noticed that with the beta4 version (and now also beta5), only 1 video is playing and than it goes back to the main kodi screen. I had that issue also with beta4. I tried that earlier to see if that fixes my problem, but it only plays 1 video when I select a complete playlist.

So even when I go into the youtube addon itself, select my playlist, right-click it and select "Play All" and than "shuffle" it starts playing but again only one video, and than it goes back to the main screen. This bug was not there in the main release, but seems to have started somewhere in the beta versions.
If this could be fixed, I don't mind to have debug logging enabled if this fixes the "no stream" issue, as a workaround.

  • Only when I restart the "inputstream adaptive" service

How do you do this?

I did this by going to the addon, select one previous version and than the current version again, so basically re-installing it.

MoojMidge added a commit to MoojMidge/plugin.video.youtube that referenced this issue Nov 8, 2024
@MoojMidge
Copy link
Collaborator

@trick72
Copy link
Author

trick72 commented Nov 9, 2024

This works! Good Job. The playlist plays from startup with the autoexec service now properly, even with debug log disabled. Thanks for your support.

@MoojMidge
Copy link
Collaborator

Good to hear. Will add those changes to the next release.

@trick72 trick72 closed this as completed Nov 10, 2024
This was referenced Nov 12, 2024
@MoojMidge MoojMidge mentioned this issue Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants