Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the Video Links in Main Page #43

Closed
todo bot opened this issue Dec 24, 2018 · 15 comments
Closed

Fix the Video Links in Main Page #43

todo bot opened this issue Dec 24, 2018 · 15 comments
Assignees

Comments

@todo
Copy link

todo bot commented Dec 24, 2018

For some reason, it gives poster link in current scenario and also order of links are not correct.


* @todo Fix the Video Links in Main Page
* @body For some reason, it gives poster link in current scenario and also order of links are not correct.
*/
if (videos[j] && videos[j].src) {
dlink = videos[j].src
}


This issue was generated by todo based on a @todo comment in 79deeed. It's been assigned to @aashutoshrathi because they committed the code.
@IssueHuntBot
Copy link

@issuehuntfest has funded $20.00 to this issue. See it on IssueHunt

@lalitmee
Copy link
Contributor

Hey @aashutoshrathi, I looked into this and I have fixed one thing that why it was taking the poster image and not the video but it is working only if you are having 2 or 3 videos on the currently loaded page. After then it is somehow missing the order and it is downloading the images.

@aashutoshrathi
Copy link
Owner

Yes, I'm working on it.
If you found some fix, feel free to open PR.

@aashutoshrathi
Copy link
Owner

aashutoshrathi commented Dec 25, 2018

I nearly fixed this yesterday, but I don't know something is losing track of videos in array.

@lalitmee
Copy link
Contributor

So I will create a PR with a little fix.

@lalitmee
Copy link
Contributor

Actually, just now I took pull so your code is coming which I think you changed and I also changed at the same place.

Only this is sufficient

      if (videos[j] && videos[j].poster === dlink) {

if we are doing this while creating videos array

      videos[i].poster = `${videos[i].poster}&dl=1`
      videos[i].src = `${videos[i].currentSrc}&dl=1`

I think thats why our previous condition is failing and it is never going inside that if condition to get the video URL. Because we are changing dlink but we are not changing the poster link. That's why that condition is failing.

Correct me if missed something.

@aashutoshrathi
Copy link
Owner

aashutoshrathi commented Dec 25, 2018

@lalitmee I think you are right. 🎉
If you want open a PR, I would love to test it.
I just missed the fact that we are adding &dl=1

@lalitmee
Copy link
Contributor

Yeah, and yesterday when I was playing around, I found that this &dl=1 is not stopping adding to any image URL. It means if any user will scroll a lot that many &dl=1 all the images will be having.

I think it should be added any URL only one time not again and again.

@aashutoshrathi
Copy link
Owner

I fixed it last night, but missed that poster will also have them 😅

@aashutoshrathi
Copy link
Owner

@lalitmee Are you on Telegram?

@aashutoshrathi
Copy link
Owner

Please submit your PR on issuehunt to get the funds released.

@lalitmee
Copy link
Contributor

Hey @aashutoshrathi, actually I also wanted to connect with you. I am on telegram.

@aashutoshrathi
Copy link
Owner

Ping me here

@IssueHuntBot
Copy link

@lalitmee has submitted a pull request. See it on IssueHunt

@IssueHuntBot
Copy link

@aashutoshrathi has rewarded $14.00 to @lalitmee. See it on IssueHunt

  • 💰 Total deposit: $20.00
  • 🎉 Repository reward(20%): $4.00
  • 🔧 Service fee(10%): $2.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants