Commit 5ae9e877 authored by echel0n's avatar echel0n
Browse files

added new icon for TheTVDB series provider

switched anonymous referrer to anonym.to
fixed local variable 'refresh_token' referenced before assignment in cache offline token migration
parent 063b3668
This diff is collapsed.
......@@ -27,23 +27,24 @@ def upgrade():
meta = sa.MetaData(bind=conn)
oauth2_token = sa.Table('oauth2_token', meta, autoload=True)
certs = sickrage.app.auth_server.certs()
refresh_token = None
with op.get_context().begin_transaction():
for row in conn.execute(oauth2_token.select()):
refresh_token = row.refresh_token
new_token = sickrage.app.auth_server.refresh_token(refresh_token)
decoded_token = sickrage.app.auth_server.decode_token(new_token['access_token'], certs)
apikey = decoded_token['apikey']
try:
session = sickrage.app.config.db.session()
general = session.query(ConfigDB.General).one()
general.sso_api_key = apikey
session.commit()
except orm.exc.NoResultFound:
pass
if refresh_token:
certs = sickrage.app.auth_server.certs()
new_token = sickrage.app.auth_server.refresh_token(refresh_token)
decoded_token = sickrage.app.auth_server.decode_token(new_token['access_token'], certs)
apikey = decoded_token['apikey']
try:
session = sickrage.app.config.db.session()
general = session.query(ConfigDB.General).one()
general.sso_api_key = apikey
session.commit()
except orm.exc.NoResultFound:
pass
if conn.engine.dialect.has_table(conn.engine, 'oauth2_token'):
op.drop_table('oauth2_token')
......
......@@ -145,7 +145,7 @@ class ConfigDB(SRDatabase):
https_key = Column(Text, default='server.key')
https_cert = Column(Text, default='server.crt')
allow_high_priority = Column(Boolean, default=False)
anon_redirect = Column(Text, default='http://nullrefer.com/?')
anon_redirect = Column(Text, default='https://anonym.to/?')
series_provider_timeout = Column(Integer, default=20)
web_use_gzip = Column(Boolean, default=True)
daily_searcher_freq = Column(Integer, default=40)
......
......@@ -22,20 +22,17 @@ import enum
class SeriesProviderID(enum.Enum):
SICKRAGE = 'sickrage'
THETVDB = 'thetvdb'
@property
def _strings(self):
return {
self.SICKRAGE.name: 'SiCKRAGE',
self.THETVDB.name: 'TheTVDB'
}
@property
def _slug_strings(self):
return {
self.SICKRAGE.name: 'sickrage',
self.THETVDB.name: 'thetvdb'
}
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -158,8 +158,8 @@
<a href="${anon_url(show.series_provider.show_url, show.series_id)}"
onclick="window.open(this.href, '_blank'); return false;"
title="<% show.series_provider.show_url + str(show.series_id) %>">
<i class="sickrage-core sickrage-core-${show.series_provider.name.lower()}"
title="${show.series_provider.show_url}${str(show.series_id)}">
<i class="sickrage-series-providers sickrage-series-providers-${show.series_provider.name.lower()}"
style="margin-top: -1px; vertical-align:middle;"></i>
</a>
</div>
......
......@@ -4,6 +4,7 @@ require('./spritesmith-generated/sickrage-core.css');
require('./spritesmith-generated/sickrage-notification-providers.css');
require('./spritesmith-generated/sickrage-network.css');
require('./spritesmith-generated/sickrage-search-providers.css');
require('./spritesmith-generated/sickrage-series-providers.css');
require('./spritesmith-generated/sickrage-subtitles.css');
require('./spritesmith-generated/sickrage-flags.css');
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -152,19 +152,20 @@ module.exports = {
makeSprite('network'),
makeSprite('notification-providers'),
makeSprite('search-providers'),
makeSprite('series-providers'),
makeSprite('subtitles'),
makeSprite('flags')
]
};
if (process.env.ENABLE_SENTRY_RELEASE.toLowerCase() === 'true') {
module.exports.plugins.push(
new SentryWebpackPlugin({
release: version,
include: path.resolve(__dirname, 'sickrage/core/webserver/static/js'),
ignoreFile: '.sentrycliignore',
ignore: ['node_modules', 'webpack.config.js'],
configFile: 'sentry.properties'
}),
)
}
\ No newline at end of file
// if (process.env.ENABLE_SENTRY_RELEASE.toLowerCase() === 'true') {
// module.exports.plugins.push(
// new SentryWebpackPlugin({
// release: version,
// include: path.resolve(__dirname, 'sickrage/core/webserver/static/js'),
// ignoreFile: '.sentrycliignore',
// ignore: ['node_modules', 'webpack.config.js'],
// configFile: 'sentry.properties'
// }),
// )
// }
\ No newline at end of file
Markdown is supported
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