feat(indexers): REDACTED update urls (#1830)

* feat(indexers): REDACTED update urls

* feat(databse): REDACTED update urls in db with migrations
This commit is contained in:
ze0s 2024-11-24 14:07:45 +01:00 committed by GitHub
parent f54c51fa06
commit b0a30dd136
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 12 deletions

View file

@ -986,5 +986,9 @@ UPDATE irc_network
UPDATE irc_network UPDATE irc_network
SET server = 'irc.atw-inter.net', name = 'ATW-Inter' SET server = 'irc.atw-inter.net', name = 'ATW-Inter'
WHERE server = 'irc.ircnet.com'; WHERE server = 'irc.ircnet.com';
`,
`UPDATE indexer
SET base_url = 'https://redacted.sh/'
WHERE base_url = 'https://redacted.ch/';
`, `,
} }

View file

@ -1628,5 +1628,9 @@ UPDATE irc_network
UPDATE irc_network UPDATE irc_network
SET server = 'irc.atw-inter.net', name = 'ATW-Inter' SET server = 'irc.atw-inter.net', name = 'ATW-Inter'
WHERE server = 'irc.ircnet.com'; WHERE server = 'irc.ircnet.com';
`,
`UPDATE indexer
SET base_url = 'https://redacted.sh/'
WHERE base_url = 'https://redacted.ch/';
`, `,
} }

View file

@ -5,7 +5,7 @@ identifier: redacted
description: Redacted (RED) is a private torrent tracker for MUSIC description: Redacted (RED) is a private torrent tracker for MUSIC
language: en-us language: en-us
urls: urls:
- https://redacted.ch/ - https://redacted.sh/
privacy: private privacy: private
protocol: torrent protocol: torrent
supports: supports:
@ -33,7 +33,7 @@ settings:
help: Settings -> Account Settings -> API Keys - Generate new api keys. Scope (User, Torrents) help: Settings -> Account Settings -> API Keys - Generate new api keys. Scope (User, Torrents)
# api: # api:
# url: https://redacted.ch/ajax.php # url: https://redacted.sh/ajax.php
# type: json # type: json
# limits: # limits:
# max: 10 # max: 10
@ -83,7 +83,7 @@ irc:
type: single type: single
lines: lines:
- tests: - tests:
- line: Artist - Albumname [2008] [Single] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - hip.hop,rhythm.and.blues,2000s - line: Artist - Albumname [2008] [Single] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.sh/torrents.php?id=0000000 / https://redacted.sh/torrents.php?action=download&id=0000000 - hip.hop,rhythm.and.blues,2000s
expect: expect:
torrentName: Artist - Albumname [2008] [Single] - FLAC / Lossless / Log / 100% / Cue / CD torrentName: Artist - Albumname [2008] [Single] - FLAC / Lossless / Log / 100% / Cue / CD
title: Artist - Albumname title: Artist - Albumname
@ -91,10 +91,10 @@ irc:
category: Single category: Single
releaseTags: FLAC / Lossless / Log / 100% / Cue / CD releaseTags: FLAC / Lossless / Log / 100% / Cue / CD
groupId: "0000000" groupId: "0000000"
baseUrl: https://redacted.ch/ baseUrl: https://redacted.sh/
torrentId: "0000000" torrentId: "0000000"
tags: hip.hop,rhythm.and.blues,2000s tags: hip.hop,rhythm.and.blues,2000s
- line: A really long name here - Concertos 5 and 6, Suite No 2 [1991] [Album] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - classical - line: A really long name here - Concertos 5 and 6, Suite No 2 [1991] [Album] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.sh/torrents.php?id=0000000 / https://redacted.sh/torrents.php?action=download&id=0000000 - classical
expect: expect:
torrentName: A really long name here - Concertos 5 and 6, Suite No 2 [1991] [Album] - FLAC / Lossless / Log / 100% / Cue / CD torrentName: A really long name here - Concertos 5 and 6, Suite No 2 [1991] [Album] - FLAC / Lossless / Log / 100% / Cue / CD
title: A really long name here - Concertos 5 and 6, Suite No 2 title: A really long name here - Concertos 5 and 6, Suite No 2
@ -102,7 +102,7 @@ irc:
category: Album category: Album
releaseTags: FLAC / Lossless / Log / 100% / Cue / CD releaseTags: FLAC / Lossless / Log / 100% / Cue / CD
groupId: "0000000" groupId: "0000000"
baseUrl: https://redacted.ch/ baseUrl: https://redacted.sh/
torrentId: "0000000" torrentId: "0000000"
tags: classical tags: classical
pattern: '((.*) (?:\[(.*)\] \[(.*)\] - (.*))?) - .*id=(.*) \/ (https?://.+/).+id=(\d+)[ -]*(.*)' pattern: '((.*) (?:\[(.*)\] \[(.*)\] - (.*))?) - .*id=(.*) \/ (https?://.+/).+id=(\d+)[ -]*(.*)'

View file

@ -170,7 +170,7 @@ func TestIndexersParseAndFilter(t *testing.T) {
{ {
name: "announce_1", name: "announce_1",
args: args{ args: args{
announceLines: []string{"Artist - Albumname [2008] [Single] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - hip.hop,rhythm.and.blues,2000s"}, announceLines: []string{"Artist - Albumname [2008] [Single] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.sh/torrents.php?id=0000000 / https://redacted.sh/torrents.php?action=download&id=0000000 - hip.hop,rhythm.and.blues,2000s"},
filters: []filterTest{ filters: []filterTest{
{ {
filter: &domain.Filter{ filter: &domain.Filter{
@ -195,7 +195,7 @@ func TestIndexersParseAndFilter(t *testing.T) {
{ {
name: "announce_2", name: "announce_2",
args: args{ args: args{
announceLines: []string{"A really long name here - Concertos 5 and 6, Suite No 2 [1991] [Album] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - classical"}, announceLines: []string{"A really long name here - Concertos 5 and 6, Suite No 2 [1991] [Album] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.sh/torrents.php?id=0000000 / https://redacted.sh/torrents.php?action=download&id=0000000 - classical"},
filters: []filterTest{ filters: []filterTest{
{ {
filter: &domain.Filter{ filter: &domain.Filter{
@ -229,7 +229,7 @@ func TestIndexersParseAndFilter(t *testing.T) {
{ {
name: "announce_3", name: "announce_3",
args: args{ args: args{
announceLines: []string{"The best artist - Album No 2 [2024] [EP] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - classical"}, announceLines: []string{"The best artist - Album No 2 [2024] [EP] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.sh/torrents.php?id=0000000 / https://redacted.sh/torrents.php?action=download&id=0000000 - classical"},
filters: []filterTest{ filters: []filterTest{
{ {
filter: &domain.Filter{ filter: &domain.Filter{
@ -264,7 +264,7 @@ func TestIndexersParseAndFilter(t *testing.T) {
{ {
name: "announce_4", name: "announce_4",
args: args{ args: args{
announceLines: []string{"The best artist - Album No 2 [2024] [EP] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - classical"}, announceLines: []string{"The best artist - Album No 2 [2024] [EP] - FLAC / Lossless / Log / 100% / Cue / CD - https://redacted.sh/torrents.php?id=0000000 / https://redacted.sh/torrents.php?action=download&id=0000000 - classical"},
filters: []filterTest{ filters: []filterTest{
{ {
filter: &domain.Filter{ filter: &domain.Filter{
@ -299,7 +299,7 @@ func TestIndexersParseAndFilter(t *testing.T) {
{ {
name: "announce_5", name: "announce_5",
args: args{ args: args{
announceLines: []string{"The best artist - Album No 1 [2024] [EP] - FLAC / Lossless / Log / 87% / Cue / CD - https://redacted.ch/torrents.php?id=0000000 / https://redacted.ch/torrents.php?action=download&id=0000000 - classical"}, announceLines: []string{"The best artist - Album No 1 [2024] [EP] - FLAC / Lossless / Log / 87% / Cue / CD - https://redacted.sh/torrents.php?id=0000000 / https://redacted.sh/torrents.php?action=download&id=0000000 - classical"},
filters: []filterTest{ filters: []filterTest{
{ {
filter: &domain.Filter{ filter: &domain.Filter{

View file

@ -20,7 +20,7 @@ import (
"golang.org/x/time/rate" "golang.org/x/time/rate"
) )
const DefaultURL = "https://redacted.ch/ajax.php" const DefaultURL = "https://redacted.sh/ajax.php"
type ApiClient interface { type ApiClient interface {
GetTorrentByID(ctx context.Context, torrentID string) (*domain.TorrentBasic, error) GetTorrentByID(ctx context.Context, torrentID string) (*domain.TorrentBasic, error)