---
#id: torrentday
name: TorrentDay
identifier: torrentday
description: TorrentDay (TD) is a private torrent tracker for GENERAL.
language: en-us
urls:
  - https://www.torrentday.com/
  - https://tday.love/
  - https://secure.torrentday.com/
  - https://classic.torrentday.com/
  - https://torrentday.it/
  - https://td.findnemo.net/
  - https://td.getcrazy.me/
  - https://td.venom.global/
  - https://td.workisboring.net/
privacy: private
protocol: torrent
supports:
  - irc
  - rss
source: custom
settings:
  - name: passkey
    type: secret
    required: true
    label: Passkey
    help: "Create a RSS Link to find out your PASSKEY"

irc:
  network: TorrentDay
  server: irc.torrentday.com
  port: 6697
  tls: true
  channels:
    - "#td.announce"
  announcers:
    - TD_Announce
  settings:
    - name: nick
      type: text
      required: true
      label: Nick
      help: Bot nick. Eg. user_autodl

    - name: auth.account
      type: text
      required: false
      label: NickServ Account
      help: NickServ account. Make sure to group your user and bot.

    - name: auth.password
      type: secret
      required: false
      label: NickServ Password
      help: NickServ password

  parse:
    type: single
    lines:
      - test:
          - "[Movie/4K] This is a Movie 2160p UHD BluRay x265-TEST - https://www.torrentday.com/details.php?id=0000000 - 5.83 GB"
          - "[Movie/4K] This is a Movie 2160p UHD BluRay x265-TEST FREELEECH - https://www.torrentday.com/details.php?id=0000000 - 5.83 GB"
        pattern: '\[([^\]]*)] (.*?)\s*(FREELEECH)*\s*-\s+(https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)\s*- (.*)'
        vars:
          - category
          - torrentName
          - freeleech
          - baseUrl
          - torrentId
          - torrentSize

    match:
      infourl: "/details.php?id={{ .torrentId }}"
      torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?torrent_pass={{ .passkey }}"
      encode:
        - torrentName
