DirtyRacer1337 / Jellyfin.Plugin.PhoenixAdult

Jellyfin/Emby Metadata Provider for videos from multiple adult sites
GNU General Public License v2.0
348 stars 46 forks source link

Hotfix for scene ID on pornhub #277

Open wongsanchez opened 3 weeks ago

wongsanchez commented 3 weeks ago

Resolves #237

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.