---
id: linkomanija
name: LinkoManija
description: "LinkoManija is an LITHUANIAN Private Torrent Tracker for MOVIES / TV / GENERAL"
language: lt-LT
type: private
encoding: UTF-8
links:
  - https://www.linkomanija.net/

caps:
  categorymappings:
    - {id: 29, cat: Movies/SD, desc: "Movies"}
    - {id: 52, cat: Movies/HD, desc: "Movies HD"}
    - {id: 30, cat: TV/SD, desc: "TV"}
    - {id: 60, cat: TV/HD, desc: "TV HD"}
    - {id: 45, cat: PC/Games, desc: "PC Games"}
    - {id: 37, cat: Audio, desc: "Music"}
    - {id: 56, cat: Books, desc: "Books"}
    - {id: 40, cat: Other/Misc, desc: "Misc"}
    - {id: 53, cat: Movies/SD, desc: "Movies LT"}
    - {id: 61, cat: Movies/HD, desc: "Movies LT HD"}
    - {id: 28, cat: TV/SD, desc: "TV LT"}
    - {id: 62, cat: TV/HD, desc: "TV LT HD"}
    - {id: 63, cat: PC/Games, desc: "PC Games Misc"}
    - {id: 33, cat: Audio, desc: "Music LT"}
    - {id: 57, cat: Books, desc: "Books LT"}
    - {id: 43, cat: Other/Misc, desc: "Misc LT"}
    - {id: 51, cat: Movies/SD, desc: "Movies RU"}
    - {id: 64, cat: Movies/HD, desc: "Movies RU HD"}
    - {id: 65, cat: TV, desc: "TV RU"}
    - {id: 25, cat: Movies/DVD, desc: "DVD"}
    - {id: 42, cat: Console/XBox, desc: "XBOX"}
    - {id: 66, cat: Audio/Lossless, desc: "Music Lossless"}
    - {id: 41, cat: PC/Mac, desc: "MAC"}
    - {id: 69, cat: PC/Mobile-Android, desc: "Android"}
    - {id: 46, cat: TV/Sport, desc: "Sports"}
    - {id: 58, cat: TV/Documentary, desc: "Documentaries"}
    - {id: 38, cat: TV/Anime, desc: "Anime"}
    - {id: 26, cat: Movies/DVD, desc: "DVD LT"}
    - {id: 44, cat: Console/Other, desc: "Consoles"}
    - {id: 31, cat: Audio/Video, desc: "Music Videos"}
    - {id: 32, cat: PC/0day, desc: "Appz"}

  modes:
    search: [q]
    tv-search: [q, season, ep, imdbid]
    movie-search: [q, imdbid]
    music-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: sort
    type: select
    label: Sort requested from site
    default: added
    options:
      name: title
      added: created
      seeders: seeders
      size: size
  - name: type
    type: select
    label: Order requested from site
    default: DESC
    options:
      DESC: desc
      ASC: asc
  - name: info_tpp
    type: info
    label: Results Per Page
    default: For best results, change the <b>Torrentų puslapyje</b> setting to <b>100</b> on your account profile.
  - name: info_activity
    type: info
    label: Account Inactivity
    default: "Inactive users will be deleted after 90 days. The newly created account with 0 sent data will be deleted after 28 days."

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

search:
  paths:
    - path: browse.php
  inputs:
    $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
    search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
    # 0 active, 1 incldead, 2 dead
    incldead: 1
    freeleech: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
    searchindesc: "{{ if .Query.IMDBID }}1{{ else }}{{ end }}"
    sort: "{{ .Config.sort }}"
    d: "{{ .Config.type }}"

  keywordsfilters:
    - name: re_replace
      args: ["\\.", " "]
    - name: re_replace
      args: ["(\\w+)", "+$1"] # prepend + to each word

  rows:
    selector: table> tbody > tr:has(a[href^="details?"])

  fields:
    category:
      selector: a[href^="browse.php?cat="]
      attribute: href
      filters:
        - name: querystring
          args: cat
    title:
      selector: a[href^="details?"]
    details:
      selector: a[href^="details?"]
      attribute: href
    download:
      selector: a[href^="download.php?id="]
      attribute: href
    genre:
      selector: td:nth-child(2) > span
      filters:
        - name: re_replace
          args: [" \\| .+", ""]
    description:
      selector: td:nth-child(2) > span
    files:
      selector: td:nth-child(3)
    date:
      selector: td:nth-child(5)
      filters:
        - name: append
          args: " +02:00" # EET
        - name: dateparse
          args: "yyyy-MM-ddHH:mm:ss zzz"
    size:
      selector: td:nth-child(6)
    grabs:
      selector: td:nth-child(7)
    seeders:
      selector: td:nth-child(8)
    leechers:
      selector: td:nth-child(9)
    downloadvolumefactor:
      case:
        img[src$="/images/flag_green.gif"]: 0
        "*": 1
    uploadvolumefactor:
      text: 1
    minimumratio:
      text: 0.3
# engine tbd
