cross-seed icon indicating copy to clipboard operation
cross-seed copied to clipboard

cross-seed is sending double-urlencoded search strings to Prowlarr

Open sjtuross opened this issue 2 years ago • 4 comments

Currently non-Latin characters in torrent name is got encoded and then sent to indexers as search term. So no torrents can be matched.

For example, these Chinese characters 蜘蛛侠:平行宇宙 are encoded to %E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99 as part of the search term as shown in the cross-seed log and prowlarr log.

Is there a way to send the original term or the decoded version?

cross-seed log

2022-06-04 20:33:05 [36mverbose[39m: [server] POST /api/webhook
2022-06-04 20:33:05 [32minfo[39m: [server] Received search request: { infoHash: 'cb70eea5b7f3de377b77f8da33ffec071e485404' }
2022-06-04 20:33:05 [36mverbose[39m: [torznab] https://prowlarr.example.com/3/api?apikey=[REDACTED]&t=search&q=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018
2022-06-04 20:33:05 [36mverbose[39m: [torznab] https://prowlarr.example.com/5/api?apikey=[REDACTED]&t=search&q=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018
2022-06-04 20:33:05 [36mverbose[39m: [torznab] https://prowlarr.example.com/6/api?apikey=[REDACTED]&t=search&q=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018
2022-06-04 20:33:05 [36mverbose[39m: [torznab] https://prowlarr.example.com/9/api?apikey=[REDACTED]&t=search&q=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018
2022-06-04 20:33:05 [36mverbose[39m: [torznab] https://prowlarr.example.com/12/api?apikey=[REDACTED]&t=search&q=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018
2022-06-04 20:33:05 [36mverbose[39m: [torznab] https://prowlarr.example.com/13/api?apikey=[REDACTED]&t=search&q=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018
2022-06-04 20:33:05 [36mverbose[39m: [torznab] https://prowlarr.example.com/14/api?apikey=[REDACTED]&t=search&q=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018
2022-06-04 20:34:13 [32minfo[39m: [server] Found 0 torrents for { infoHash: 'cb70eea5b7f3de377b77f8da33ffec071e485404' }

prowlarr log

2022-06-04 20:32:43.9|Info|ReleaseSearchService|Searching indexer(s): [] for Term: [%E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99 Spider Man Into The Spider Verse 2018], Offset: 0, Limit: 0, Categories: []
2022-06-04 20:32:43.9|Info|ReleaseSearchService|Searching indexer(s): [ToTheGloryCookie] for Term: [%E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99 Spider Man Into The Spider Verse 2018], Offset: 0, Limit: 0, Categories: []
2022-06-04 20:32:43.9|Info|Cardigann|Adding request: https://totheglory.im/browse.php?search_field=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018&c=M
2022-06-04 20:32:43.9|Info|ReleaseSearchService|Searching indexer(s): [] for Term: [%E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99 Spider Man Into The Spider Verse 2018], Offset: 0, Limit: 0, Categories: []
2022-06-04 20:32:43.9|Info|ReleaseSearchService|Searching indexer(s): [HDChina] for Term: [%E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99 Spider Man Into The Spider Verse 2018], Offset: 0, Limit: 0, Categories: []
2022-06-04 20:32:43.9|Info|ReleaseSearchService|Searching indexer(s): [] for Term: [%E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99 Spider Man Into The Spider Verse 2018], Offset: 0, Limit: 0, Categories: []
2022-06-04 20:32:43.9|Info|ReleaseSearchService|Searching indexer(s): [] for Term: [%E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99 Spider Man Into The Spider Verse 2018], Offset: 0, Limit: 0, Categories: []
2022-06-04 20:32:43.9|Info|Cardigann|Adding request: https://hdchina.org/torrents.php?search=%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018&incldead=0&spstate=0&search_area=0&search_mode=0
2022-06-04 20:32:43.9|Info|ReleaseSearchService|Searching indexer(s): [] for Term: [%E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99 Spider Man Into The Spider Verse 2018], Offset: 0, Limit: 0, Categories: []

sjtuross avatar Jun 04 '22 13:06 sjtuross

@bakerboy I would have thought that URL encoding the search term is spec-compliant?

mmgoodnow avatar Jun 16 '22 06:06 mmgoodnow

@Qstick?

bakerboy448 avatar Jun 16 '22 07:06 bakerboy448

seems to be double encoded on cross-seeds end

image

bakerboy448 avatar Jul 24 '22 16:07 bakerboy448

ok i see as well:

> const str = "%25E8%259C%2598%25E8%259B%259B%25E4%25BE%25A0%25EF%25BC%259A%25E5%25B9%25B3%25E8%25A1%258C%25E5%25AE%2587%25E5%25AE%2599+Spider+Man+Into+The+Spider+Verse+2018"

> decodeURIComponent(str)
'%E8%9C%98%E8%9B%9B%E4%BE%A0%EF%BC%9A%E5%B9%B3%E8%A1%8C%E5%AE%87%E5%AE%99+Spider+Man+Into+The+Spider+Verse+2018'

> decodeURIComponent(decodeURIComponent(str))
'蜘蛛侠:平行宇宙+Spider+Man+Into+The+Spider+Verse+2018'

mmgoodnow avatar Jul 24 '22 16:07 mmgoodnow

v4.3.3

mmgoodnow avatar Aug 22 '22 04:08 mmgoodnow