itsToggle / plex_debrid

Plex torrent streaming through Debrid Services
1.51k stars 130 forks source link

Character replacing rules, easier matching for titles? Rule 16 ":" not working... #575

Open Friday13th87 opened 1 year ago

Friday13th87 commented 1 year ago

the matching is not working probably. and it seems, that at least one of the default renaming rule is not correctly working? rule number 16 should replace ":" with "" (empty)

for example: Search string: a.silent.voice.the.movie.2016

Findings after (!) version filtering (only some examples):

  1. [Ryuuga].-.A.Silent.Voice.2016.[1080p-DTS-HD.MA.5.1-REMUX]
  2. [Kametsu].A.Silent.Voice.(BD.1080p.HI10.FLAC)
  3. A.Silent.Voice:.The.Movie.2016.1080p.BluRay
  4. A.Silent.Voice:.The.Movie.2016.720p.BluRay

in this case, all 27 found version have been rejected. my interpretation:

  1. & 2. because of the missing "the.movie"
  2. & 4. because there is a ":" in the naming

for 1. and 2. there is no solution most probably and for 3. and 4. the ":" should be replaced by default rule numer 16 - but it is not, and i do not know why.

is there a way to lift the deviation rules to make such titles match? why is the ":" not replaced in this case?

Friday13th87 commented 1 year ago

Replacement of " ! " seems not working as well.

[06/11/23 12:20:14] matching item: 'eat.wheaties.2020' of service 'content.services.trakt' to service 'content.services.plex'
[06/11/23 12:20:14] set release bitrate using total movie duration: 01h:28m
[06/11/23 12:20:14] 1)  title: Eat.Wheaties.2020.1080p.BluRay.H264.AAC-LAMA      | size: 1.7  | bitrate: 3.22 | cached:    | seeders: 1 | files: +0/-0 | source: [torrentio: ThePirateBay]
[06/11/23 12:20:14] 2)  title: Eat.Wheaties!.2020.1080p.BluRay                   | size: 1.77 | bitrate: 3.35 | cached: RD | seeders: 3 | files: +1/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 3)  title: Eat.Wheaties!.2021.1080p.WEBRip                   | size: 1.76 | bitrate: 3.34 | cached: RD | seeders: 2 | files: +1/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 4)  title: Eat.Wheaties!.2020.720p.BluRay                    | size: 0.82 | bitrate: 1.56 | cached:    | seeders: 1 | files: +0/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 5)  title: Eat.Wheaties.2021.720p.WEBRip.800MB.x264-GalaxyRG | size: 0.8  | bitrate: 1.51 | cached:    | seeders: 2 | files: +0/-0 | source: [torrentio: TorrentGalaxy]
[06/11/23 12:20:14] 6)  title: Eat.Wheaties.2020.1080p.BluRay.H264.AAC-LAMA      | size: 1.7  | bitrate: 3.22 | cached:    | seeders: 1 | files: +0/-0 | source: [torrentio: ThePirateBay]
[06/11/23 12:20:14] 7)  title: Eat.Wheaties!.2020.1080p.BluRay                   | size: 1.77 | bitrate: 3.35 | cached: RD | seeders: 3 | files: +1/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 8)  title: Eat.Wheaties!.2021.1080p.WEBRip                   | size: 1.76 | bitrate: 3.34 | cached: RD | seeders: 2 | files: +1/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 9)  title: Eat.Wheaties!.2020.720p.BluRay                    | size: 0.82 | bitrate: 1.56 | cached:    | seeders: 1 | files: +0/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 10) title: Eat.Wheaties.2021.720p.WEBRip.800MB.x264-GalaxyRG | size: 0.8  | bitrate: 1.51 | cached:    | seeders: 2 | files: +0/-0 | source: [torrentio: TorrentGalaxy]
[06/11/23 12:20:14] sorting releases for version [1080p SDR] ... done - found 10 releases
[06/11/23 12:20:14] 1)  title: Eat.Wheaties!.2020.1080p.BluRay                   | size: 1.77 | bitrate: 3.35 | cached: RD | seeders: 3 | files: +1/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 2)  title: Eat.Wheaties!.2020.1080p.BluRay                   | size: 1.77 | bitrate: 3.35 | cached: RD | seeders: 3 | files: +1/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 3)  title: Eat.Wheaties!.2021.1080p.WEBRip                   | size: 1.76 | bitrate: 3.34 | cached: RD | seeders: 2 | files: +1/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 4)  title: Eat.Wheaties!.2021.1080p.WEBRip                   | size: 1.76 | bitrate: 3.34 | cached: RD | seeders: 2 | files: +1/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 5)  title: Eat.Wheaties.2020.1080p.BluRay.H264.AAC-LAMA      | size: 1.7  | bitrate: 3.22 | cached:    | seeders: 1 | files: +0/-0 | source: [torrentio: ThePirateBay]
[06/11/23 12:20:14] 6)  title: Eat.Wheaties.2020.1080p.BluRay.H264.AAC-LAMA      | size: 1.7  | bitrate: 3.22 | cached:    | seeders: 1 | files: +0/-0 | source: [torrentio: ThePirateBay]
[06/11/23 12:20:14] 7)  title: Eat.Wheaties.2021.720p.WEBRip.800MB.x264-GalaxyRG | size: 0.8  | bitrate: 1.51 | cached:    | seeders: 2 | files: +0/-0 | source: [torrentio: TorrentGalaxy]
[06/11/23 12:20:14] 8)  title: Eat.Wheaties.2021.720p.WEBRip.800MB.x264-GalaxyRG | size: 0.8  | bitrate: 1.51 | cached:    | seeders: 2 | files: +0/-0 | source: [torrentio: TorrentGalaxy]
[06/11/23 12:20:14] 9)  title: Eat.Wheaties!.2020.720p.BluRay                    | size: 0.82 | bitrate: 1.56 | cached:    | seeders: 1 | files: +0/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] 10) title: Eat.Wheaties!.2020.720p.BluRay                    | size: 0.82 | bitrate: 1.56 | cached:    | seeders: 1 | files: +0/-0 | source: [torrentio: YTS]
[06/11/23 12:20:14] [realdebrid] error: rejecting release: "Eat.Wheaties!.2020.1080p.BluRay" because it doesnt match the allowed deviation
[06/11/23 12:20:14] [realdebrid] error: rejecting release: "Eat.Wheaties!.2020.1080p.BluRay" because it doesnt match the allowed deviation
[06/11/23 12:20:14] [realdebrid] error: rejecting release: "Eat.Wheaties!.2021.1080p.WEBRip" because it doesnt match the allowed deviation

the rules:

Choose an action: 1

0) Back
1) Add rule
2) Edit rules

Choose an action: 2

0) Back
1) Edit rule 1: ['&', 'and']
2) Edit rule 2: ['ü', 'ue']
3) Edit rule 3: ['ä', 'ae']
4) Edit rule 4: ['â', 'a']
5) Edit rule 5: ['á', 'a']
6) Edit rule 6: ['à', 'a']
7) Edit rule 7: ['ö', 'oe']
8) Edit rule 8: ['ô', 'o']
9) Edit rule 9: ['ß', 'ss']
10) Edit rule 10: ['é', 'e']
11) Edit rule 11: ['è', 'e']
12) Edit rule 12: ['î', 'i']
13) Edit rule 13: ['sh!t', 'shit']
14) Edit rule 14: ['f**k', 'fuck']
15) Edit rule 15: ['f**king', 'fucking']
16) Edit rule 16: [':', '']
17) Edit rule 17: ['(', '']
18) Edit rule 18: [')', '']
19) Edit rule 19: ['`', '']
20) Edit rule 20: ['´', '']
21) Edit rule 21: [',', '']
22) Edit rule 22: ['!', '']
23) Edit rule 23: ['?', '']
24) Edit rule 24: [' - ', ' ']
25) Edit rule 25: ["'", '']
26) Edit rule 26: ['\u200b', '']
27) Edit rule 27: ['*', '']
28) Edit rule 28: [' ', '.']
29) Edit rule 29: [':.', '.']
30) Edit rule 30: ['..', '.']

Rule 1 to 28 are default rules. i added 29 and 30 because the replacement of ":" (rule 16) is not working.

As i saw "(" and ")" as well as "," in the titles, i think that the replacement with an empty string '' is not working. thats why i replace those stuff with a dot '.' and replace two dots with a single one '..' --> '.' so basically '!.' --> '..' --> '.' i will check if this is actually working.

Edit: It seems that only the search string itself get replaced with those rules. the founded releases from the indexers on the other hand are staying as they are.

scraping sources [torrentio] for query "charlie.brown.s.all-stars..1966" the ' was replaced by a dot. the ! was replaced by a dot, the two dots havent been replaced by a single one. [realdebrid] error: rejecting release: "Charlie.Brown's.All.Stars!.1966.1080p.WEBRip" because it doesnt match the allowed deviation nothing got replaced here.

its not working.

sirstudly commented 7 months ago

The special character replacement occurs on the film/show title (taken from the plex metadata) - not the scraped release title.

You can try using the following rules:

1) Edit rule 1: ['&', 'and']
2) Edit rule 2: ['ü', 'ue']
3) Edit rule 3: ['ä', 'ae']
4) Edit rule 4: ['â', 'a']
5) Edit rule 5: ['á', 'a']
6) Edit rule 6: ['à', 'a']
7) Edit rule 7: ['ö', 'oe']
8) Edit rule 8: ['ô', 'o']
9) Edit rule 9: ['ß', 'ss']
10) Edit rule 10: ['é', 'e']
11) Edit rule 11: ['è', 'e']
12) Edit rule 12: ['î', 'i']
13) Edit rule 13: ['sh!t', 'shit']
14) Edit rule 14: ['f**k', 'fuck']
15) Edit rule 15: ['f**king', 'fucking']
16) Edit rule 16: ['?', '']
17) Edit rule 17: [':', '.?']
18) Edit rule 18: ['(', '']
19) Edit rule 19: [')', '']
20) Edit rule 20: ['`', '']
21) Edit rule 21: ['´', '']
22) Edit rule 22: [',', '']
23) Edit rule 23: ['!', '.?']
24) Edit rule 24: [' - ', ' ']
25) Edit rule 25: ["'", '.?']
26) Edit rule 26: ['\u200b', '']
27) Edit rule 27: ['*', '']
28) Edit rule 28: [' ', '.']

Note that the rules are applied in order. For that reason, I've moved rule 23 (the question mark) up to rule 16 because it's a special regex character which we'll be using for .... rules 17,23,25. In brief, if we encounter a colon (:), exclamation (!) or single quote (') character in the title, attempt to match it with 0 or 1 characters (the .? matches any character or none at all). All the other rules remain unchanged from the default.

So for the deviation regex for your example with these rules applied becomes [^A-Za-z0-9]*((charlie.brown.?s.all.stars.?):?.)\(?\[?(1966|1965|1967) and the string being matched is the unedited release title: Charlie.Brown's.All.Stars!.1966.1080p.WEBRip

image