Recommended changes #7089

Merged
saltrafael merged 2 commits from recommended-changes into master 2021-09-16 22:00:44 +02:00
saltrafael commented 2021-09-14 15:30:24 +02:00 (Migrated from github.com)

Fixes

Issue Number: Closes #6434

Other information

  • This is supposed to be a better approach to #6966, by filtering claims with the same ID on the recommended selector level
  • Fixed an issue I found when playing the next item on floating player
  • Changed the recommended selector behavior to always put the next unwatched at the top of the list as suggested by jessop
  • makeSelectNextUnplayedRecommended then was redundant since the recommended content was already being filtered for valid and unplayed videos

PR Checklist

Toggle...

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I added a line describing my change to CHANGELOG.md
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below
## Fixes Issue Number: Closes #6434 ## Other information - This is supposed to be a better approach to #6966, by filtering claims with the same ID on the recommended selector level - Fixed an issue I found when playing the next item on floating player - Changed the recommended selector behavior to always put the next unwatched at the top of the list as suggested by jessop - makeSelectNextUnplayedRecommended then was redundant since the recommended content was already being filtered for valid and unplayed videos ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> <details><summary>Toggle...</summary> What kind of change does this PR introduce? - [X] Bugfix - [ ] Feature - [X] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: Please check all that apply to this PR using "x": - [X] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [ ] I added a line describing my change to CHANGELOG.md - [X] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below </details>
jessopb (Migrated from github.com) reviewed 2021-09-15 16:47:50 +02:00
jessopb (Migrated from github.com) left a comment

Pretty clean

Pretty clean
jessopb (Migrated from github.com) commented 2021-09-15 16:33:30 +02:00

Good to test/examine whether there's any reason parseURI could fail - we often wrap it in try-catch.

Good to test/examine whether there's any reason parseURI could fail - we often wrap it in try-catch.
jessopb (Migrated from github.com) commented 2021-09-15 16:46:36 +02:00

I know this result is the same as previous, but I think we don't necessarily want nsfw: to be set TRUE in search just because the claim is. @tzarebczan

I know this result is the same as previous, but I think we don't necessarily want nsfw: to be set TRUE in search just because the claim is. @tzarebczan
@ -91,0 +124,4 @@
});
// Claim to play next: playable and free claims not played before in history
const nextUriToPlay = recommendedContent.filter((nextRecommendedUri) => {
jessopb (Migrated from github.com) commented 2021-09-15 16:39:59 +02:00

nice

nice
tzarebczan (Migrated from github.com) reviewed 2021-09-15 16:50:24 +02:00
tzarebczan (Migrated from github.com) commented 2021-09-15 16:50:24 +02:00

that's correct, respect the mature content setting.

that's correct, respect the mature content setting.
saltrafael (Migrated from github.com) reviewed 2021-09-16 16:29:38 +02:00
saltrafael (Migrated from github.com) commented 2021-09-16 16:29:37 +02:00

Yeah that makes sense, specially since you can't even see the content it wouldn't make sense to display nsfw on the sidebar... So I did some changes to the search based on the user setting instead of doing a regular search and filtering later, which would cause only a few videos or none to show up instead of all 20, the results are pretty interesting lol:

Screenshot_2021-09-16_09-50-00

Yeah that makes sense, specially since you can't even see the content it wouldn't make sense to display nsfw on the sidebar... So I did some changes to the search based on the user setting instead of doing a regular search and filtering later, which would cause only a few videos or none to show up instead of all 20, the results are pretty interesting lol: ![Screenshot_2021-09-16_09-50-00](https://user-images.githubusercontent.com/76502841/133615274-fe809180-8f7f-4fd1-b948-41da4c9874b7.png)
jessopb (Migrated from github.com) reviewed 2021-09-16 17:02:50 +02:00
@ -16,3 +17,4 @@
INCLUDE_FILES: 'file',
INCLUDE_CHANNELS: 'channel',
INCLUDE_FILES_AND_CHANNELS: 'file,channel',
INCLUDE_MATURE: 'nsfw',
jessopb (Migrated from github.com) commented 2021-09-16 17:02:25 +02:00

this is good - did you use it anywhere?

this is good - did you use it anywhere?
@ -35,13 +32,14 @@ export const makeSelectIsPlaying = (uri: string) =>
export const makeSelectIsPlayerFloating = (location: UrlLocation) =>
createSelector(selectPrimaryUri, selectPlayingUri, (primaryUri, playingUri) => {
jessopb (Migrated from github.com) commented 2021-09-16 16:59:57 +02:00

to me hasSource gets confused with the idea of whether a claim has a source as in livestreams.
hasSecondarySource maybe.

to me hasSource gets confused with the idea of whether a claim has a source as in livestreams. hasSecondarySource maybe.
saltrafael (Migrated from github.com) reviewed 2021-09-16 20:01:46 +02:00
@ -16,3 +17,4 @@
INCLUDE_FILES: 'file',
INCLUDE_CHANNELS: 'channel',
INCLUDE_FILES_AND_CHANNELS: 'file,channel',
INCLUDE_MATURE: 'nsfw',
saltrafael (Migrated from github.com) commented 2021-09-16 20:01:45 +02:00

now I did 👍

now I did 👍
jessopb (Migrated from github.com) approved these changes 2021-09-16 21:43:23 +02:00
jessopb (Migrated from github.com) left a comment

Approved assuming testing works out :)

Approved assuming testing works out :)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#7089
No description provided.