diff --git a/CHANGES.md b/CHANGES.md index 808c1466..de75eaeb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ * Change requirements for pure py3 * Change codebase cleanups * Change improve perf by using generators with `any` +* Change deprecate processEpisode used by nzbToMedia to advise how to configure API instead [develop changelog] diff --git a/gui/slick/interfaces/default/inc_top.tmpl b/gui/slick/interfaces/default/inc_top.tmpl index 11f1e410..61a92afd 100644 --- a/gui/slick/interfaces/default/inc_top.tmpl +++ b/gui/slick/interfaces/default/inc_top.tmpl @@ -395,6 +395,13 @@ #end if ## +#if $sickgear.MEMCACHE.get('DEPRECATE_PP_LEGACY') +
+

Mar 2020: The `nzbToMedia` script began using the secure API to process media

+

Mar 2023: To remove this red box, please follow this guidance

+
+#end if +## #set $items = [] #try #set void = $items.append($topmenu) diff --git a/sickgear/webserve.py b/sickgear/webserve.py index 82cf7697..dbf0e7cc 100644 --- a/sickgear/webserve.py +++ b/sickgear/webserve.py @@ -3932,16 +3932,13 @@ class HomeProcessMedia(Home): return self._generic_message('Postprocessing results', f'
{result}
') # noinspection PyPep8Naming - def processEpisode(self, dir_name=None, nzb_name=None, process_type=None, **kwargs): - """ legacy function name, stubbed but can _not_ be removed as this - is potentially used in pp scripts located outside of SG path (need to verify this) + @staticmethod + def processEpisode(**kwargs): + """ legacy function name, stubbed and will be removed """ - kwargs['dir_name'] = dir_name or kwargs.pop('dir', None) - kwargs['nzb_name'] = nzb_name or kwargs.pop('nzbName', None) - kwargs['process_type'] = process_type or kwargs.pop('type', 'auto') - kwargs['pp_version'] = kwargs.pop('ppVersion', '0') - return self.process_files(**kwargs) - + logger.error('This endpoint is no longer to be used,' + ' nzbToMedia users please follow: https://github.com/SickGear/SickGear/wiki/FAQ-nzbToMedia') + sickgear.MEMCACHE['DEPRECATE_PP_LEGACY'] = True class AddShows(Home): diff --git a/sickgear/webserveInit.py b/sickgear/webserveInit.py index 98e32d16..c03d6258 100644 --- a/sickgear/webserveInit.py +++ b/sickgear/webserveInit.py @@ -216,7 +216,6 @@ class WebServer(threading.Thread): # ---------------------------------------------------------------------------------------------------------- # legacy deprecated Aug 2019 - NEVER remove as used in external scripts (r'%s/home/postprocess(/?.*)' % self.options['web_root'], webserve.HomeProcessMedia), - (r'%s(/?update_watched_state_kodi/?)' % self.options['web_root'], webserve.NoXSRFHandler), # regular catchall routes - keep here at the bottom (r'%s/home(/?.*)' % self.options['web_root'], webserve.Home), (r'%s/manage/(/?.*)' % self.options['web_root'], webserve.Manage),