---
id: tribalmixes
name: TribalMixes
description: "TribalMixes is a ratioless Semi-Private Torrent Tracker for DJ MIXES"
language: en-GB
type: semi-private
encoding: ISO-8859-1
links:
  - https://www.tribalmixes.com/

caps:
  categorymappings:
    - {id: 1, cat: Audio, desc: "tribal"}
    - {id: 2, cat: Audio, desc: "electro"}
    - {id: 3, cat: Audio, desc: "chillout"}
    - {id: 4, cat: Audio, desc: "house"}
    - {id: 5, cat: Audio, desc: "video"}
    - {id: 6, cat: Audio, desc: "breaks"}
    - {id: 7, cat: Audio, desc: "trance"}
    - {id: 8, cat: Audio, desc: "deep house"}
    - {id: 9, cat: Audio, desc: "techno"}
    - {id: 10, cat: Audio, desc: "drum&bass"}
    - {id: 11, cat: Audio, desc: "classic"}
    - {id: 12, cat: Audio, desc: "minimal"}
    - {id: 14, cat: Audio, desc: "progressive"}
    - {id: 15, cat: Audio, desc: "tech house"}
    - {id: 16, cat: Audio, desc: "psy-goa trance"}
    - {id: 17, cat: Audio, desc: "electro-tribe"}
    - {id: 18, cat: Audio, desc: "mega-pack"}
    - {id: 19, cat: Audio, desc: "dark"}
    - {id: 20, cat: Audio, desc: "dubstep"}
    - {id: 22, cat: Audio, desc: "misc"}
    - {id: 30, cat: Audio, desc: "(tm) mixes"}
    - {id: 31, cat: Audio, desc: "(tm) ONLY"}

  modes:
    search: [q]
    music-search: [q, artist]

settings:
  - name: username
    type: text
    label: Username
  - name: password
    type: password
    label: Password
  - name: sort
    type: select
    label: Sort requested from site
    default: _
    options:
      _: created
      8: seeders
      6: size
      1: title
  - name: type
    type: select
    label: Order requested from site
    default: desc
    options:
      desc: desc
      asc: asc

login:
  path: takelogin.php
  method: post
  inputs:
    username: "{{ .Config.username }}"
    password: "{{ .Config.password }}"
  error:
    - selector: div.alert-danger
  test:
    path: /
    selector: a[href="/logout.php"]

search:
  paths:
    - path: browse.php
  inputs:
    search: "{{ if .Query.Artist }}{{ .Query.Artist }}{{ else }}{{ .Keywords }}{{ end }}"
    sort: "{{ re_replace .Config.sort \"_\" \"\" }}"
    type: "{{ .Config.type }}"

  rows:
    selector: div.row:has(a[href^="/download.php?id="])

  fields:
    category:
      selector: a[href^="/browse.php?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
    title:
      selector: a[href*="/details.php?id="]
    details:
      selector: a[href*="/details.php?id="]
      attribute: href
    download:
      selector: a[href^="/download.php?id="]
      attribute: href
    size:
      selector: a[href^="/download.php?id="]
      attribute: title
      filters:
        - name: regexp
          args: "Size: (.+?)<"
    files:
      selector: a[href^="/download.php?id="]
      attribute: title
      optional: true
      default: 1
      filters:
        - name: regexp
          args: "\\((\\d+) files\\)"
    seeders:
      selector: a[href^="/download.php?id="]
      attribute: title
      filters:
        - name: regexp
          args: ">(\\d+) seeder"
    leechers:
      selector: a[href^="/download.php?id="]
      attribute: title
      filters:
        - name: regexp
          args: ", (\\d+) leecher"
        - name: replace
          args: ["-1", "0"]
    date:
      selector: a[href^="/download.php?id="]
      attribute: title
      filters:
        - name: regexp
          args: "shared (.+?)<"
    downloadvolumefactor:
      text: 1
    uploadvolumefactor:
      text: 1
# engine n/a
