dmunozv04 / iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.
GNU General Public License v3.0
2.47k stars 103 forks source link

Most Replayed segment loops #187

Open reavpC6K opened 2 months ago

reavpC6K commented 2 months ago

Describe the bug Every single video we play loops at the Most Replayed peak. You have to manually seek forward. Earlier ad segments skip fine.

To Reproduce

  1. Play a popular video
  2. Reach the Most Replayed peak
  3. Video loops
  4. You can only manually seek forward

Expected behavior Shouldn't happen

Screenshots How about a video?

iSponsorBlockTV server (please complete the following information): Docker

Additional context https://www.youtube.com/watch?v=IiHFnmI8pxg Log

2024-08-19 03:30:51,271 - iSponsorBlockTV-xxx - INFO - Connected to device YouTube on TV (YouTube on TV)
2024-08-19 03:30:51,271 - iSponsorBlockTV-xxx - INFO - Subscribing to lounge
2024-08-19 03:30:51,272 - iSponsorBlockTV-xxx - INFO - Subscribing to lounge id xxx
2024-08-19 03:30:51,925 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:30:51,926 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 10.416
2024-08-19 03:30:53,933 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:10,698 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:39,111 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:40,038 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:40,561 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:41,344 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:41,832 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:42,590 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:43,079 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:43,830 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:44,315 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:45,070 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:45,564 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:46,329 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:46,816 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:47,582 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:48,062 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:48,802 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:49,295 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621
2024-08-19 03:31:50,044 - iSponsorBlockTV-xxx - INFO - Playing video IiHFnmI8pxg with 3 segments
2024-08-19 03:31:50,530 - iSponsorBlockTV-xxx - INFO - Skipping segment: seeking to 146.621  

config.json

{
    "devices": [
        {
            "screen_id": "xxx",
            "name": "YouTube on TV",
            "offset": 0
        }
    ],
    "apikey": "",
    "skip_categories": [
        "sponsor",
        "selfpromo",
        "intro",
        "outro",
        "music_offtopic",
        "interaction",
        "exclusive_access",
        "poi_highlight",
        "preview",
        "filler"
    ],
    "channel_whitelist": [],
    "skip_count_tracking": true,
    "mute_ads": true,
    "skip_ads": true
}
dmunozv04 commented 2 months ago

Hello, thanks for reporting the bug clearly. It seems that the issue is the poi_highlight category has a single 0ms segment. iSponsorBlockTV attempts to skip it, but since YouTube truncates skip times to an integer, it gets caught in an infinite loop. This could be solved by removing the category here, but more generally with something like #145

reavpC6K commented 2 months ago

Removing poi_highlight from config.json and restarting resolves it.