---
#id: ptp
name: PassThePopcorn
identifier: ptp
description: PassThePopcorn (PTP) is a private torrent tracker for MOVIES
language: en-us
urls:
  - https://passthepopcorn.me/
privacy: private
protocol: torrent
supports:
  - irc
  - rss
# source: gazelle
settings:
  - name: authkey
    type: secret
    required: true
    label: Auth key
    help: Right click DL on a torrent and get the authkey.

  - name: torrent_pass
    type: secret
    required: true
    label: Torrent pass
    help: Right click DL on a torrent and get the torrent_pass.

irc:
  network: PassThePopcorn
  server: irc.passthepopcorn.me
  port: 7000
  tls: true
  channels:
    - "#ptp-announce-dev"
  announcers:
    - Hummingbird
  settings:
    - name: nick
      type: text
      required: true
      label: Nick
      help: Bot nick. Eg. user|autodl

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

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

    - name: invite_command
      type: secret
      default: "Hummingbird ENTER USERNAME IRCKEY #ptp-announce-dev"
      required: true
      label: Invite command
      help: Invite auth with Hummingbird. Replace USERNAME and IRCKEY.

  parse:
    type: single
    lines:
      - tests:
        - line: 0:2:0:0:357805:1332009:9k6p:tt24249072:1899875175:1728081334|H.264/MKV/WEB/720p||2023|Last Straw|Last.Straw.2023.REPACK.720p.AMZN.WEB-DL.DDP5.1.H.264-FLUX|thriller,horror
          expect:
            announceTypeEnum: 0
            categoryEnum: 2
            originEnum: 0
            freeleechEnum: 0
            groupId: "357805"
            torrentId: "1332009"
            key: "9k6p"
            imdb: "tt24249072"
            torrentSizeBytes: "1899875175"
            uploadedDate: "1728081334"
            releaseTags: H.264/MKV/WEB/720p
            editionTags: ""
            year: "2023"
            title: "Last Straw"
            torrentName: Last.Straw.2023.REPACK.720p.AMZN.WEB-DL.DDP5.1.H.264-FLUX
            tags: thriller,horror
        - line: 2:1:0:1:357805:1332009:9k6p:tt24249072:1899875175:1728081334|H.264/MKV/WEB/720p||2023|Last Straw|Last.Straw.2023.REPACK.720p.AMZN.WEB-DL.DDP5.1.H.264-FLUX|thriller,horror
          expect:
            announceTypeEnum: 2
            categoryEnum: 1
            originEnum: 0
            freeleechEnum: 1
            groupId: "357805"
            torrentId: "1332009"
            key: "9k6p"
            imdb: "tt24249072"
            torrentSizeBytes: "1899875175"
            uploadedDate: "1728081334"
            releaseTags: H.264/MKV/WEB/720p
            editionTags: ""
            year: "2023"
            title: "Last Straw"
            torrentName: Last.Straw.2023.REPACK.720p.AMZN.WEB-DL.DDP5.1.H.264-FLUX
            tags: thriller,horror
        - line: 1:1:2:1:21108:1332339:ncfe:tt0107426:63996413804:1728081334|BD66/m2ts/Blu-ray/2160p|Dolby Atmos/Dolby Vision|1993|Little Buddha|Little.Buddha.1993.2160p.FRA.UHD.Blu-ray.DV.HDR.HEVC.DTS-HD.MA.5.1|drama,italian
          expect:
            announceTypeEnum: 1
            categoryEnum: 1
            originEnum: 2
            freeleechEnum: 1
            groupId: "21108"
            torrentId: "1332339"
            key: "ncfe"
            imdb: "tt0107426"
            torrentSizeBytes: "63996413804"
            uploadedDate: "1728081334"
            releaseTags: BD66/m2ts/Blu-ray/2160p
            editionTags: "Dolby Atmos/Dolby Vision"
            year: "1993"
            title: "Little Buddha"
            torrentName: Little.Buddha.1993.2160p.FRA.UHD.Blu-ray.DV.HDR.HEVC.DTS-HD.MA.5.1
            tags: drama,italian
        # <announceType>:<category>:<origin>:<freeleech_type>:<gid>:<tid>:<key>:tt<imdbid>:<sizebytes>|<format>/<container>/<source>/<resolution>|<edition_tags>|<year>|<title>|<releasename>|<taglist>
        pattern: '(\d):(\d):(\d):(\d):(\d+):(\d+):(\w+):(tt\d+)?:(\d+):(\d+)\|(.*)\|(.*)\|(\d+)\|(.+)\|(.+)\|(.+)'
        vars:
          - announceTypeEnum
          - categoryEnum
          - originEnum
          - freeleechEnum
          - groupId
          - torrentId
          - key
          - imdb
          - torrentSizeBytes
          - uploadedDate
          - releaseTags
          - editionTags
          - year
          - title
          - torrentName
          - tags

    mappings:
      announceTypeEnum:
        "0":
          announceType: NEW
        "1":
          announceType: CHECKED
        "2":
          announceType: PROMO # X-leeched (could be neutral/half/free)
        "3":
          announceType: PROMO_GP # marked golden popcorn
        "4":
          announceType: RESURRECTED # reseeded/revived from dead

      # Category IDs are Zero+1 indexed from:
      # ( 'Feature Film', 'Short Film', 'Miniseries', 'Stand-up Comedy', 'Live Performance', 'Movie Collection' )
      categoryEnum:
        "1":
          category: "Feature Film"
        "2":
          category: "Short Film"
        "3":
          category: "Miniseries"
        "4":
          category: "Stand-up Comedy"
        "5":
          category: "Live Performance"
        "6":
          category: "Movie Collection"

      originEnum:
        "0":
          origin: "P2P"
        "1":
          origin: "SCENE"
        "2":
          origin: "INTERNAL" # PERSONAL RIP

      freeleechEnum:
        "0": # Normal
          downloadVolumeFactor: 1
          uploadVolumeFactor: 1
        "1": # Freeleech
          downloadVolumeFactor: 0
          uploadVolumeFactor: 1
        "2": # Halfleech
          downloadVolumeFactor: 0.5
          uploadVolumeFactor: 1
        "3": # Neutral
          downloadVolumeFactor: 0
          uploadVolumeFactor: 0

    match:
      infourl: "/torrents.php?torrentid={{ .torrentId }}"
      torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}&key={{ .key }}"
