Files
middle-server/plugin/MusicHandler.py
2023-02-20 23:02:12 +08:00

16 lines
619 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from ExceptionHandler import *
import plugin.NavidromePlaylistSync.app as navidromePlaylistSync
class MusicHandler(OutboundHandler):
def handle(self, response, headers, status, content, *args, **kwargs):
"""
:param dict request: 请求信息 (初始url, parameters, data, method),可根据需要添加
:return: (request, args, kwargs)
"""
# raise NotImplementedError
print('music handler started')
if status == 200:
navidromePlaylistSync.start()
headers['Transfer-Encoding'] = 'gzip'
return [response, headers, status, content]