whatdaybob / sonarr_youtubedl

A Sonarr companion script to allow the automatic downloading of web series normally not available for Sonarr to search for. Using Youtube-DL it allows you to download your webseries from the list of supported sites.
107 stars 34 forks source link

Is this really the best solution for regexing? #40

Open Deanosim opened 2 years ago

Deanosim commented 2 years ago

I'm trying to download from https://roosterteeth.com/series/rwby but in Sonarr the episode names are like this The Shining Beacon (1) The Shining Beacon (2) and on the site it's The Shining Beacon The Shining Beacon, Pt.2 the best solution I could come up with is

    regex:
      sonarr:
        match: '[A-Z][a-z]* [A-Z][a-z]* [A-Z][a-z]* \(1\)'
        replace: 'The Shining Beacon'
        match: '[A-Z][a-z]* [A-Z][a-z]* [A-Z][a-z]* \(2\)'
        replace: 'The Shining Beacon, Pt.2'
        match: '[A-Z][a-z]* [A-Z][a-z]* [A-Z][a-z]* \(1\)'
        replace: 'The First Step'
        match: '[A-Z][a-z]* [A-Z][a-z]* [A-Z][a-z]* \(2\)'
        replace: 'The First Step, Pt.2'

But it seems like a pain, have to enter the episode name for every episode, tried entering regex in the replace Field and it just printed the regex image