Commit a22b5193 authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/10.0.51'

parents b6ce758e c5aaa9a9
This diff is collapsed.
.\protoc.exe --proto_path=.\protos --python_out=.\sickrage\core\amqp\protos .\protos\*
\ No newline at end of file
{
"name": "sickrage",
"version": "10.0.50",
"version": "10.0.51",
"private": true,
"repository": {
"type": "git",
......
File added
......@@ -4,5 +4,5 @@ package app.protobufs.v1;
message SavedSearchProviderUrlResponse {
string provider_id = 1;
string provider_urls = 2;
string provider_url = 2;
}
[bumpversion]
current_version = 10.0.50
current_version = 10.0.51
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
......
......@@ -19,7 +19,7 @@
# along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>.
# ##############################################################################
__version__ = "10.0.50"
__version__ = "10.0.51"
__install_type__ = ""
import argparse
......
This diff is collapsed.
......@@ -25,11 +25,11 @@ from tornado.ioloop import IOLoop
import sickrage
from sickrage.core.amqp import AMQPBase
from sickrage.protos.announcement_v1_pb2 import CreatedAnnouncementResponse, DeletedAnnouncementResponse
from sickrage.protos.network_timezone_v1_pb2 import SavedNetworkTimezoneResponse, DeletedNetworkTimezoneResponse
from sickrage.protos.search_provider_url_v1_pb2 import SavedSearchProviderUrlResponse
from sickrage.protos.server_certificate_v1_pb2 import SavedServerCertificateResponse
from sickrage.protos.updates_v1_pb2 import UpdatedAppResponse
from sickrage.core.amqp.protos.announcement_v1_pb2 import CreatedAnnouncementResponse, DeletedAnnouncementResponse
from sickrage.core.amqp.protos.network_timezone_v1_pb2 import SavedNetworkTimezoneResponse, DeletedNetworkTimezoneResponse
from sickrage.core.amqp.protos.search_provider_url_v1_pb2 import SavedSearchProviderUrlResponse
from sickrage.core.amqp.protos.server_certificate_v1_pb2 import SavedServerCertificateResponse
from sickrage.core.amqp.protos.updates_v1_pb2 import UpdatedAppResponse
class AMQPConsumer(AMQPBase):
......
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: announcement_v1.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x61nnouncement_v1.proto\x12\x10\x61pp.protobufs.v1\"m\n\x1b\x43reatedAnnouncementResponse\x12\r\n\x05\x61hash\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\r\n\x05image\x18\x04 \x01(\t\x12\x0c\n\x04\x64\x61te\x18\x05 \x01(\t\",\n\x1b\x44\x65letedAnnouncementResponse\x12\r\n\x05\x61hash\x18\x01 \x01(\tb\x06proto3')
_CREATEDANNOUNCEMENTRESPONSE = DESCRIPTOR.message_types_by_name['CreatedAnnouncementResponse']
_DELETEDANNOUNCEMENTRESPONSE = DESCRIPTOR.message_types_by_name['DeletedAnnouncementResponse']
CreatedAnnouncementResponse = _reflection.GeneratedProtocolMessageType('CreatedAnnouncementResponse', (_message.Message,), {
'DESCRIPTOR' : _CREATEDANNOUNCEMENTRESPONSE,
'__module__' : 'announcement_v1_pb2'
# @@protoc_insertion_point(class_scope:app.protobufs.v1.CreatedAnnouncementResponse)
})
_sym_db.RegisterMessage(CreatedAnnouncementResponse)
DeletedAnnouncementResponse = _reflection.GeneratedProtocolMessageType('DeletedAnnouncementResponse', (_message.Message,), {
'DESCRIPTOR' : _DELETEDANNOUNCEMENTRESPONSE,
'__module__' : 'announcement_v1_pb2'
# @@protoc_insertion_point(class_scope:app.protobufs.v1.DeletedAnnouncementResponse)
})
_sym_db.RegisterMessage(DeletedAnnouncementResponse)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_CREATEDANNOUNCEMENTRESPONSE._serialized_start=43
_CREATEDANNOUNCEMENTRESPONSE._serialized_end=152
_DELETEDANNOUNCEMENTRESPONSE._serialized_start=154
_DELETEDANNOUNCEMENTRESPONSE._serialized_end=198
# @@protoc_insertion_point(module_scope)
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: network_timezone_v1.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19network_timezone_v1.proto\x12\x10\x61pp.protobufs.v1\"A\n\x1cSavedNetworkTimezoneResponse\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x10\n\x08timezone\x18\x02 \x01(\t\"1\n\x1e\x44\x65letedNetworkTimezoneResponse\x12\x0f\n\x07network\x18\x01 \x01(\tb\x06proto3')
_SAVEDNETWORKTIMEZONERESPONSE = DESCRIPTOR.message_types_by_name['SavedNetworkTimezoneResponse']
_DELETEDNETWORKTIMEZONERESPONSE = DESCRIPTOR.message_types_by_name['DeletedNetworkTimezoneResponse']
SavedNetworkTimezoneResponse = _reflection.GeneratedProtocolMessageType('SavedNetworkTimezoneResponse', (_message.Message,), {
'DESCRIPTOR' : _SAVEDNETWORKTIMEZONERESPONSE,
'__module__' : 'network_timezone_v1_pb2'
# @@protoc_insertion_point(class_scope:app.protobufs.v1.SavedNetworkTimezoneResponse)
})
_sym_db.RegisterMessage(SavedNetworkTimezoneResponse)
DeletedNetworkTimezoneResponse = _reflection.GeneratedProtocolMessageType('DeletedNetworkTimezoneResponse', (_message.Message,), {
'DESCRIPTOR' : _DELETEDNETWORKTIMEZONERESPONSE,
'__module__' : 'network_timezone_v1_pb2'
# @@protoc_insertion_point(class_scope:app.protobufs.v1.DeletedNetworkTimezoneResponse)
})
_sym_db.RegisterMessage(DeletedNetworkTimezoneResponse)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_SAVEDNETWORKTIMEZONERESPONSE._serialized_start=47
_SAVEDNETWORKTIMEZONERESPONSE._serialized_end=112
_DELETEDNETWORKTIMEZONERESPONSE._serialized_start=114
_DELETEDNETWORKTIMEZONERESPONSE._serialized_end=163
# @@protoc_insertion_point(module_scope)
......@@ -3,6 +3,7 @@
# source: search_provider_url_v1.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
......@@ -13,59 +14,11 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='search_provider_url_v1.proto',
package='app.protobufs.v1',
syntax='proto3',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x1csearch_provider_url_v1.proto\x12\x10\x61pp.protobufs.v1\"L\n\x1eSavedSearchProviderUrlResponse\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x15\n\rprovider_urls\x18\x02 \x01(\tb\x06proto3'
)
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1csearch_provider_url_v1.proto\x12\x10\x61pp.protobufs.v1\"K\n\x1eSavedSearchProviderUrlResponse\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x14\n\x0cprovider_url\x18\x02 \x01(\tb\x06proto3')
_SAVEDSEARCHPROVIDERURLRESPONSE = _descriptor.Descriptor(
name='SavedSearchProviderUrlResponse',
full_name='app.protobufs.v1.SavedSearchProviderUrlResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='provider_id', full_name='app.protobufs.v1.SavedSearchProviderUrlResponse.provider_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='provider_urls', full_name='app.protobufs.v1.SavedSearchProviderUrlResponse.provider_urls', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=50,
serialized_end=126,
)
DESCRIPTOR.message_types_by_name['SavedSearchProviderUrlResponse'] = _SAVEDSEARCHPROVIDERURLRESPONSE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_SAVEDSEARCHPROVIDERURLRESPONSE = DESCRIPTOR.message_types_by_name['SavedSearchProviderUrlResponse']
SavedSearchProviderUrlResponse = _reflection.GeneratedProtocolMessageType('SavedSearchProviderUrlResponse', (_message.Message,), {
'DESCRIPTOR' : _SAVEDSEARCHPROVIDERURLRESPONSE,
'__module__' : 'search_provider_url_v1_pb2'
......@@ -73,5 +26,9 @@ SavedSearchProviderUrlResponse = _reflection.GeneratedProtocolMessageType('Saved
})
_sym_db.RegisterMessage(SavedSearchProviderUrlResponse)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_SAVEDSEARCHPROVIDERURLRESPONSE._serialized_start=50
_SAVEDSEARCHPROVIDERURLRESPONSE._serialized_end=125
# @@protoc_insertion_point(module_scope)
......@@ -3,6 +3,7 @@
# source: server_certificate_v1.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
......@@ -13,59 +14,11 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='server_certificate_v1.proto',
package='app.protobufs.v1',
syntax='proto3',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x1bserver_certificate_v1.proto\x12\x10\x61pp.protobufs.v1\"J\n\x1eSavedServerCertificateResponse\x12\x13\n\x0b\x63\x65rtificate\x18\x01 \x01(\t\x12\x13\n\x0bprivate_key\x18\x02 \x01(\tb\x06proto3'
)
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bserver_certificate_v1.proto\x12\x10\x61pp.protobufs.v1\"J\n\x1eSavedServerCertificateResponse\x12\x13\n\x0b\x63\x65rtificate\x18\x01 \x01(\t\x12\x13\n\x0bprivate_key\x18\x02 \x01(\tb\x06proto3')
_SAVEDSERVERCERTIFICATERESPONSE = _descriptor.Descriptor(
name='SavedServerCertificateResponse',
full_name='app.protobufs.v1.SavedServerCertificateResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='certificate', full_name='app.protobufs.v1.SavedServerCertificateResponse.certificate', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='private_key', full_name='app.protobufs.v1.SavedServerCertificateResponse.private_key', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=49,
serialized_end=123,
)
DESCRIPTOR.message_types_by_name['SavedServerCertificateResponse'] = _SAVEDSERVERCERTIFICATERESPONSE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_SAVEDSERVERCERTIFICATERESPONSE = DESCRIPTOR.message_types_by_name['SavedServerCertificateResponse']
SavedServerCertificateResponse = _reflection.GeneratedProtocolMessageType('SavedServerCertificateResponse', (_message.Message,), {
'DESCRIPTOR' : _SAVEDSERVERCERTIFICATERESPONSE,
'__module__' : 'server_certificate_v1_pb2'
......@@ -73,5 +26,9 @@ SavedServerCertificateResponse = _reflection.GeneratedProtocolMessageType('Saved
})
_sym_db.RegisterMessage(SavedServerCertificateResponse)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_SAVEDSERVERCERTIFICATERESPONSE._serialized_start=49
_SAVEDSERVERCERTIFICATERESPONSE._serialized_end=123
# @@protoc_insertion_point(module_scope)
......@@ -3,6 +3,7 @@
# source: updates_v1.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
......@@ -13,52 +14,11 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='updates_v1.proto',
package='app.protobufs.v1',
syntax='proto3',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x10updates_v1.proto\x12\x10\x61pp.protobufs.v1\"#\n\x12UpdatedAppResponse\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x62\x06proto3'
)
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10updates_v1.proto\x12\x10\x61pp.protobufs.v1\"#\n\x12UpdatedAppResponse\x12\r\n\x05\x66orce\x18\x01 \x01(\x08\x62\x06proto3')
_UPDATEDAPPRESPONSE = _descriptor.Descriptor(
name='UpdatedAppResponse',
full_name='app.protobufs.v1.UpdatedAppResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='force', full_name='app.protobufs.v1.UpdatedAppResponse.force', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=38,
serialized_end=73,
)
DESCRIPTOR.message_types_by_name['UpdatedAppResponse'] = _UPDATEDAPPRESPONSE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_UPDATEDAPPRESPONSE = DESCRIPTOR.message_types_by_name['UpdatedAppResponse']
UpdatedAppResponse = _reflection.GeneratedProtocolMessageType('UpdatedAppResponse', (_message.Message,), {
'DESCRIPTOR' : _UPDATEDAPPRESPONSE,
'__module__' : 'updates_v1_pb2'
......@@ -66,5 +26,9 @@ UpdatedAppResponse = _reflection.GeneratedProtocolMessageType('UpdatedAppRespons
})
_sym_db.RegisterMessage(UpdatedAppResponse)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_UPDATEDAPPRESPONSE._serialized_start=38
_UPDATEDAPPRESPONSE._serialized_end=73
# @@protoc_insertion_point(module_scope)
......@@ -343,8 +343,8 @@ class API(object):
def __init__(self, api):
self.api = api
def get_urls(self, provider):
endpoint = f'provider/{provider}/urls'
def get_url(self, provider):
endpoint = f'provider/{provider}/url'
return self.api.request('GET', endpoint)
def get_status(self, provider):
......
......@@ -529,7 +529,7 @@ class Config(object):
search_provider = self.db.session().query(self.db.SearchProvidersTorrentRss).filter_by(provider_id=_search_provider_id).one()
search_provider.name = sickrage.app.search_providers.all()[search_provider.provider_id].name
search_provider.url = sickrage.app.search_providers.all()[search_provider.provider_id].urls['base_url']
search_provider.url = sickrage.app.search_providers.all()[search_provider.provider_id].url
search_provider.title_tag = sickrage.app.search_providers.all()[search_provider.provider_id].titleTAG
elif _search_provider.provider_type == SearchProviderType.NEWZNAB:
try:
......@@ -545,7 +545,7 @@ class Config(object):
search_provider = self.db.session().query(self.db.SearchProvidersNewznab).filter_by(provider_id=_search_provider_id).one()
search_provider.name = sickrage.app.search_providers.all()[search_provider.provider_id].name
search_provider.url = sickrage.app.search_providers.all()[search_provider.provider_id].urls['base_url']
search_provider.url = sickrage.app.search_providers.all()[search_provider.provider_id].url
search_provider.api_key = sickrage.app.search_providers.all()[search_provider.provider_id].api_key
search_provider.cat_ids = sickrage.app.search_providers.all()[search_provider.provider_id].catIDs
......
......@@ -47,7 +47,7 @@ class UsersSchema(SQLAlchemyAutoSchema):
class GeneralSchema(SQLAlchemyAutoSchema):
proper_searcher_interval = EnumField(CheckPropersInterval)
nzb_method = EnumField(NzbMethod)
series_provider_default = EnumField(SeriesProviderID)
series_provider_default = EnumField(SeriesProviderID, by_value=True)
process_method = EnumField(ProcessMethod)
file_timestamp_timezone = EnumField(FileTimestampTimezone)
cpu_preset = EnumField(CpuPreset)
......
......@@ -30,26 +30,10 @@ class SeriesProviderID(enum.Enum):
self.THETVDB.name: 'TheTVDB'
}
@property
def _slug_strings(self):
return {
self.THETVDB.name: 'thetvdb'
}
@property
def display_name(self):
return self._strings[self.name]
@property
def slug(self):
return self._slug_strings[self.name]
@classmethod
def by_slug(cls, value):
for item in cls:
if item.slug == value:
return item
class DefaultHomePage(enum.Enum):
HOME = 'home'
......
......@@ -123,7 +123,7 @@ class Logger(logging.getLoggerClass()):
if search_provider.provider_type in [SearchProviderType.NZB, SearchProviderType.NEWZNAB]:
items.append(search_provider.api_key)
elif search_provider.provider_type == SearchProviderType.TORRENT_RSS and not search_provider.default:
items.append(search_provider.urls['base_url'])
items.append(search_provider.url)
items.append(search_provider.cookies)
......
......@@ -213,19 +213,21 @@ class ShowTask(Task):
def run(self):
show_obj = find_show(self.series_id, self.series_provider_id)
if show_obj:
WebSocketMessage('SHOW_QUEUE_STATUS_UPDATED', {'seriesSlug': show_obj.slug, 'showQueueStatus': show_obj.show_queue_status}).push()
else:
WebSocketMessage('SHOW_QUEUE_STATUS_UPDATED',
{'seriesSlug': f'{self.series_id}-{self.series_provider_id.slug}', 'action': self.action.name}).push()
{'seriesSlug': f'{self.series_id}-{self.series_provider_id.value}', 'action': self.action.name}).push()
def finish(self):
show_obj = find_show(self.series_id, self.series_provider_id)
if show_obj:
WebSocketMessage('SHOW_QUEUE_STATUS_UPDATED', {'seriesSlug': show_obj.slug, 'showQueueStatus': show_obj.show_queue_status}).push()
else:
WebSocketMessage('SHOW_QUEUE_STATUS_UPDATED',
{'seriesSlug': f'{self.series_id}-{self.series_provider_id.slug}', 'action': self.action.name}).push()
{'seriesSlug': f'{self.series_id}-{self.series_provider_id.value}', 'action': self.action.name}).push()
class ShowTaskAdd(ShowTask):
......@@ -441,7 +443,7 @@ class ShowTaskAdd(ShowTask):
sickrage.app.show_queue.remove_show(self.series_id, self.series_provider_id)
except CantRemoveShowException:
WebSocketMessage('SHOW_REMOVED',
{'seriesSlug': f'{self.series_id}-{self.series_provider_id.slug}'}).push()
{'seriesSlug': f'{self.series_id}-{self.series_provider_id.value}'}).push()
class ShowTaskRefresh(ShowTask):
......@@ -631,6 +633,8 @@ class ShowTaskForceRemove(ShowTask):
super(ShowTaskForceRemove, self).run()
show_obj = find_show(self.series_id, self.series_provider_id)
if not show_obj:
return
sickrage.app.log.info("Removing show: {}".format(show_obj.name))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment