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

Pornhub new IDs without "ph" prefix #237

Open
npr0n opened this issue Sep 25, 2023 · 3 comments · May be fixed by #277
Open

Pornhub new IDs without "ph" prefix #237

npr0n opened this issue Sep 25, 2023 · 3 comments · May be fixed by #277

Comments

@npr0n
Copy link

npr0n commented Sep 25, 2023

Describe the bug
Pornhub new video IDs not working. Viewkey does not include "ph" prefix for new videos.

Include

  1. Emby
  2. Stable and Nightly
  3. https://www.pornhub.com/view_video.php?viewkey=65055ab2539a1
  4. "Pornhub - 65055ab2539a1.mp4"
  5. Log File
    embylog.txt
@npr0n
Copy link
Author

npr0n commented Sep 25, 2023

older video with "ph" prefix in URL: https://www.pornhub.com/view_video.php?viewkey=ph60ebf6b1de66b
id works, also included in embylog.txt
File name: "Pornhub - ph60ebf6b1de66b"

@wongsanchez
Copy link

Videos with the "ph" prefix still work so long as you don't use the scene id. So you can do Pornhub - NAME.ext

So for https://www.pornhub.com/view_video.php?viewkey=65055ab2539a1 you could name the file Pornhub - Little Sister's Best Friend Wants to Try Sex - Leana Lovings - Perfect Girlfriend - Alex Adams.mp4

The issue appears to be in Jellyfin.Plugin.PhoenixAdult/Sites/SitePornhub.cs

if ((searchTitle.StartsWith("ph", StringComparison.OrdinalIgnoreCase) || int.TryParse(searchTitle, out _)) && !searchTitle.Contains(' ', StringComparison.OrdinalIgnoreCase))

It's hard coded to search for the ID assuming it starts with "ph"

@wongsanchez
Copy link

Not entirely sure how to get it to completely work.

I changed modified the if statement and it works seems to works but not for every video

if ((searchTitle.StartsWith("ph", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("1", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("2", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("3", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("4", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("5", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("6", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("7", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("8", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("9", StringComparison.OrdinalIgnoreCase)
    || searchTitle.StartsWith("0", StringComparison.OrdinalIgnoreCase)
    || int.TryParse(searchTitle, out _)) && !searchTitle.Contains(' ', StringComparison.OrdinalIgnoreCase))

I tested with theses

  1. https://www.pornhub.com/view_video.php?viewkey=ph5cbc81da999fb
  2. https://www.pornhub.com/view_video.php?viewkey=65ac0f44b2fcc
  3. https://www.pornhub.com/view_video.php?viewkey=649bf79ec834f
  4. https://www.pornhub.com/view_video.php?viewkey=64090a225ac72
  5. https://www.pornhub.com/view_video.php?viewkey=ph629e050d45351
  6. https://www.pornhub.com/view_video.php?viewkey=64cb037177901

Used the following file name styles

  1. Pornhub - ID - Name.ext
  2. Pornhub - Name.ext
  3. Pornhub - ID.ext

With the only exception of only the 6th video while using Pornhub - ID - Name.ext all worked.

@wongsanchez wongsanchez linked a pull request Jun 13, 2024 that will close this issue
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 a pull request may close this issue.

2 participants