debridmediamanager / zurg-testing

A self-hosted Real-Debrid webdav server you can use with Infuse. Together with rclone it can mount your Real-Debrid torrent library into your filesystem and load it to Plex or Jellyfin.
498 stars 39 forks source link

Better regex for determining shows #115

Open danieljin opened 4 months ago

danieljin commented 4 months ago

Feature Description Change logic for detecting tv shows in config.xml

Problem and Motivation Regex for shows is lacking as it does handle certain naming conventions.

Possible Solution Fix the logic for has_episodes, to match more cases of episode names, even when they aren't in sequence.

Additional Context I am coming from rclone_rd, which handled categorizing shows/movies well. Some non-English shows use different formats. Sometimes torrents are one per episode, not all in one torrent.

The regex rclone_rd used was as follows:

Shows: (?i)(S[0-9]{2}|SEASON|COMPLETE|[^457a-z\W\s]-[0-9]+) Movies: (?i)(19|20)([0-9]{2} ?\.?)

Everything else would be categorized in folder called default. This logic can be found here.

skeisdv2 commented 4 months ago

Dont forget to add slashes ( / ) on both ends

yowmamasita commented 4 months ago

@skeisdv2 Go's regex uses that format