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

BrasilTracker definition returns a unparsable title for Radarr/Sonarr #485

Closed
2 tasks done
doutorinfamous opened this issue Sep 27, 2024 · 6 comments
Closed
2 tasks done
Labels
Type: Bug Something isn't working with an indexer

Comments

@doutorinfamous
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When using a Brazilian tracker, the movie name appears in Portuguese before the English title, and the release year is often missing. This causes Radarr to fail to parse the movie correctly. Additionally, the tracker does not follow the standard formatting for video quality labels like 1080p and 2160p, instead using terms like "Full HD" and "4K". As a result, it's nearly impossible to download movies and TV shows because Radarr and Sonarr can't find or match them properly.

case

radarr showing wrong parsing

Expected Behavior

The correct information from the Brasiltracker should display the English title first (without being enclosed in brackets), include the movie's release year, and use numerical resolution formats like 1080p or 2160p.

radarr with the correct parsing

Steps To Reproduce

Search for any movie manually using a Brasiltracker.
Notice that Radarr/Sonarr fails to parse the movie because the English title is not at the front and the release year is missing.

case

Environment

- OS: unraid
- Prowlarr: 1.23.1.4708
- Docker Install: yes
- Using Reverse Proxy: no
- Browser: google chrome

What branch are you running?

Master

Trace Logs? Not Optional

There are no logs available because the issue is not within the Prowlarr system itself, but rather in the DEFINITION of how information is displayed by the Brasiltracker. The solution is to adjust the YAML definition for the tracker to ensure the movie year, English title (at the front), and numerical resolution are correctly shown.

Trace Logs have been provided as applicable. Reports will be closed if the required logs are not provided.

  • I have read and followed the steps in the wiki link above and provided the required trace logs - the logs contain trace - that are relevant and show this issue.
@doutorinfamous doutorinfamous added Status: Needs Triage Type: Bug Something isn't working with an indexer labels Sep 27, 2024
@doutorinfamous doutorinfamous changed the title BrasilTracker definition returns a unparseble BrasilTracker definition returns a unparsable title for Radarr/Sonarr Sep 27, 2024
@bakerboy448
Copy link
Collaborator

cc @ilike2burnthing @garfield69 for upstream

@garfield69
Copy link
Contributor

@bakerboy448 the Jackett BrasilTracker indexer is written in C#. Presumably the Prowlarr one is too.
Our indexer searches the English titles and has no problem providing Radarr with Killer Heat
image
perhaps your indexer needs reworking?

@ilike2burnthing
Copy link
Contributor

BrasilTracker is one of the few YML definitions which exists in Prowlarr but not Jackett - #370

Yea, the Jackett indexer does a lot to the titles - https://github.com/Jackett/Jackett/blob/master/src/Jackett.Common/Indexers/Definitions/BrasilTracker.cs

@doutorinfamous
Copy link
Author

I was able to make the YML definition work.

Now the BrasilTracker is parsing ok in Radarr. Hope it helps everybody that needs it

---
id: brasiltracker
name: BrasilTracker
description: 'BrasilTracker is a BRAZILIAN Private Torrent Tracker for MOVIES / TV / GENERAL'
language: pt-BR
encoding: UTF-8
type: private
links:
  - https://brasiltracker.org/

caps:
  categories:
    Other: Other

  modes:
    search: [q]
    tv-search: [q, season, ep]
    movie-search: [q, imdbid]

settings:
  - name: cookie
    type: text
    label: Cookie
  - name: info_cookie
    type: info
    label: How to get the Cookie
    default: "<ol><li>Login to this tracker with your browser</li><li>Open the <b>DevTools</b> panel by pressing <b>F12</b></li><li>Select the <b>Network</b> tab</li><li>Click on the <b>Doc</b> button (Chrome Browser) or <b>HTML</b> button (FireFox)</li><li>Refresh the page by pressing <b>F5</b></li><li>Click on the first row entry</li><li>Select the <b>Headers</b> tab on the Right panel</li><li>Find <b>'cookie:'</b> in the <b>Request Headers</b> section</li><li><b>Select</b> and <b>Copy</b> the whole cookie string <i>(everything after 'cookie: ')</i> and <b>Paste</b> here.</li></ol>"
  - name: info_category_8000
    type: info
    label: About BrasilTracker Categories
    default: BrasilTracker does not return categories in its search results. To sync to your apps, include 8000(Other) in your Apps' Sync Categories.
  - name: freeleech
    type: checkbox
    label: Search freeleech only
    default: false
  - name: sort
    type: select
    label: Sort requested from site
    default: time
    options:
      time: created
      seeders: seeders
      size: size
  - name: type
    type: select
    label: Order requested from site
    default: desc
    options:
      desc: desc
      asc: asc

login:
  method: cookie
  inputs:
    cookie: '{{ .Config.cookie }}'
  test:
    path: index.php
    selector: a[href^="logout.php?auth="]

search:
  paths:
    # https://brasiltracker.org/torrents.php?order_by=time&order_way=desc&freetorrent=1&filter_cat[6]=1&filter_cat[3]=1&action=basic&searchsubmit=1
    # https://brasiltracker.org/torrents.php?searchstr=mandalorain&order_by=size&order_way=desc&action=basic&searchsubmit=1
    # https://brasiltracker.org/torrents.php?searchstr=tt8179024&order_by=time&order_way=desc&action=basic&searchsubmit=1
    - path: torrents.php
  inputs:
    searchstr: '{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}'
    order_by: '{{ .Config.sort }}'
    order_way: '{{ .Config.type }}'
    group_results: 0
    action: basic
    freetorrent: '{{ if .Config.freeleech }}1{{ else }}{{ end }}'
    searchsubmit: 1

  rows:
    selector: table#torrent_table > tbody > tr.torrent

  fields:
    category:
      text: Other
    details:
      selector: a[href^="torrents.php?id="]
      attribute: href
    download:
      selector: a[href^="torrents.php?action=download&id="]
      attribute: href
    description:
      selector: div.tags
    poster:
      selector: img[alt="Cover"]
      attribute: src
    imdbid:
      selector: a[href*="imdb.com/title/tt"]
      attribute: href
    tmdbid:
      selector: a[href*="themoviedb.org/movie/"], a[href*="themoviedb.org/tv/"]
      attribute: href
    files:
      selector: td:nth-child(3)
    date:
      selector: span.time
      attribute: title
      filters:
        - name: append
          args: ' -03:00' # BRT
        - name: dateparse
          args: 'MMM d yyyy, HH:mm zzz'
    size:
      selector: td:nth-child(5)
    grabs:
      selector: td:nth-child(6)
    seeders:
      selector: td:nth-child(7)
    leechers:
      selector: td:nth-child(8)
    downloadvolumefactor:
      case:
        strong.tl_free: 0
        '*': 1
    uploadvolumefactor:
      text: 1
    title_details:
      selector: div.torrent_info
      remove: strong
    year:
      selector: td.big_info
      filters:
        - name: regexp
          args: "\\[(\\d{4})\\]"
    title:
      selector: a[href^="torrents.php?id="]
      filters:
        - name: re_replace
          args: ["^([^\\[]+)$", '$1 [$1]']
        - name: re_replace
          args: ["^(.*?)\\s*\\[(.*?)\\]", '$2 ({{ .Result.year }}) / $1']
        - name: append
          args: ' {{ .Result.title_details }}'
        - name: re_replace
          args: ["(?i)\\bFull HD\\b", '1080p']
        - name: re_replace
          args: ["(?i)\\b4K\\b", '2160p']
    minimumratio:
      text: 1.0
    minimumseedtime:
      text: 172800

@bakerboy448
Copy link
Collaborator

@doutorinfamous can you PR it for Prowlarr then if you've tested it please

@mynameisbogdan
Copy link
Contributor

Did some improvements on the titles so Radarr is close to perfection as it can be due to limitations, but episodes still won't be parseable as that seems to require converting the indexer to C# as the site lacks basic info like season/episode when grouping torrents is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working with an indexer
Projects
None yet
Development

No branches or pull requests

5 participants