youtube-webos icon indicating copy to clipboard operation
youtube-webos copied to clipboard

Remove shorts from Subscriptions tab

Open JaCzekanski opened this issue 1 year ago • 1 comments

This PR adds filtering of JSON nodes containing reelWatchEndpoint which is an indicator that given video is a reel/short. Due to the convoluted format of JSON responses, it might not cover all of the cases.

Reel playback seems broken on TVs and I don't really care about having them, as it's ofter reused content. Please note that it'll only work on the Subscriptions tab (which is the one I use the most). However, It should be pretty easy to extend it to other tabs and search results.

Before: Screenshot 2024-09-18 at 13 45 03

After: Screenshot 2024-09-18 at 13 45 21

Green settings menu: Screenshot 2024-09-18 at 13 45 37

JaCzekanski avatar Sep 18 '24 11:09 JaCzekanski

Great work, keen to see this merged - shorts are a real pain point for me

FuriousBottle avatar Sep 19 '24 02:09 FuriousBottle

@FuriousBottle Is there any action needed from my side to have this PR merged?

JaCzekanski avatar Oct 07 '24 12:10 JaCzekanski

@JaCzekanski sorry for the confusion, I am just an admirer, I don't have any authority here 😅

FuriousBottle avatar Oct 07 '24 12:10 FuriousBottle

I tested the current "hardcoded path" approach and recursive search - the latter is slightly slower (~0.2ms on nodejs, mac), but we don't have to store the path so it should be more maintainable in the future.

https://gist.github.com/JaCzekanski/7a35e15473d5bbe62056e6e03e3f5d17

$ node shorts-test.js  # initial Subscriptions response (gridRenderer)
original JSON.parse: 1.969ms
hardcoded remove shorts: 1.842ms
find remove shorts: 2.126ms

$ node shorts-test.js  # continuation response (gridContinuation)
original JSON.parse: 0.399ms
hardcoded remove shorts: 0.397ms
find remove shorts: 0.454ms

JaCzekanski avatar Oct 11 '24 19:10 JaCzekanski

I'm not really able to properly test the functionality, but at least it doesn't seem to break anything on K7Lp.

throwaway96 avatar Oct 18 '24 23:10 throwaway96

Hello guys, please tell me when there will be an update with the function of hiding shorts, or now I can replace .js files in the file system via webos dev manager. But I don't know the way. Thanks for the information

teolabx avatar Oct 20 '24 09:10 teolabx