Commit 55026bae authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/10.0.32'

parents c949eda3 27ee677e
...@@ -2,8 +2,15 @@ ...@@ -2,8 +2,15 @@
   
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
   
#### [10.0.32](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.31...10.0.32)
- fixed issue with network timezones and search provider urls not being updated on first use of app [`ca8aaef`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/ca8aaefdd124fd4dc76e596c89ef8c8325ae3504)
- fixed issue with network timezones and search provider urls not being updated on first use of app [`c1ec8ce`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/c1ec8ce1757759c8622548a3f2c0970d81ee4053)
#### [10.0.31](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.30...10.0.31) #### [10.0.31](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.30...10.0.31)
   
> 9 August 2021
- renamed newznab `key` param to `api_key` [`a5a271b`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/a5a271b8e523fef61e5d07d9840b5921910e28d1) - renamed newznab `key` param to `api_key` [`a5a271b`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/a5a271b8e523fef61e5d07d9840b5921910e28d1)
   
#### [10.0.30](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.29...10.0.30) #### [10.0.30](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.29...10.0.30)
......
{ {
"name": "sickrage", "name": "sickrage",
"version": "10.0.31", "version": "10.0.32",
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
......
[bumpversion] [bumpversion]
current_version = 10.0.31 current_version = 10.0.32
commit = False commit = False
tag = False tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))? parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
# along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>. # along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>.
# ############################################################################## # ##############################################################################
__version__ = "10.0.31" __version__ = "10.0.32"
__install_type__ = "" __install_type__ = ""
import argparse import argparse
......
This diff is collapsed.
...@@ -6,7 +6,6 @@ Create Date: 2017-12-29 14:39:27.854291 ...@@ -6,7 +6,6 @@ Create Date: 2017-12-29 14:39:27.854291
""" """
from alembic import op from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision = '3' revision = '3'
...@@ -14,15 +13,6 @@ down_revision = '2' ...@@ -14,15 +13,6 @@ down_revision = '2'
def upgrade(): def upgrade():
conn = op.get_bind()
meta = sa.MetaData(bind=conn)
search_providers_newznab = sa.Table('search_providers_newznab', meta, autoload=True)
with op.get_context().begin_transaction():
for row in conn.execute(search_providers_newznab.select()):
if row.key:
conn.execute(f'UPDATE search_providers_newznab SET api_key = "{row.key}" WHERE search_providers_newznab.id = {row.id}')
with op.batch_alter_table('search_providers_newznab') as batch_op: with op.batch_alter_table('search_providers_newznab') as batch_op:
batch_op.drop_column('key') batch_op.drop_column('key')
......
...@@ -23,6 +23,7 @@ import re ...@@ -23,6 +23,7 @@ import re
from dateutil import tz from dateutil import tz
from sqlalchemy import orm from sqlalchemy import orm
from tornado.ioloop import IOLoop
import sickrage import sickrage
from sickrage.core.databases.cache import CacheDB from sickrage.core.databases.cache import CacheDB
...@@ -57,6 +58,12 @@ class TimeZoneUpdater(object): ...@@ -57,6 +58,12 @@ class TimeZoneUpdater(object):
def update_network_timezones(self): def update_network_timezones(self):
"""Update timezone information from SR repositories""" """Update timezone information from SR repositories"""
if not sickrage.app.api.token:
IOLoop.current().call_later(5, self.update_network_timezones)
return
sickrage.app.log.debug('Updating network timezones')
session = sickrage.app.cache_db.session() session = sickrage.app.cache_db.session()
resp = sickrage.app.api.network_timezones() resp = sickrage.app.api.network_timezones()
...@@ -97,6 +104,8 @@ class TimeZoneUpdater(object): ...@@ -97,6 +104,8 @@ class TimeZoneUpdater(object):
# cleanup # cleanup
del network_timezones del network_timezones
sickrage.app.log.debug('Updating network timezones finished')
def get_network_timezone(self, network): def get_network_timezone(self, network):
""" """
Get a timezone of a network from a given network dict Get a timezone of a network from a given network dict
......
...@@ -30,7 +30,6 @@ import os ...@@ -30,7 +30,6 @@ import os
import pkgutil import pkgutil
import random import random
import re import re
import threading
from base64 import b16encode, b32decode from base64 import b16encode, b32decode
from collections import OrderedDict, defaultdict from collections import OrderedDict, defaultdict
from time import sleep from time import sleep
...@@ -40,16 +39,16 @@ from xml.sax import SAXParseException ...@@ -40,16 +39,16 @@ from xml.sax import SAXParseException
from bencode3 import bdecode, bencode from bencode3 import bdecode, bencode
from feedparser import FeedParserDict from feedparser import FeedParserDict
from requests.utils import add_dict_to_cookiejar, dict_from_cookiejar from requests.utils import add_dict_to_cookiejar, dict_from_cookiejar
from tornado.ioloop import IOLoop
import sickrage import sickrage
from sickrage.core.caches.tv_cache import TVCache from sickrage.core.caches.tv_cache import TVCache
from sickrage.core.common import MULTI_EP_RESULT, SEASON_RESULT from sickrage.core.common import MULTI_EP_RESULT, SEASON_RESULT
from sickrage.core.enums import SearchFormat, CpuPreset from sickrage.core.common import Quality, Qualities
from sickrage.core.helpers import chmod_as_parent, sanitize_file_name, clean_url, bs4_parser, \ from sickrage.core.enums import SearchFormat
validate_url, try_int, convert_size from sickrage.core.helpers import chmod_as_parent, sanitize_file_name, clean_url, bs4_parser, validate_url, try_int, convert_size
from sickrage.core.helpers.show_names import all_possible_show_names from sickrage.core.helpers.show_names import all_possible_show_names
from sickrage.core.nameparser import InvalidNameException, InvalidShowException, NameParser from sickrage.core.nameparser import InvalidNameException, InvalidShowException, NameParser
from sickrage.core.common import Quality, Qualities
from sickrage.core.tv.show.helpers import find_show from sickrage.core.tv.show.helpers import find_show
from sickrage.core.websession import WebSession from sickrage.core.websession import WebSession
...@@ -1493,6 +1492,10 @@ class SearchProviders(dict): ...@@ -1493,6 +1492,10 @@ class SearchProviders(dict):
provider._urls = json.loads(provider_urls) provider._urls = json.loads(provider_urls)
def update_urls(self): def update_urls(self):
if not sickrage.app.api.token:
IOLoop.current().call_later(5, self.update_urls)
return
sickrage.app.log.debug('Updating search provider URLs') sickrage.app.log.debug('Updating search provider URLs')
for pID, pObj in self.all().items(): for pID, pObj in self.all().items():
......
10.0.31 10.0.32
\ No newline at end of file \ No newline at end of file
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