FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.54k stars 842 forks source link

Incorrect labelling on live premier videos #754

Closed EggY0lk closed 1 year ago

EggY0lk commented 4 years ago

Behavior of the program Live premiere videos that is not live yet labeled as Live on freetube

Expected behavior Live premiere videos labeled as such e.g: image

To Reproduce Please add all steps to reproduce the behavior:

  1. Click on 'Subscription"
  2. See error

Screenshots:

image image Full screenshot: image

Desktop

Additional Information Youtube URL: https://youtu.be/VYu3PvRPZR8

DuaneJaspers commented 4 years ago

Interesting, This only seems to happen if there are "viewers" waiting in the premiere room. Premiere Here are both situations in one picture.

GilgusMaximus commented 4 years ago

I think, it would be best to leave the watching count in, but change the 'Live' to Premiere as @SwaggyHerosity showed in the screenshot. Then it is clear that it is a premiere but you also see how many people are waiting for it to start

computeristic commented 3 years ago

Other than indicating that it is a premiere rather than a live video, it would be neat if the scheduled date and time are also included in the subscriptions page/search page (on the thumbnail or beside the view count), if possible.

gamer191 commented 2 years ago

Workaround: use Invidious API instead of Local API (Settings>General Settings>Preferred API Backend)

theforbiddenpool commented 1 year ago

I spent a bit looking into this issue. Even though this sounds easy to do, but as I've come to find out, it's not even related to this repo.

I first looked at the ft-list-video to check how the labels were rendered. I ended up in the function parseVideoData to see there are two values that may be of interest: isLive and isUpcoming. These values come from the prop data. Logging these on a video currently premiering, I found that isLive was true.

So, next I went to the Channel view to check how the data was parsed. The mounted hook calls getChannelVideosLocal and in this function there is not much parsing. The request is done via the yt-channel-info library, so the parsing must have been done there.

With that, I went to the library. A bit of digging, and I found the parseChannelVideoResponse function is the one called to parse data. Within this function, parseVideo is called. This is where the magic happens. I believe this is the offending line. Upcoming videos also track the view count, therefore the video.shortViewCountText is a number and not undefined.

I didn't spend longer checking out the function, because I'm way passed the scope of this repo and by now it has been hours of digging through code I'd never seen in my life :laughing:

So this does not seem to be fixable in this app, and has to be fixed in the library itself. Since this was my first time seeing much of this code, it is possible that I've missed something. Although, I don't believe I have.

TL;DR: This is an issue with the yt-channel-info and not with the app itself. The library doesn't take into account that Upcoming/Premier videos may also have a live count, and therefore the parameter isLive is true, which causes this mislabelling.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

efb4f5ff-1298-471a-8973-3d47447115dc commented 1 year ago

This issue is resolved in the latest nightly build