Well, I did a basic integration test to see what needs to be altered in the database, and that is pretty straight forward.
Even though the database tables are massively intertwined, and similar data is stored is several places, there is only one field that needs updating.
Changed title in spots table to: XXX S03E01 H.264 (WEB-DL) DD5.1 1080p -Q o Q-
NZB download from RSS feed: XXX (2016) S03E01 H_264 (WEB-DL) DD5_1 1080p NLSubs -Q o Q-.nzb
This NZB filename is based on the name in the XML in spotsfull (different table).
SABnzbd download name passed by Sonarr: THE 100 S03E01 H.264 (WEB-DL) DD5.1 1080p -Q o Q- (same as title in spots)
Result: Succes, even with obscured filename in subfolders
Sonarr Import result:
Name:
XXX S03E01 H.264 (WEB-DL) DD5.1 1080p -Q o Q-
Source:
…/XXX S03E01 H.264 (WEB-DL)
DD5.1 1080p -Q o Q-/XXX680e2e5d3dd3bc26d5fb15d828f54/XXX828d51bf5d62cb3dd3d5e2e086301.mkv
Imported To:
…/XXX/XXX S03E01 H.264 (WEB-DL) DD5.1
1080p -Q o Q-.mkv
So this shows just altering the title in the spots table will enable RSS handling by Sonarr.
Now on to the harder part, writing a query that doesn’t stall my Synology because the spots table is too big (980,336 rows / 390 MB)
Using a multiple replace for (2014), (2015), and (2016) next to NLSubs, and limiting it to the latest 25 posts should work. Unfortunately the MariaDB version on my Synology does not support regex. Have to give wildcards a go.
Luckilly, now that the basic test is done, I can do the rest in a test database.