From 4c83787a0b1d716ae5ad2c13e2b705cb1005ec04 Mon Sep 17 00:00:00 2001 From: ze0s <43699394+zze0s@users.noreply.github.com> Date: Sun, 29 Jan 2023 21:40:49 +0100 Subject: [PATCH] feat(releases): add info url link to releases list (#683) * feat(indexers): definitions add infourl to irc parsing * feat(indexers): add infourl to releases * fix(indexers): fix info urls * fix(indexers): update btn --- internal/announce/announce.go | 4 ++ internal/database/postgres_migrate.go | 8 ++++ internal/database/release.go | 12 +++--- internal/database/sqlite_migrate.go | 8 ++++ internal/domain/indexer.go | 41 +++++++++++++++++++ internal/domain/release.go | 3 +- internal/indexer/definitions/acidlounge.yaml | 1 + internal/indexer/definitions/aither.yaml | 1 + internal/indexer/definitions/alpharatio.yaml | 1 + internal/indexer/definitions/animebytes.yaml | 4 +- internal/indexer/definitions/ant.yaml | 1 + internal/indexer/definitions/beyondhd.yaml | 3 +- internal/indexer/definitions/bit-hdtv.yaml | 1 + internal/indexer/definitions/bitsexy.yaml | 3 +- internal/indexer/definitions/btfiles.yaml | 1 + internal/indexer/definitions/btn.yaml | 4 +- .../indexer/definitions/cathode-ray-tube.yaml | 1 + internal/indexer/definitions/danishbytes.yaml | 1 + internal/indexer/definitions/digitalcore.yaml | 1 + internal/indexer/definitions/docspedia.yaml | 1 + internal/indexer/definitions/emp.yaml | 1 + internal/indexer/definitions/enthralled.yaml | 1 + internal/indexer/definitions/filelist.yaml | 1 + internal/indexer/definitions/funfile.yaml | 1 + internal/indexer/definitions/fuzer.yaml | 1 + .../indexer/definitions/gazellegames.yaml | 1 + internal/indexer/definitions/hd-space.yaml | 1 + internal/indexer/definitions/hd-torrents.yaml | 1 + internal/indexer/definitions/hdb.yaml | 1 + internal/indexer/definitions/hebits.yaml | 1 + internal/indexer/definitions/huno.yaml | 1 + .../indexer/definitions/immortalseed.yaml | 1 + internal/indexer/definitions/iplay.yaml | 1 + internal/indexer/definitions/iptorrents.yaml | 1 + internal/indexer/definitions/milkie.yaml | 1 + internal/indexer/definitions/morethantv.yaml | 1 + .../indexer/definitions/myanonamouse.yaml | 1 + internal/indexer/definitions/ncore.yaml | 1 + internal/indexer/definitions/nebulance.yaml | 1 + internal/indexer/definitions/norbits.yaml | 1 + internal/indexer/definitions/orpheus.yaml | 1 + internal/indexer/definitions/pbay.yaml | 1 + internal/indexer/definitions/pixelhd.yaml | 1 + .../indexer/definitions/polishsource.yaml | 1 + .../indexer/definitions/polishtracker.yaml | 1 + internal/indexer/definitions/ptm.yaml | 1 + internal/indexer/definitions/ptn.yaml | 1 + internal/indexer/definitions/ptp.yaml | 1 + .../indexer/definitions/pussytorrents.yaml | 1 + internal/indexer/definitions/red.yaml | 1 + internal/indexer/definitions/retroflix.yaml | 1 + .../indexer/definitions/revolutiontt.yaml | 1 + internal/indexer/definitions/scenehd.yaml | 1 + .../definitions/skipthecommericals.yaml | 1 + internal/indexer/definitions/speedapp.yaml | 1 + internal/indexer/definitions/superbits.yaml | 1 + .../indexer/definitions/torrentbytes.yaml | 1 + internal/indexer/definitions/torrentday.yaml | 1 + .../indexer/definitions/torrentleech.yaml | 1 + .../indexer/definitions/torrentnetwork.yaml | 1 + .../indexer/definitions/torrentseeds.yaml | 1 + .../indexer/definitions/torrentsyndikat.yaml | 1 + .../indexer/definitions/trancetraffic.yaml | 1 + internal/indexer/definitions/uhdbits.yaml | 1 + internal/indexer/definitions/xspeeds.yaml | 1 + web/src/components/data-table/Cells.tsx | 18 ++++++++ web/src/screens/releases/ReleaseTable.tsx | 37 +++++++++++++++-- web/src/types/Release.d.ts | 2 + 68 files changed, 189 insertions(+), 13 deletions(-) diff --git a/internal/announce/announce.go b/internal/announce/announce.go index 75782b3..2d82632 100644 --- a/internal/announce/announce.go +++ b/internal/announce/announce.go @@ -223,6 +223,10 @@ func (a *announceProcessor) onLinesMatched(def *domain.IndexerDefinition, vars m if matched != nil { rls.TorrentURL = matched.TorrentURL + if matched.InfoURL != "" { + rls.InfoURL = matched.InfoURL + } + // only used by few indexers if matched.TorrentName != "" { rls.TorrentName = matched.TorrentName diff --git a/internal/database/postgres_migrate.go b/internal/database/postgres_migrate.go index a9c226f..43e0773 100644 --- a/internal/database/postgres_migrate.go +++ b/internal/database/postgres_migrate.go @@ -199,6 +199,8 @@ CREATE TABLE "release" protocol TEXT, implementation TEXT, timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + info_url TEXT, + download_url TEXT, group_id TEXT, torrent_id TEXT, torrent_name TEXT, @@ -647,4 +649,10 @@ UPDATE release_action_status SET filter_id = (SELECT f.id FROM filter f WHERE f.name = release_action_status.filter); `, + `ALTER TABLE "release" +ADD COLUMN info_url TEXT; + +ALTER TABLE "release" +ADD COLUMN download_url TEXT; + `, } diff --git a/internal/database/release.go b/internal/database/release.go index 9766da7..ce10f81 100644 --- a/internal/database/release.go +++ b/internal/database/release.go @@ -35,8 +35,8 @@ func (repo *ReleaseRepo) Store(ctx context.Context, r *domain.Release) (*domain. queryBuilder := repo.db.squirrel. Insert("release"). - Columns("filter_status", "rejections", "indexer", "filter", "protocol", "implementation", "timestamp", "group_id", "torrent_id", "torrent_name", "size", "title", "category", "season", "episode", "year", "resolution", "source", "codec", "container", "hdr", "release_group", "proper", "repack", "website", "type", "origin", "tags", "uploader", "pre_time", "filter_id"). - Values(r.FilterStatus, pq.Array(r.Rejections), r.Indexer, r.FilterName, r.Protocol, r.Implementation, r.Timestamp.Format(time.RFC3339), r.GroupID, r.TorrentID, r.TorrentName, r.Size, r.Title, r.Category, r.Season, r.Episode, r.Year, r.Resolution, r.Source, codecStr, r.Container, hdrStr, r.Group, r.Proper, r.Repack, r.Website, r.Type, r.Origin, pq.Array(r.Tags), r.Uploader, r.PreTime, r.FilterID). + Columns("filter_status", "rejections", "indexer", "filter", "protocol", "implementation", "timestamp", "group_id", "torrent_id", "info_url", "download_url", "torrent_name", "size", "title", "category", "season", "episode", "year", "resolution", "source", "codec", "container", "hdr", "release_group", "proper", "repack", "website", "type", "origin", "tags", "uploader", "pre_time", "filter_id"). + Values(r.FilterStatus, pq.Array(r.Rejections), r.Indexer, r.FilterName, r.Protocol, r.Implementation, r.Timestamp.Format(time.RFC3339), r.GroupID, r.TorrentID, r.InfoURL, r.TorrentURL, r.TorrentName, r.Size, r.Title, r.Category, r.Season, r.Episode, r.Year, r.Resolution, r.Source, codecStr, r.Container, hdrStr, r.Group, r.Proper, r.Repack, r.Website, r.Type, r.Origin, pq.Array(r.Tags), r.Uploader, r.PreTime, r.FilterID). Suffix("RETURNING id").RunWith(repo.db.handler) // return values @@ -205,7 +205,7 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain } queryBuilder := repo.db.squirrel. - Select("r.id", "r.filter_status", "r.rejections", "r.indexer", "r.filter", "r.protocol", "r.title", "r.torrent_name", "r.size", "r.timestamp", + Select("r.id", "r.filter_status", "r.rejections", "r.indexer", "r.filter", "r.protocol", "r.info_url", "r.download_url", "r.title", "r.torrent_name", "r.size", "r.timestamp", "ras.id", "ras.status", "ras.action", "ras.type", "ras.client", "ras.filter", "ras.rejections", "ras.timestamp"). Column(sq.Alias(countQuery, "page_total")). From("release r"). @@ -239,14 +239,14 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain var rls domain.Release var ras domain.ReleaseActionStatus - var rlsindexer, rlsfilter sql.NullString + var rlsindexer, rlsfilter, infoUrl, downloadUrl sql.NullString var rasId sql.NullInt64 var rasStatus, rasAction, rasType, rasClient, rasFilter sql.NullString var rasRejections []sql.NullString var rasTimestamp sql.NullTime - if err := rows.Scan(&rls.ID, &rls.FilterStatus, pq.Array(&rls.Rejections), &rlsindexer, &rlsfilter, &rls.Protocol, &rls.Title, &rls.TorrentName, &rls.Size, &rls.Timestamp, &rasId, &rasStatus, &rasAction, &rasType, &rasClient, &rasFilter, pq.Array(&rasRejections), &rasTimestamp, &countItems); err != nil { + if err := rows.Scan(&rls.ID, &rls.FilterStatus, pq.Array(&rls.Rejections), &rlsindexer, &rlsfilter, &rls.Protocol, &infoUrl, &downloadUrl, &rls.Title, &rls.TorrentName, &rls.Size, &rls.Timestamp, &rasId, &rasStatus, &rasAction, &rasType, &rasClient, &rasFilter, pq.Array(&rasRejections), &rasTimestamp, &countItems); err != nil { return res, 0, 0, errors.Wrap(err, "error scanning row") } @@ -280,6 +280,8 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain rls.Indexer = rlsindexer.String rls.FilterName = rlsfilter.String rls.ActionStatus = make([]domain.ReleaseActionStatus, 0) + rls.InfoURL = infoUrl.String + rls.TorrentURL = downloadUrl.String // only add ActionStatus if it's not empty if ras.ID > 0 { diff --git a/internal/database/sqlite_migrate.go b/internal/database/sqlite_migrate.go index b467233..9c12694 100644 --- a/internal/database/sqlite_migrate.go +++ b/internal/database/sqlite_migrate.go @@ -199,6 +199,8 @@ CREATE TABLE "release" protocol TEXT, implementation TEXT, timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + info_url TEXT, + download_url TEXT, group_id TEXT, torrent_id TEXT, torrent_name TEXT, @@ -1040,4 +1042,10 @@ UPDATE release_action_status SET filter_id = (SELECT f.id FROM filter f WHERE f.name = release_action_status.filter); `, + `ALTER TABLE "release" +ADD COLUMN info_url TEXT; + +ALTER TABLE "release" +ADD COLUMN download_url TEXT; + `, } diff --git a/internal/domain/indexer.go b/internal/domain/indexer.go index 675dfbc..ba7adef 100644 --- a/internal/domain/indexer.go +++ b/internal/domain/indexer.go @@ -178,10 +178,12 @@ type IndexerIRCParseLine struct { type IndexerIRCParseMatch struct { TorrentURL string `json:"torrenturl"` TorrentName string `json:"torrentname"` + InfoURL string `json:"infourl"` Encode []string `json:"encode"` } type IndexerIRCParseMatched struct { + InfoURL string TorrentURL string TorrentName string } @@ -198,6 +200,45 @@ func (p *IndexerIRCParse) ParseMatch(baseURL string, vars map[string]string) (*I } } + if p.Match.InfoURL != "" { + // setup text template to inject variables into + tmpl, err := template.New("infourl").Funcs(sprig.TxtFuncMap()).Parse(p.Match.InfoURL) + if err != nil { + return nil, errors.New("could not create info url template") + } + + var urlBytes bytes.Buffer + if err := tmpl.Execute(&urlBytes, &vars); err != nil { + return nil, errors.New("could not write info url template output") + } + + templateUrl := urlBytes.String() + parsedUrl, err := url.Parse(templateUrl) + if err != nil { + return nil, err + } + + // for backwards compatibility remove Host and Scheme to rebuild url + if parsedUrl.Host != "" { + parsedUrl.Host = "" + } + if parsedUrl.Scheme != "" { + parsedUrl.Scheme = "" + } + + // join baseURL with query + baseUrlPath, err := url.JoinPath(baseURL, parsedUrl.Path) + if err != nil { + return nil, errors.Wrap(err, "could not join info url") + } + + // reconstruct url + infoUrl, _ := url.Parse(baseUrlPath) + infoUrl.RawQuery = parsedUrl.RawQuery + + matched.InfoURL = infoUrl.String() + } + if p.Match.TorrentURL != "" { // setup text template to inject variables into tmpl, err := template.New("torrenturl").Funcs(sprig.TxtFuncMap()).Parse(p.Match.TorrentURL) diff --git a/internal/domain/release.go b/internal/domain/release.go index 208469f..1e4d684 100644 --- a/internal/domain/release.go +++ b/internal/domain/release.go @@ -44,9 +44,10 @@ type Release struct { Protocol ReleaseProtocol `json:"protocol"` Implementation ReleaseImplementation `json:"implementation"` // irc, rss, api Timestamp time.Time `json:"timestamp"` + InfoURL string `json:"info_url"` + TorrentURL string `json:"download_url"` GroupID string `json:"group_id"` TorrentID string `json:"torrent_id"` - TorrentURL string `json:"-"` TorrentTmpFile string `json:"-"` TorrentDataRawBytes []byte `json:"-"` TorrentHash string `json:"-"` diff --git a/internal/indexer/definitions/acidlounge.yaml b/internal/indexer/definitions/acidlounge.yaml index 3468b43..d6a74cf 100644 --- a/internal/indexer/definitions/acidlounge.yaml +++ b/internal/indexer/definitions/acidlounge.yaml @@ -72,4 +72,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/rssdownload.php?passkey={{ .passkey }}&uid={{ .uid }}&tid={{ .torrentId }}" diff --git a/internal/indexer/definitions/aither.yaml b/internal/indexer/definitions/aither.yaml index da4c53c..ddc9be5 100644 --- a/internal/indexer/definitions/aither.yaml +++ b/internal/indexer/definitions/aither.yaml @@ -62,4 +62,5 @@ irc: - torrentId match: + infourl: "/torrents/{{ .torrentId }}" torrenturl: "/torrent/download/{{ .torrentId }}.{{ .rsskey }}" diff --git a/internal/indexer/definitions/alpharatio.yaml b/internal/indexer/definitions/alpharatio.yaml index b381730..f47cd39 100644 --- a/internal/indexer/definitions/alpharatio.yaml +++ b/internal/indexer/definitions/alpharatio.yaml @@ -83,4 +83,5 @@ irc: - auto match: + infourl: "/torrents.php?id={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/animebytes.yaml b/internal/indexer/definitions/animebytes.yaml index ca7b828..48e9825 100644 --- a/internal/indexer/definitions/animebytes.yaml +++ b/internal/indexer/definitions/animebytes.yaml @@ -67,7 +67,7 @@ irc: - "Best Visual Novel - Visual Novel [2006] :: Game / PC / Unarchived / Hentai (Censored) || https://animebytes.tv/torrents.php?id=00000&torrentid=00000 || nukige || Uploaded by: Uploader" - "Artist Name - Album of awesome Music [1991] :: MP3 / V0 (VBR) / CD || https://animebytes.tv/torrents2.php?id=00000&torrentid=000000 || ambient, folk || Uploaded by: Uploader" - "Awesome Series - TV Series [2022] :: Web / MKV / h264 / 1080p / AAC 2.0 / Softsubs (Sub Group) / Episode 1 / Freeleech || https://animebytes.tv/torrents.php?id=00000&torrentid=000000 || || Uploaded by: Uploader" - pattern: '((.*?)+)(?: - )?(Visual Novel|Light Novel|TV S.*|Movie|Manga|OVA|ONA|DVD Special|BD Special|Oneshot|Anthology|Manhwa|Manhua|Artbook|Game|Live Action.*|)[\s\p{Zs}]{2,}\[(\d+)\] :: (.*?(?:Hardsubs|RAW|Softsubs|Translated) \((.*?)\).*?|.*?)(?: \/ Episode (\d+).*?)?(?: \/ )?(Freeleech)?(?:.?\|\|.?)(https.+\/)torrents.*\?id=\d+&torrentid=(\d+)(?:.?\|\|.?)?([A-Za-z,. ]+\w)?(?:.?\|\|.?)?(?:Uploaded by: (.*))?' + pattern: '((.*?)+)(?: - )?(Visual Novel|Light Novel|TV S.*|Movie|Manga|OVA|ONA|DVD Special|BD Special|Oneshot|Anthology|Manhwa|Manhua|Artbook|Game|Live Action.*|)[\s\p{Zs}]{2,}\[(\d+)\] :: (.*?(?:Hardsubs|RAW|Softsubs|Translated) \((.*?)\).*?|.*?)(?: \/ Episode (\d+).*?)?(?: \/ )?(Freeleech)?(?:.?\|\|.?)(https.+\/)torrents.*\?id=(\d+)&torrentid=(\d+)(?:.?\|\|.?)?([A-Za-z,. ]+\w)?(?:.?\|\|.?)?(?:Uploaded by: (.*))?' vars: - torrentName - title @@ -78,10 +78,12 @@ irc: - releaseEpisode - freeleech - baseUrl + - groupId - torrentId - tags - uploader match: + infourl: "/torrents.php?id={{ .groupId }}&torrentid={{ .torrentId }}" torrenturl: "/torrent/{{ .torrentId }}/download/{{ .passkey }}" torrentname: "{{ if .releaseGroup }}[{{ .releaseGroup }}] {{ end }}{{ .torrentName }} {{ if .releaseEpisode }}{{ printf \"- %02s \" .releaseEpisode }}{{ end }} {{ if .year }}[{{ .year }}]{{ end }}{{ print \"[\" .releaseTags \"]\" | replace \" / \" \"][\" }}" diff --git a/internal/indexer/definitions/ant.yaml b/internal/indexer/definitions/ant.yaml index 201b91c..8bd669d 100644 --- a/internal/indexer/definitions/ant.yaml +++ b/internal/indexer/definitions/ant.yaml @@ -74,4 +74,5 @@ irc: - tags match: + infourl: "/torrents.php?id={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/beyondhd.yaml b/internal/indexer/definitions/beyondhd.yaml index 6fb064d..82fd26b 100644 --- a/internal/indexer/definitions/beyondhd.yaml +++ b/internal/indexer/definitions/beyondhd.yaml @@ -59,7 +59,7 @@ irc: type: single lines: - test: - - "New Torrent: That.Show.S01.1080p.Blu-ray.AVC.DTS-HD.MA.5.1-Test Category: TV By: Uploader Size: 137.73 GB Link: https://beyond-hd.me/details.php?id=00000" + - "New Torrent: That.Show.S01.1080p.Blu-ray.AVC.DTS-HD.MA.5.1-Test Category: TV By: Uploader Size: 137.73 GB Link: https://beyond-hd.me/torrents/autodl?id=00000" pattern: 'New Torrent: (.*) Category: (.*) By: (.*) Size: (.*) Link: (https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)' vars: - torrentName @@ -70,4 +70,5 @@ irc: - torrentId match: + infourl: "/torrents/autodl?id={{ .torrentId }}" torrenturl: "/torrent/download/auto.{{ .torrentId }}.{{ .rsskey }}" diff --git a/internal/indexer/definitions/bit-hdtv.yaml b/internal/indexer/definitions/bit-hdtv.yaml index bc7094c..6dbf01c 100644 --- a/internal/indexer/definitions/bit-hdtv.yaml +++ b/internal/indexer/definitions/bit-hdtv.yaml @@ -63,4 +63,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/rssdownload.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/bitsexy.yaml b/internal/indexer/definitions/bitsexy.yaml index c284dc7..8f2eaf5 100644 --- a/internal/indexer/definitions/bitsexy.yaml +++ b/internal/indexer/definitions/bitsexy.yaml @@ -62,4 +62,5 @@ irc: - preTime match: - torrenturl: "/download.php?torrent={{ .torrentId }}&torrent_pass={{ .passkey }}" \ No newline at end of file + infourl: "/details.php?id={{ .torrentId }}" + torrenturl: "/download.php?torrent={{ .torrentId }}&torrent_pass={{ .passkey }}" diff --git a/internal/indexer/definitions/btfiles.yaml b/internal/indexer/definitions/btfiles.yaml index 4e3bd76..3ead294 100644 --- a/internal/indexer/definitions/btfiles.yaml +++ b/internal/indexer/definitions/btfiles.yaml @@ -64,4 +64,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?torrent={{ .torrentId }}&k={{ .rsskey }}&ssl=1" diff --git a/internal/indexer/definitions/btn.yaml b/internal/indexer/definitions/btn.yaml index 6ca5fd0..92d104f 100644 --- a/internal/indexer/definitions/btn.yaml +++ b/internal/indexer/definitions/btn.yaml @@ -96,10 +96,12 @@ irc: - preTime - test: - "[ https://XXXXXXXXX/torrents.php?id=7338 / https://XXXXXXXXX/torrents.php?action=download&id=9116 ]" - pattern: \[ .* \/ (https?:\/\/.*\/).+id=(\d+) \] + pattern: \[ (https?:\/\/.*\/).+id=(\d+) \/ https?:\/\/.*\/.+id=(\d+) \] vars: - baseUrl + - groupId - torrentId match: + infourl: "/torrents.php?id={{ .groupId }}&torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/cathode-ray-tube.yaml b/internal/indexer/definitions/cathode-ray-tube.yaml index aa1a408..ecfe971 100644 --- a/internal/indexer/definitions/cathode-ray-tube.yaml +++ b/internal/indexer/definitions/cathode-ray-tube.yaml @@ -68,4 +68,5 @@ irc: - torrentId match: + infourl: "/torrents.php?id={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/danishbytes.yaml b/internal/indexer/definitions/danishbytes.yaml index 20eb9ab..fb574fc 100644 --- a/internal/indexer/definitions/danishbytes.yaml +++ b/internal/indexer/definitions/danishbytes.yaml @@ -72,4 +72,5 @@ irc: - freeleech match: + infourl: "/torrents/{{ .torrentId }}" torrenturl: "/torrent/download/{{ .torrentId }}.{{ .passkey }}" diff --git a/internal/indexer/definitions/digitalcore.yaml b/internal/indexer/definitions/digitalcore.yaml index ab93572..49328a7 100644 --- a/internal/indexer/definitions/digitalcore.yaml +++ b/internal/indexer/definitions/digitalcore.yaml @@ -67,4 +67,5 @@ irc: - torrentId match: + infourl: "/torrent/{{ .torrentId }}" torrenturl: "/api/v1/torrents/download/{{ .torrentId }}/{{ .passkey }}" diff --git a/internal/indexer/definitions/docspedia.yaml b/internal/indexer/definitions/docspedia.yaml index 247fd76..66c3db5 100644 --- a/internal/indexer/definitions/docspedia.yaml +++ b/internal/indexer/definitions/docspedia.yaml @@ -61,4 +61,5 @@ irc: - preTime match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?torrent={{ .torrentId }}&torrent_pass={{ .passkey }}" diff --git a/internal/indexer/definitions/emp.yaml b/internal/indexer/definitions/emp.yaml index ad7826a..6166fe3 100644 --- a/internal/indexer/definitions/emp.yaml +++ b/internal/indexer/definitions/emp.yaml @@ -69,4 +69,5 @@ irc: - torrentId match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/enthralled.yaml b/internal/indexer/definitions/enthralled.yaml index 72733e5..2996333 100644 --- a/internal/indexer/definitions/enthralled.yaml +++ b/internal/indexer/definitions/enthralled.yaml @@ -68,4 +68,5 @@ irc: - torrentId match: + infourl: "/torrents.php?id={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/filelist.yaml b/internal/indexer/definitions/filelist.yaml index 5c61146..6e12017 100644 --- a/internal/indexer/definitions/filelist.yaml +++ b/internal/indexer/definitions/filelist.yaml @@ -66,6 +66,7 @@ irc: - uploader match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?id={{ .torrentId }}&file={{ .torrentName }}.torrent&passkey={{ .passkey }}" encode: - torrentName diff --git a/internal/indexer/definitions/funfile.yaml b/internal/indexer/definitions/funfile.yaml index 6cc1637..63444bb 100644 --- a/internal/indexer/definitions/funfile.yaml +++ b/internal/indexer/definitions/funfile.yaml @@ -74,6 +74,7 @@ irc: # - preTime match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php/{{ .torrentId }}/{{ .passkey }}/{{ .torrentName }}.torrent" encode: - torrentName diff --git a/internal/indexer/definitions/fuzer.yaml b/internal/indexer/definitions/fuzer.yaml index 9d4f8ff..d4bda27 100644 --- a/internal/indexer/definitions/fuzer.yaml +++ b/internal/indexer/definitions/fuzer.yaml @@ -67,6 +67,7 @@ irc: - torrentName match: + infourl: "/attachment.php?attachmentid={{ .torrentId }}" torrenturl: "/rss/torrent.php/{{ .torrentId }}/{{ .uid }}/{{ .passkey }}/{{ .torrentName }}.torrent" encode: - torrentName diff --git a/internal/indexer/definitions/gazellegames.yaml b/internal/indexer/definitions/gazellegames.yaml index 32bd0b1..5d96a4b 100644 --- a/internal/indexer/definitions/gazellegames.yaml +++ b/internal/indexer/definitions/gazellegames.yaml @@ -98,4 +98,5 @@ irc: - tags match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/hd-space.yaml b/internal/indexer/definitions/hd-space.yaml index 6e24c20..612369e 100644 --- a/internal/indexer/definitions/hd-space.yaml +++ b/internal/indexer/definitions/hd-space.yaml @@ -63,6 +63,7 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?id={{ .torrentId }}&f={{ .torrentName }}.torrent&rsspid={{ .rsskey }}" encode: - torrentName diff --git a/internal/indexer/definitions/hd-torrents.yaml b/internal/indexer/definitions/hd-torrents.yaml index 3c104a5..9545ae9 100644 --- a/internal/indexer/definitions/hd-torrents.yaml +++ b/internal/indexer/definitions/hd-torrents.yaml @@ -67,6 +67,7 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/rss/?action=download&key={{ .key }}&token={{ .token }}&hash={{ .torrentId }}&title={{ .torrentName }}" encode: - torrentName diff --git a/internal/indexer/definitions/hdb.yaml b/internal/indexer/definitions/hdb.yaml index 84ddc25..f06943c 100644 --- a/internal/indexer/definitions/hdb.yaml +++ b/internal/indexer/definitions/hdb.yaml @@ -74,4 +74,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/hebits.yaml b/internal/indexer/definitions/hebits.yaml index 589fa0e..458c091 100644 --- a/internal/indexer/definitions/hebits.yaml +++ b/internal/indexer/definitions/hebits.yaml @@ -84,4 +84,5 @@ irc: - torrentName match: + infourl: "/torrents.php?id={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .passkey }}" diff --git a/internal/indexer/definitions/huno.yaml b/internal/indexer/definitions/huno.yaml index 8eb911e..7c5d777 100644 --- a/internal/indexer/definitions/huno.yaml +++ b/internal/indexer/definitions/huno.yaml @@ -65,4 +65,5 @@ irc: - uploader match: + infourl: "/torrents/{{ .torrentId }}" torrenturl: "/torrent/download/{{ .torrentId }}.{{ .rsskey }}" diff --git a/internal/indexer/definitions/immortalseed.yaml b/internal/indexer/definitions/immortalseed.yaml index c1efd63..e7a1cda 100644 --- a/internal/indexer/definitions/immortalseed.yaml +++ b/internal/indexer/definitions/immortalseed.yaml @@ -71,4 +71,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?type=rss&secret_key={{ .passkey }}&id={{ .torrentId }}" diff --git a/internal/indexer/definitions/iplay.yaml b/internal/indexer/definitions/iplay.yaml index 75d8afb..13240b4 100644 --- a/internal/indexer/definitions/iplay.yaml +++ b/internal/indexer/definitions/iplay.yaml @@ -63,4 +63,5 @@ irc: - uploader match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download2.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/iptorrents.yaml b/internal/indexer/definitions/iptorrents.yaml index 498b166..e1c50d0 100644 --- a/internal/indexer/definitions/iptorrents.yaml +++ b/internal/indexer/definitions/iptorrents.yaml @@ -74,6 +74,7 @@ irc: - torrentSize match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?torrent_pass={{ .passkey }}" encode: - torrentName diff --git a/internal/indexer/definitions/milkie.yaml b/internal/indexer/definitions/milkie.yaml index 15ba42e..c9ddc01 100644 --- a/internal/indexer/definitions/milkie.yaml +++ b/internal/indexer/definitions/milkie.yaml @@ -64,6 +64,7 @@ irc: - torrentId match: + infourl: "/browse/{{ .torrentId }}" torrenturl: "/api/v1/torrents/{{ .torrentId }}/torrent?key={{ .apikey }}" encode: - apikey diff --git a/internal/indexer/definitions/morethantv.yaml b/internal/indexer/definitions/morethantv.yaml index 3fdc965..c516b84 100644 --- a/internal/indexer/definitions/morethantv.yaml +++ b/internal/indexer/definitions/morethantv.yaml @@ -69,4 +69,5 @@ irc: - torrentId match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/myanonamouse.yaml b/internal/indexer/definitions/myanonamouse.yaml index 6cb92e5..7c93828 100644 --- a/internal/indexer/definitions/myanonamouse.yaml +++ b/internal/indexer/definitions/myanonamouse.yaml @@ -66,5 +66,6 @@ irc: - freeleech match: + infourl: "/t/{{ .torrentId }}" torrenturl: "/tor/download.php?tid={{ .torrentId }}" torrentname: "{{ .torrentName }} by {{ .author }} [{{ .language }} / {{ .tags }}]" diff --git a/internal/indexer/definitions/ncore.yaml b/internal/indexer/definitions/ncore.yaml index 1d93f4b..63d2ad0 100644 --- a/internal/indexer/definitions/ncore.yaml +++ b/internal/indexer/definitions/ncore.yaml @@ -68,5 +68,6 @@ irc: - torrentId match: + infourl: "/torrents.php?action=details&id={{ .torrentId }}" # https://ncore.pro/torrents.php?action=download&id=0000&key=00000 torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&key={{ .passkey }}" diff --git a/internal/indexer/definitions/nebulance.yaml b/internal/indexer/definitions/nebulance.yaml index fb198b3..eedeb2e 100644 --- a/internal/indexer/definitions/nebulance.yaml +++ b/internal/indexer/definitions/nebulance.yaml @@ -80,4 +80,5 @@ irc: - tags match: + infourl: "/torrents.php?id={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/norbits.yaml b/internal/indexer/definitions/norbits.yaml index 607f05c..6571246 100644 --- a/internal/indexer/definitions/norbits.yaml +++ b/internal/indexer/definitions/norbits.yaml @@ -63,4 +63,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/orpheus.yaml b/internal/indexer/definitions/orpheus.yaml index 58158e8..3992b02 100644 --- a/internal/indexer/definitions/orpheus.yaml +++ b/internal/indexer/definitions/orpheus.yaml @@ -72,4 +72,5 @@ irc: - torrentId match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/pbay.yaml b/internal/indexer/definitions/pbay.yaml index 5ab1e97..4e843d0 100644 --- a/internal/indexer/definitions/pbay.yaml +++ b/internal/indexer/definitions/pbay.yaml @@ -69,4 +69,5 @@ irc: - torrentId match: + infourl: "/torrents.php?id={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/pixelhd.yaml b/internal/indexer/definitions/pixelhd.yaml index ae53400..9a8a35f 100644 --- a/internal/indexer/definitions/pixelhd.yaml +++ b/internal/indexer/definitions/pixelhd.yaml @@ -87,4 +87,5 @@ irc: - tags match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" \ No newline at end of file diff --git a/internal/indexer/definitions/polishsource.yaml b/internal/indexer/definitions/polishsource.yaml index ba739c5..892c098 100644 --- a/internal/indexer/definitions/polishsource.yaml +++ b/internal/indexer/definitions/polishsource.yaml @@ -70,6 +70,7 @@ irc: - preTime match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/downloadssl.php?id={{ .torrentId }}&torr={{ .torrentName }}.torrent&passkey={{ .passkey }}" encode: - torrentName diff --git a/internal/indexer/definitions/polishtracker.yaml b/internal/indexer/definitions/polishtracker.yaml index 272e37a..50f62eb 100644 --- a/internal/indexer/definitions/polishtracker.yaml +++ b/internal/indexer/definitions/polishtracker.yaml @@ -70,4 +70,5 @@ irc: - torrentId match: + infourl: "/torrents/{{ .torrentId }}" torrenturl: "/downrss/{{ .rsskey }}/{{ .torrentId }}" diff --git a/internal/indexer/definitions/ptm.yaml b/internal/indexer/definitions/ptm.yaml index 03b45a9..d3c7dba 100644 --- a/internal/indexer/definitions/ptm.yaml +++ b/internal/indexer/definitions/ptm.yaml @@ -64,6 +64,7 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" encode: - torrentName diff --git a/internal/indexer/definitions/ptn.yaml b/internal/indexer/definitions/ptn.yaml index 094847e..6f2bf83 100644 --- a/internal/indexer/definitions/ptn.yaml +++ b/internal/indexer/definitions/ptn.yaml @@ -61,4 +61,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?torrent={{ .torrentId }}&torrent_pass={{ .torrent_pass }}" \ No newline at end of file diff --git a/internal/indexer/definitions/ptp.yaml b/internal/indexer/definitions/ptp.yaml index 9dafce4..7a380ec 100644 --- a/internal/indexer/definitions/ptp.yaml +++ b/internal/indexer/definitions/ptp.yaml @@ -104,4 +104,5 @@ irc: - tags match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/pussytorrents.yaml b/internal/indexer/definitions/pussytorrents.yaml index ec761dd..82a9356 100644 --- a/internal/indexer/definitions/pussytorrents.yaml +++ b/internal/indexer/definitions/pussytorrents.yaml @@ -63,6 +63,7 @@ irc: - torrentId match: + infourl: "/torrent/{{ .torrentId }}" torrenturl: "/rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" encode: - torrentName diff --git a/internal/indexer/definitions/red.yaml b/internal/indexer/definitions/red.yaml index 117608d..83524ca 100644 --- a/internal/indexer/definitions/red.yaml +++ b/internal/indexer/definitions/red.yaml @@ -96,4 +96,5 @@ irc: - tags match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/retroflix.yaml b/internal/indexer/definitions/retroflix.yaml index 2d6baad..4da563f 100644 --- a/internal/indexer/definitions/retroflix.yaml +++ b/internal/indexer/definitions/retroflix.yaml @@ -65,6 +65,7 @@ irc: - torrentId match: + infourl: "/browse/t/{{ .torrentId }}/{{ .torrentName }}" torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" encode: - torrentName diff --git a/internal/indexer/definitions/revolutiontt.yaml b/internal/indexer/definitions/revolutiontt.yaml index 57144f9..c2fb143 100644 --- a/internal/indexer/definitions/revolutiontt.yaml +++ b/internal/indexer/definitions/revolutiontt.yaml @@ -68,6 +68,7 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" encode: - torrentName diff --git a/internal/indexer/definitions/scenehd.yaml b/internal/indexer/definitions/scenehd.yaml index 1237c2e..e360471 100644 --- a/internal/indexer/definitions/scenehd.yaml +++ b/internal/indexer/definitions/scenehd.yaml @@ -67,4 +67,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/skipthecommericals.yaml b/internal/indexer/definitions/skipthecommericals.yaml index 006de36..2a218a0 100644 --- a/internal/indexer/definitions/skipthecommericals.yaml +++ b/internal/indexer/definitions/skipthecommericals.yaml @@ -65,4 +65,5 @@ irc: - torrentId match: + infourl: "/torrents/{{ .torrentId }}" torrenturl: "/torrent/download/{{ .torrentId }}.{{ .rsskey }}" diff --git a/internal/indexer/definitions/speedapp.yaml b/internal/indexer/definitions/speedapp.yaml index 5c05c42..4f89e4f 100644 --- a/internal/indexer/definitions/speedapp.yaml +++ b/internal/indexer/definitions/speedapp.yaml @@ -61,4 +61,5 @@ irc: - torrentId match: + infourl: "/browse/{{ .torrentId }}/t/{{ .torrentName }}" torrenturl: "/rss/download/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/superbits.yaml b/internal/indexer/definitions/superbits.yaml index 6fac733..c74011a 100644 --- a/internal/indexer/definitions/superbits.yaml +++ b/internal/indexer/definitions/superbits.yaml @@ -64,4 +64,5 @@ irc: - preTime match: + infourl: "/torrent/{{ .torrentId }}/" torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}" diff --git a/internal/indexer/definitions/torrentbytes.yaml b/internal/indexer/definitions/torrentbytes.yaml index 2b84166..4d77082 100644 --- a/internal/indexer/definitions/torrentbytes.yaml +++ b/internal/indexer/definitions/torrentbytes.yaml @@ -67,6 +67,7 @@ irc: - preTime match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?id={{ .torrentId }}&SSL=1&name={{ .torrentName }}.torrent" cookie: true encode: diff --git a/internal/indexer/definitions/torrentday.yaml b/internal/indexer/definitions/torrentday.yaml index 0158f1a..8306046 100644 --- a/internal/indexer/definitions/torrentday.yaml +++ b/internal/indexer/definitions/torrentday.yaml @@ -71,6 +71,7 @@ irc: - torrentSize match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?torrent_pass={{ .passkey }}" encode: - torrentName diff --git a/internal/indexer/definitions/torrentleech.yaml b/internal/indexer/definitions/torrentleech.yaml index 998a56d..783000c 100644 --- a/internal/indexer/definitions/torrentleech.yaml +++ b/internal/indexer/definitions/torrentleech.yaml @@ -68,6 +68,7 @@ irc: - torrentId match: + infourl: "/torrent/{{ .torrentId }}" torrenturl: "/rss/download/{{ .torrentId }}/{{ .rsskey }}/{{ .torrentName }}.torrent" encode: - torrentName diff --git a/internal/indexer/definitions/torrentnetwork.yaml b/internal/indexer/definitions/torrentnetwork.yaml index 7d7b853..19e665f 100644 --- a/internal/indexer/definitions/torrentnetwork.yaml +++ b/internal/indexer/definitions/torrentnetwork.yaml @@ -66,4 +66,5 @@ irc: - torrentId match: + infourl: "/torrent/{{ .torrentId }}" torrenturl: "/download/{{ .torrentId }}/{{ .passkey }}" diff --git a/internal/indexer/definitions/torrentseeds.yaml b/internal/indexer/definitions/torrentseeds.yaml index 6e9f2a4..84b7a5d 100644 --- a/internal/indexer/definitions/torrentseeds.yaml +++ b/internal/indexer/definitions/torrentseeds.yaml @@ -69,4 +69,5 @@ irc: - uploader match: + infourl: "/torrents/{{ .torrentId }}" torrenturl: "/torrent/download/{{ .torrentId }}.{{ .rsskey }}" diff --git a/internal/indexer/definitions/torrentsyndikat.yaml b/internal/indexer/definitions/torrentsyndikat.yaml index 34a7fe9..5316763 100644 --- a/internal/indexer/definitions/torrentsyndikat.yaml +++ b/internal/indexer/definitions/torrentsyndikat.yaml @@ -71,4 +71,5 @@ irc: - torrentId - tags match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?id={{ .torrentId }}&apikey={{ .api_key }}" diff --git a/internal/indexer/definitions/trancetraffic.yaml b/internal/indexer/definitions/trancetraffic.yaml index e1c7037..e07dca2 100644 --- a/internal/indexer/definitions/trancetraffic.yaml +++ b/internal/indexer/definitions/trancetraffic.yaml @@ -76,6 +76,7 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}" encode: - torrentName diff --git a/internal/indexer/definitions/uhdbits.yaml b/internal/indexer/definitions/uhdbits.yaml index 15e049e..e68c09c 100644 --- a/internal/indexer/definitions/uhdbits.yaml +++ b/internal/indexer/definitions/uhdbits.yaml @@ -78,4 +78,5 @@ irc: - torrentId match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}" diff --git a/internal/indexer/definitions/xspeeds.yaml b/internal/indexer/definitions/xspeeds.yaml index 9ebe185..fad3f99 100644 --- a/internal/indexer/definitions/xspeeds.yaml +++ b/internal/indexer/definitions/xspeeds.yaml @@ -104,4 +104,5 @@ irc: - torrentId match: + infourl: "/details.php?id={{ .torrentId }}" torrenturl: "/download.php?type=rss&secret_key={{ .passkey }}&id={{ .torrentId }}" diff --git a/web/src/components/data-table/Cells.tsx b/web/src/components/data-table/Cells.tsx index dc331c6..458fa78 100644 --- a/web/src/components/data-table/Cells.tsx +++ b/web/src/components/data-table/Cells.tsx @@ -16,6 +16,24 @@ export const AgeCell = ({ value }: CellProps) => ( ); +export const IndexerCell = ({ value }: CellProps) => ( +