---
id: casatorrent
name: Casa-Torrent
description: "Casa-Torrent is a FRENCH Private Torrent Tracker for MOVIES / TV / GENERAL"
language: fr-fr
type: private
encoding: UTF-8
links:
  - https://tctg.in/
legacylinks:
  - https://teamctgame.co/
  - http://teamctgame.xyz/
  - https://teamctgame.xyz/

caps:
  categorymappings:
    - {id: 65, cat: Movies/HD, desc: "BD: BD"}
    - {id: 68, cat: Books/Mags, desc: "Ebooks:  Presse"}
    - {id: 90, cat: Audio/Audiobook, desc: "Ebooks: Audio books"}
    - {id: 56, cat: Books/EBook, desc: "Ebooks: Ebooks"}
    - {id: 95, cat: Books/Comics, desc: "Ebooks: Mangas"}
    - {id: 84, cat: XXX, desc: "Ebooks: XXX"}
    - {id: 54, cat: Movies/3D, desc: "Films: 3D"}
    - {id: 53, cat: Movies/HD, desc: "Films: 4K"}
    - {id: 77, cat: Movies/UHD, desc: "Films: 4K-HDR"}
    - {id: 82, cat: Movies/UHD, desc: "Films: 4K-light"}
    - {id: 50, cat: Movies/UHD, desc: "Films: 4K-Remux"}
    - {id: 61, cat: Movies, desc: "Films: Animation"}
    - {id: 48, cat: Movies/BluRay, desc: "Films: BDRip / BRRip"}
    - {id: 78, cat: Movies/DVD, desc: "Films: DVD-R"}
    - {id: 47, cat: Movies/DVD, desc: "Films: DVDRip"}
    - {id: 71, cat: Movies/BluRay, desc: "Films: Full Bluray"}
    - {id: 63, cat: Movies/HD, desc: "Films: HD TV"}
    - {id: 52, cat: Movies/HD, desc: "Films: HD.1080p"}
    - {id: 51, cat: Movies/HD, desc: "Films: HD.720p"}
    - {id: 80, cat: Movies/HD, desc: "Films: HDLiGHT / M-HD"}
    - {id: 87, cat: Movies/HD, desc: "Films: HDRiP"}
    - {id: 60, cat: Movies, desc: "Films: Pack"}
    - {id: 96, cat: Movies, desc: "Films: Remux"}
    - {id: 75, cat: TV, desc: "Films: TVRiP"}
    - {id: 98, cat: Movies, desc: "Films: VFSTFR"}
    - {id: 89, cat: Movies, desc: "Films: VO"}
    - {id: 55, cat: Movies, desc: "Films: VOSTFR"}
    - {id: 58, cat: Movies/WEB-DL, desc: "Films: Web - DL"}
    - {id: 57, cat: Movies/WEB-DL, desc: "Films: WebRip"}
    - {id: 72, cat: Movies/HD, desc: "Films: x265"}
    - {id: 1, cat: XXX, desc: "Films: XXX"}
    - {id: 97, cat: Console, desc: "Jeux : Android"}
    - {id: 81, cat: Console, desc: "Jeux : Consoles"}
    - {id: 66, cat: PC/Games, desc: "Jeux: PC"}
    - {id: 62, cat: PC/0day, desc: "Logiciels:  Windows"}
    - {id: 99, cat: Other, desc: "Logiciels: Graph / Wallpaper"}
    - {id: 94, cat: TV/HD, desc: "Series: 4K HDR"}
    - {id: 93, cat: TV/Anime, desc: "Series: Animés"}
    - {id: 86, cat: TV/HD, desc: "Series: Episode HD"}
    - {id: 101, cat: TV/HD, desc: "Series: Episode HD Vostfr"}
    - {id: 85, cat: TV/SD, desc: "Series: Episode SD"}
    - {id: 102, cat: TV/SD, desc: "Series: Episode SD Vostfr"}
    - {id: 100, cat: TV/HD, desc: "Series: Tv - Pack HD"}
    - {id: 103, cat: TV/HD, desc: "Series: Tv - Pack HD Vostfr"}
    - {id: 59, cat: TV/SD, desc: "Series: Tv - Pack SD"}
    - {id: 104, cat: TV/SD, desc: "Series: Tv - Pack SD Vostfr"}
    - {id: 88, cat: TV, desc: "Spectacles: Tous"}
    - {id: 83, cat: TV, desc: "TV:  Emissions"}
    - {id: 73, cat: TV/Documentary, desc: "TV: Documentaires"}
    - {id: 74, cat: TV/Sport, desc: "TV: Sports"}

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

settings:
  - name: username
    type: text
    label: Username
  - name: password
    type: password
    label: Password
  - name: freeleech
    type: checkbox
    label: Search freeleech only
    default: false
  - name: multilang
    type: checkbox
    label: Replace MULTI by another language in release name
    default: false
  - name: multilanguage
    type: select
    label: Replace MULTI by this language
    default: FRENCH
    options:
      FRENCH: FRENCH
      MULTI.FRENCH: MULTI.FRENCH
      ENGLISH: ENGLISH
      MULTI.ENGLISH: MULTI.ENGLISH
      VOSTFR: VOSTFR
      MULTI.VOSTFR: MULTI.VOSTFR
  - name: vostfr
    type: checkbox
    label: Replace VOSTFR with ENGLISH
    default: false
  - name: sort
    type: select
    label: Sort requested from site
    default: id
    options:
      id: created
      seeders: seeders
      size: size
      name: title
  - name: type
    type: select
    label: Order requested from site
    default: desc
    options:
      desc: desc
      asc: asc

login:
  path: account-login.php
  method: post
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
  error:
    - selector: p#msgError
  test:
    path: torrents-search.php
    selector: a[href="account-logout.php"]

search:
  paths:
    - path: torrents-search.php
  inputs:
    $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
    search: "{{ .Keywords }}"
    incldead: 1
    freeleech: "{{ if .Config.freeleech }}2{{ else }}0{{ end }}"
    lang: 0
    sort: "{{ .Config.sort }}"
    order: "{{ .Config.type }}"
  keywordsfilters:
    - name: re_replace
      args: ["(\\w+)", " +$1"] # prepend + to each word

  rows:
    selector: table.ttable_headinner > tbody > tr.t-row

  fields:
    category:
      selector: a[href^="torrents.php?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
    title_phase1:
      selector: a[href^="torrents-details.php?id="] b
    title_multilang:
      text: "{{ .Result.title_phase1 }}"
      filters:
        - name: re_replace
          args: ["(?i)(\\smulti\\s)", " {{ .Config.multilanguage }} "]
    title_phase2:
      text: "{{ if .Config.multilang }}{{ .Result.title_multilang }}{{ else }}{{ .Result.title_phase1 }}{{ end }}"
    title_vostfr:
      text: "{{ .Result.title_phase2 }}"
      filters:
        - name: re_replace
          args: ["(?i)(\\svostfr\\s)", " ENGLISH "]
        - name: re_replace
          args: ["(?i)(\\ssubfrench\\s)", " ENGLISH "]
    title:
      text: "{{ if .Config.vostfr }}{{ .Result.title_vostfr }}{{ else }}{{ .Result.title_phase2 }}{{ end }}"
    details:
      selector: a[href^="torrents-details.php?id="]
      attribute: href
    download:
      selector: a[href^="download.php?id="]
      attribute: href
    poster:
      selector: img[src*="/uploads/images/"]
      attribute: src
    grabs:
      selector: a[onmouseover][href^="torrents-details.php?id="]
      attribute: onmouseover
      filters:
        - name: regexp
          args: "Snatched: </b>(\\d+)<br"
    size:
      selector: td:nth-last-child(5)
    seeders:
      selector: td:nth-last-child(4)
    leechers:
      selector: td:nth-last-child(3)
    date:
      selector: a[onmouseover][href^="torrents-details.php?id="]
      attribute: onmouseover
      filters:
        - name: regexp
          args: "le: </b>(.*?)<br"
        - name: append
          args: " +01:00" # CET
        - name: dateparse
          args: "02-01-2006 -07:00"
    downloadvolumefactor:
      case:
        img[src="images/free.gif"]: 0
        "*": 1
    uploadvolumefactor:
      text: 1
# engine n/a
