mirror of
https://github.com/Jackett/Jackett
synced 2025-01-01 12:46:23 +00:00
Secret Cinema: migrate to gazelle base
This commit is contained in:
parent
7193d6d28f
commit
cacafcff58
2 changed files with 64 additions and 92 deletions
|
@ -1,92 +0,0 @@
|
|||
---
|
||||
site: secretcinema
|
||||
name: Secret Cinema
|
||||
description: "A tracker for rare movies."
|
||||
language: en-us
|
||||
type: private
|
||||
encoding: "UTF-8"
|
||||
links:
|
||||
- https://secret-cinema.pw
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- { id: 1, cat: Movies, desc: "Movies" }
|
||||
- { id: "1]=1&nzbcat[2030", cat: Movies/SD, desc: "Movies/SD" }
|
||||
- { id: "1]=1&nzbcat[2040", cat: Movies/HD, desc: "Movies/HD" }
|
||||
- { id: "1]=1&nzbcat[2060", cat: Movies/BluRay, desc: "Movies/BluRay" }
|
||||
- { id: "1]=1&nzbcat[2070", cat: Movies/DVD, desc: "Movies/DVD" }
|
||||
- { id: 2, cat: Audio/MP3, desc: "Music" }
|
||||
- { id: 3, cat: Books/Ebook, desc: "E-Books" }
|
||||
|
||||
modes:
|
||||
search: [q, imdbid]
|
||||
movie-search: [q, imdbid]
|
||||
|
||||
login:
|
||||
path: login.php
|
||||
method: form
|
||||
form: form
|
||||
inputs:
|
||||
username: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: table:contains("Login failed!")
|
||||
test:
|
||||
path: index.php
|
||||
|
||||
ratio:
|
||||
path: torrents.php
|
||||
selector: li#stats_ratio > span
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: torrents.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}filter_cat[{{.}}]=1&{{end}}"
|
||||
searchstr: "{{if .Query.IMDBID}}{{else}}{{ .Keywords }}{{end}}"
|
||||
cataloguenumber: "{{ .Query.IMDBID }}"
|
||||
searchsubmit: 1
|
||||
rows:
|
||||
selector: table#torrent_table > tbody > tr.torrent
|
||||
fields:
|
||||
download:
|
||||
selector: a[href^="torrents.php?action=download&id="]
|
||||
attribute: href
|
||||
description:
|
||||
selector: div.group_info > a.tooltip
|
||||
remove: span, div.tags, div.torrent_info
|
||||
title:
|
||||
selector: div.group_info > a.tooltip
|
||||
remove: span, div.tags, div.torrent_info
|
||||
category:
|
||||
selector: tr.torrent
|
||||
case:
|
||||
div.torrent_info:contains('720'), div.torrent_info:contains('1080p'), div.torrent_info:contains('4k'): "1]=1&nzbcat[2040"
|
||||
div.torrent_info:contains('SD'): "1]=1&nzbcat[2030"
|
||||
div.torrent_info:contains('BDMV'): "1]=1&nzbcat[2060"
|
||||
div.torrent_info:contains('DVD-R'): "1]=1&nzbcat[2070"
|
||||
div.cats_movies: 1
|
||||
div.cats_music: 2
|
||||
div.cats_ebooks: 3
|
||||
comments:
|
||||
selector: a[href^="torrents.php?id="]
|
||||
attribute: href
|
||||
files:
|
||||
selector: td:nth-child(4)
|
||||
date:
|
||||
selector: td:nth-child(5)
|
||||
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:
|
||||
"strong.tl_free:contains(\"Freeleech!\")": "0"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"*": "1"
|
64
src/Jackett.Common/Indexers/SecretCinema.cs
Normal file
64
src/Jackett.Common/Indexers/SecretCinema.cs
Normal file
|
@ -0,0 +1,64 @@
|
|||
using System.Collections.Generic;
|
||||
using Jackett.Indexers.Abstract;
|
||||
using Jackett.Models;
|
||||
using Jackett.Services.Interfaces;
|
||||
using Jackett.Utils.Clients;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
|
||||
namespace Jackett.Indexers
|
||||
{
|
||||
public class SecretCinema : GazelleTracker
|
||||
{
|
||||
public SecretCinema(IIndexerConfigurationService configService, WebClient webClient, Logger logger, IProtectionService protectionService)
|
||||
: base(name: "Secret Cinema",
|
||||
desc: "A tracker for rare movies.",
|
||||
link: "https://secret-cinema.pw/",
|
||||
configService: configService,
|
||||
logger: logger,
|
||||
protectionService: protectionService,
|
||||
webClient: webClient,
|
||||
supportsFreeleechTokens: false // ratio free tracker
|
||||
)
|
||||
{
|
||||
Language = "en-us";
|
||||
Type = "private";
|
||||
TorznabCaps.SupportedMusicSearchParamsList = new List<string>() { "q", "album", "artist", "label", "year" };
|
||||
TorznabCaps.SupportsImdbSearch = true;
|
||||
|
||||
AddCategoryMapping(1, TorznabCatType.Movies, "Movies");
|
||||
AddCategoryMapping(2, TorznabCatType.Audio, "Music");
|
||||
AddCategoryMapping(3, TorznabCatType.Books, "E-Books");
|
||||
}
|
||||
|
||||
protected override bool ReleaseInfoPostParse(ReleaseInfo release, JObject torrent, JObject result)
|
||||
{
|
||||
var media = (string)torrent["media"];
|
||||
if (!string.IsNullOrEmpty(media))
|
||||
{
|
||||
switch (media)
|
||||
{
|
||||
case "SD":
|
||||
release.Category.Remove(TorznabCatType.Movies.ID);
|
||||
release.Category.Add(TorznabCatType.MoviesSD.ID);
|
||||
break;
|
||||
case "720p":
|
||||
case "1080p":
|
||||
case "4k": // not verified
|
||||
release.Category.Remove(TorznabCatType.Movies.ID);
|
||||
release.Category.Add(TorznabCatType.MoviesHD.ID);
|
||||
break;
|
||||
case "DVD-R":
|
||||
release.Category.Remove(TorznabCatType.Movies.ID);
|
||||
release.Category.Add(TorznabCatType.MoviesDVD.ID);
|
||||
break;
|
||||
case "BDMV":
|
||||
release.Category.Remove(TorznabCatType.Movies.ID);
|
||||
release.Category.Add(TorznabCatType.MoviesBluRay.ID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue