lamarios / clipious

Invidious client for android
GNU Affero General Public License v3.0
978 stars 33 forks source link

Error in some thumbnails, olay and downloads. #636

Closed ManuXD32 closed 1 week ago

ManuXD32 commented 2 weeks ago

Describe the bug First of all I wanna say that it is not the typical issue with the thumbnails, as it is configured as suggested and clipious doesn't throw an error when adding my server.

When I access clipious some videos show their thumbnail and some of them show an image with an exclamation. ResizedImage_2024-11-11_16-46-39_2343.jpg

Those that show the exclamation keep trying to load but never play and cannot be downloaded (they keep trying but never download).

I have tried to watch them directly on invidious and there is no problem with those videos using the Invidious instance.

To Reproduce Steps to reproduce the behavior:

  1. Go to the app
  2. Scroll down and find a video with an exclamation per thumbnail.
  3. See error

Expected behavior The thumbnail shows, the video plays and can be downloaded.

Smartphone (please complete the following information):

hatredholder commented 2 weeks ago

can confirm, having the same weird issue - no problem playing videos on invidious, but some thumbnails/videos aren't loading on clipious

lamarios commented 2 weeks ago

I'm facing the same problem but i don't known when I will have time to fix it. If any one has the courage to make a PR it will be greatly appreciated.

ManuXD32 commented 2 weeks ago

I'm facing the same problem but i don't known when I will have time to fix it. If any one has the courage to make a PR it will be greatly appreciated.

Wish I had the knowledge to do that haha. Sorry if I sounded like I was demanding an immediate fix, just wanted to let you know. Thanks for taking the time ton answer :)

lamarios commented 2 weeks ago

Oh no. Don't worry. That's not how took it. It was just a note to say I won't have much time to fix that soon :)

ManuXD32 commented 2 weeks ago

Oh no. Don't worry. That's not how took it. It was just a note to say I won't have much time to fix that soon :)

Oh okay :)

AceDenghar commented 1 week ago

Hi,

Same here. On trendings all is ok but not for subscriptions.

Take the time you need.

Regards

technoplayer commented 1 week ago

I have the same issue and I have noticed that Invidious web is requesting mqdefault.jpg for the thumbnail, but Clipious is requesting maxres.jpg.

I have no issue playing the video, it's just the thumbnail.

madeofpendletonwool commented 1 week ago

Good find @technoplayer. I suspect then that the issue could be with this in video.dart

ImageObject? getBestThumbnail() {
    if (videoThumbnails.isNotEmpty) {
      return videoThumbnails
          .firstWhere((element) => element.quality == 'maxres');
    } else {
      return null;
    }
  }
}

I think potentially falling back to mqdefault.jpg might fix it?

ImageObject? getBestThumbnail() {
    if (videoThumbnails.isEmpty) return null;

    // Try maxres first
    try {
      return videoThumbnails.firstWhere((element) => element.quality == 'maxres');
    } catch (_) {
      // Try mqdefault second
      try {
        return videoThumbnails.firstWhere((element) => element.quality == 'mqdefault');
      } catch (_) {
        // Fall back to first available thumbnail
        return videoThumbnails.first;
      }
    }
}

I don't currently have a build environment setup to test that theory but I think that could be a good place to start. I'll try and get something setup a little later today to test that.

lamarios commented 1 week ago

Great find thanks ! I should have the time to look into it before the end of the week, I'll probably do a sorting based on the quality strings and take the first one

AceDenghar commented 1 week ago

Thanks for all your job guys 👍

lamarios commented 1 week ago

version 1.22.3 is on the way and should fix the issue

hatredholder commented 2 days ago

version 1.22.3 is on the way and should fix the issue

still no release on f-droid?

lamarios commented 2 days ago

Could it be because of this ? https://github.com/lamarios/clipious/issues/638

I'll try to remember to check it out over the week end.

hatredholder commented 2 days ago

Could it be because of this ? #638

I'll try to remember to check it out over the week end.

i'll make sure to remind you on saturday :)