Skip to content

Hide member only videos (Local API)#7208

Merged
FreeTubeBot merged 10 commits into
FreeTubeApp:developmentfrom
PikachuEXE:feature/hide-member-only-videos
May 6, 2025
Merged

Hide member only videos (Local API)#7208
FreeTubeBot merged 10 commits into
FreeTubeApp:developmentfrom
PikachuEXE:feature/hide-member-only-videos

Conversation

@PikachuEXE
Copy link
Copy Markdown
Member

@PikachuEXE PikachuEXE commented Apr 15, 2025

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Related to #6425 but IV API not supported yet so won't close it

Description

There are member only videos in subscription/channel video list
This PR hides them
IV API has no such attribute so can't implement for it

Screenshots

Badge version screenshot (previous implementation, now for showing example member only videos)
image
image

Testing

A. Member only

  • Visit channel(s) with member only videos (e.g. https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw
  • Ensure no member only videos
  • Search member only videos in channel
  • Ensure no member only videos
  • Subscribe (to a new profile if needed, probably easier) the channel and refresh feed in subscription page
  • Ensure no member only videos
  • Search for hash tag of member only videos (I got no example for this
  • Ensure no member only videos

B. Member first
Same as above but it might be time limited (you can only test during specific time period each day, e.g. https://www.youtube.com/channel/UCy8E4XShrcph5WWLg05zETQ only has 1 member first video per day several hours before 18:00 UTC+8/10:00 UTC)

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) April 15, 2025 01:36
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 15, 2025
@absidue
Copy link
Copy Markdown
Member

absidue commented Apr 15, 2025

My understanding was that we were going to always hide them from the channel and subscription pages, by skipping them during the parsing, like we do with the members-only section on the channel home tab, without a setting or labelling them. There is no point showing videos that you have no way of watching in FreeTube (you require a Google account that is paying a subscription to the channel in question).

So that begs the question, is this just a temporary PR to learn how to identify members-only videos and you'll revert the changes and implement the skipping in a follow up or have you decided to change plans?

@absidue absidue added U: Waiting for Response from Author and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Apr 15, 2025
@PikachuEXE
Copy link
Copy Markdown
Member Author

I think it depends on the channel
I see some channels just posting members only videos as an early release to supporters.
For those I am not sure if users want to use bookmark them early or whatever.
Also IV API is not supporting members only property yet so showing a badge can at least be a stop gap solution until IV API also supports it. (i.e. Local API provides more info and we just show it instead of just hiding some videos in local API which might seem a bug

I might just hide them if IV API supports it already

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Copy Markdown
Member

The plan is definitely to go back to state FT was in before. Dont show member only content anywhere like explained in #6437

At this point we have many features that are only on Local API that arent available on IV.

I think the route needs to be:

  • Create PR here to filter on Local API
  • Create PR on IV side to make filtering available to us

@PikachuEXE
Copy link
Copy Markdown
Member Author

I will wait for #7187 to avoid merge conflict...

@PikachuEXE PikachuEXE force-pushed the feature/hide-member-only-videos branch from e449ab8 to e1533bf Compare April 19, 2025 01:05
@PikachuEXE
Copy link
Copy Markdown
Member Author

Updated to hide member only videos
Don't have example for hash tag view

@PikachuEXE PikachuEXE changed the title Show badge for member only videos (Local API) Hide member only videos (Local API) Apr 19, 2025
@PikachuEXE
Copy link
Copy Markdown
Member Author

I got videos with Members first (e.g. https://www.youtube.com/channel/UCy8E4XShrcph5WWLg05zETQ
Hide?
2025-04-19 15_43_44-Window

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Copy Markdown
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Apr 19, 2025

Yes, hide it. Nice catch.

How it looks like on YT

firefox_ti48RI89vf

Edit: maybe also add it to https://github.com/FreeTubeApp/FreeTube/blob/development/src/renderer/helpers/api/local.js#L911

2nd edit:
From https://support.google.com/youtube/answer/7544492?hl=en

With the members-only to public feature, you can upload content that only your channel members can view for a certain period of time, before access opens up to others. Giving your channel members early access to your content lets them view and engage with your content, before it goes public.

I wonder how it will present it in FT when it becomes available to everyone

@PikachuEXE
Copy link
Copy Markdown
Member Author

I wonder how it will present it in FT when it becomes available to everyone

Just normal video

Also I never see member only/first videos in home tab

@absidue
Copy link
Copy Markdown
Member

absidue commented Apr 19, 2025

The channel home tab has a dedicated member's only section and we already skip parsing that entire section (unlike the approach in this PR which parses members-only stuff and then filters it out right at the end), so I'm pretty sure they won't show any other members-only stuff there. The only place I've seen members-only and members-first is on the channel videos tab, which is is also used on the subscriptions page.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Copy Markdown
Member

FYI: PR on IV side iv-org/invidious#5222. Do we need to do something after that PR has merged?

@PikachuEXE
Copy link
Copy Markdown
Member Author

Yes and that PR does not include member first currently, already commented there

@PikachuEXE
Copy link
Copy Markdown
Member Author

Added Member first handling but not tested yet, see updated testing section
Gonna test it myself with custom build

@PikachuEXE
Copy link
Copy Markdown
Member Author

14:50 UTC+8
2025-04-20 14_47_50-Window
2025-04-20 14_49_41-Window
2025-04-20 14_51_01-Window

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 20, 2025
@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 20, 2025
@PikachuEXE
Copy link
Copy Markdown
Member Author

Updated but the member first channel example doesn't have video a.t.m. so I can't test yet...

* development: (27 commits)
  [Dev] Bump package version from 0.23.3 to 0.23.4 (FreeTubeApp#7255)
  Update youtubei.js to latest (FreeTubeApp#7252)
  Translated using Weblate (Bulgarian)
  Translated using Weblate (Norwegian Bokmål)
  Translated using Weblate (Norwegian Bokmål)
  Translated using Weblate (Danish)
  Translated using Weblate (Awadhi)
  Translated using Weblate (Flemish (West))
  Translated using Weblate (Afrikaans)
  Translated using Weblate (Odia)
  Translated using Weblate (Urdu)
  Translated using Weblate (Georgian)
  Translated using Weblate (Azerbaijani)
  Translated using Weblate (Khmer (Central))
  Translated using Weblate (Nepali)
  Translated using Weblate (Persian)
  Translated using Weblate (Bengali)
  Translated using Weblate (Bosnian)
  Translated using Weblate (Hindi)
  Translated using Weblate (Korean)
  ...
@PikachuEXE
Copy link
Copy Markdown
Member Author

Anyone got more example channels with member first videos...?

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Copy Markdown
Member

Anyone got more example channels with member first videos...?

Nope couldnt find any but i trust the code

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Copy Markdown
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Apr 25, 2025

Member first channel has a video but i just didnt notice it

firefox_iQX5RzTNJ2
VirtualBoxVM_9dTy2OpLxX

@PikachuEXE
Copy link
Copy Markdown
Member Author

I got a bug in video searching in channel, fixing today

@absidue
Copy link
Copy Markdown
Member

absidue commented Apr 25, 2025

Probably because you left all the other code in when you added in my suggestion, instead of using it as a replacement as it was intended to be.

* development:
  Ensure there is at most one power save blocker per open window (FreeTubeApp#7247)
  Change author name (FreeTubeApp#7216)
  Migrate ExternalPlayerSettings and SponsorBlockSettings to the composition API (FreeTubeApp#7267)
  Migrate the FtButton component to the composition API (FreeTubeApp#7266)
  Cleanup event listener pass-through inline handlers (FreeTubeApp#7268)
  Feature/add Windows/MacOS Taskbar dock/jumplist task 'New Window' (FreeTubeApp#7049)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Norwegian Bokmål)
  Translated using Weblate (Greek)
@PikachuEXE
Copy link
Copy Markdown
Member Author

Updated, channel searching code was updated to use forEach but I forgot to remove filter after it
Fixed that and also now using reduce instead of declaring an array then forEach
Tested channel searching and haven't tested Hashtag again due to lack of example

Member first re-tested like #7208 (comment)

absidue

This comment was marked as spam.

@PikachuEXE
Copy link
Copy Markdown
Member Author

Updated, was mostly trying to quick fix the bug I introduce so I can get a custom build that works
And I did not mean that it's all perfect and ready for merge

I know I suck in many ways, performance side included. So I have no problem receiving criticism on implementations and act if necessary.
But I am not comfortable hearing I know you might not care about performance but I do. This kind of speculation should never be said to any current/wanna be contributor.
It's why we have code review.

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Copy Markdown
Member

But I am not comfortable hearing I know you might not care about performance but I do. This kind of speculation should never be said to any current/wanna be contributor.
It's why we have code review.

This was indeed not necessary to say. A review can be critical but shouldnt be personal.

I know I suck in many ways

Didnt notice any of them but if you do then you also dont suck in many ways :)

@JamesClarke7283
Copy link
Copy Markdown

JamesClarke7283 commented Apr 28, 2025

Ive been using this PR and its been working well, i haven't been doing performance testing though, just general use.

Do we have a known workflow for performance testing here? if someone has one they use it might be good to share and refer to later. I couldn't find anything on testing in the CONTRIBUTING.md or the wiki.

Using at this commit:
https://github.com/PikachuEXE/FreeTube/commit/fd800c

Copy link
Copy Markdown
Member

@absidue absidue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really sorry for how I expressed myself, you definitely didn't deserve those harsh words.

@PikachuEXE
Copy link
Copy Markdown
Member Author

@ChunkyProgrammer your power is needed
image

@FreeTubeBot FreeTubeBot merged commit dd23bda into FreeTubeApp:development May 6, 2025
5 checks passed
@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label May 6, 2025
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request May 6, 2025
* development: (35 commits)
  Hide member only videos (Local API) (FreeTubeApp#7208)
  Translated using Weblate (Hebrew)
  Translated using Weblate (Spanish (Mexico))
  Bump electron-builder from 26.0.14 to 26.0.15 (FreeTubeApp#7362)
  Bump mikefarah/yq from 4.45.1 to 4.45.2 (FreeTubeApp#7355)
  Bump autolinker from 4.1.1 to 4.1.5 (FreeTubeApp#7359)
  Bump the babel group with 3 updates (FreeTubeApp#7360)
  Bump npm-run-all2 from 7.0.2 to 8.0.1 (FreeTubeApp#7361)
  Bump the eslint group with 3 updates (FreeTubeApp#7356)
  Bump shaka-player from 4.14.9 to 4.14.10 (FreeTubeApp#7357)
  Translated using Weblate (Icelandic)
  Translated using Weblate (German)
  Translated using Weblate (French)
  Translated using Weblate (Basque)
  Translated using Weblate (Italian)
  Translated using Weblate (Chinese (Simplified Han script))
  Translated using Weblate (German)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Estonian)
  Translated using Weblate (Portuguese (Brazil))
  ...
@PikachuEXE PikachuEXE deleted the feature/hide-member-only-videos branch June 2, 2025 01:13
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

Successfully merging this pull request may close these issues.

6 participants