Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #189 from neox387/dev
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
piejanssens committed May 20, 2019
2 parents 1f40f49 + 7544c23 commit f4a757b
Show file tree
Hide file tree
Showing 12 changed files with 315 additions and 181 deletions.
31 changes: 5 additions & 26 deletions premiumizer/premiumizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,6 @@
except:
pass

# Remove later, migration for update
try:
if os.path.isfile(os.path.join(rootdir, 'settings.cfg')):
shutil.move(os.path.join(rootdir, 'settings.cfg'), os.path.join(ConfDir, 'settings.cfg'))
if os.path.isfile(os.path.join(runningdir, 'settings.cfg')):
shutil.move(os.path.join(runningdir, 'settings.cfg'), os.path.join(ConfDir, 'settings.cfg'))
if os.path.isfile(os.path.join(runningdir, 'database.db')):
shutil.move(os.path.join(runningdir, 'database.db'), os.path.join(ConfDir, 'database.db'))
except:
pass
# Remove later, migration for update

if not os.path.isdir(ConfDir):
os.makedirs(ConfDir)
if not os.path.isfile(os.path.join(ConfDir, 'settings.cfg')):
Expand Down Expand Up @@ -181,6 +169,7 @@ class ReverseProxy(object):
:param app: the WSGI application
'''

def __init__(self, app):
self.app = app

Expand Down Expand Up @@ -1763,11 +1752,6 @@ def upload_nzb(filename):
return 'failed'


def send_categories():
logger.debug('def send_categories started')
emit('download_categories', {'data': cfg.download_categories})


class MyHandler(events.PatternMatchingEventHandler):
patterns = ["*.torrent", "*.magnet", "*.nzb"]

Expand Down Expand Up @@ -2338,21 +2322,16 @@ def stop_task(message):
def test_message():
global client_connected
client_connected = 1
emit('hello_client', {'data': 'Server says hello!'})
logger.debug('Client connected')
emit('download_categories', {'data': cfg.download_categories})
scheduler.scheduler.reschedule_job('update', trigger='interval', seconds=1)


@socketio.on('disconnect')
def test_disconnect():
global client_connected
client_connected = 0
print('Client disconnected')


@socketio.on('hello_server')
def hello_server(message):
send_categories()
scheduler.scheduler.reschedule_job('update', trigger='interval', seconds=1)
print((message['data']))
logger.debug('Client disconnected')


@socketio.on('message')
Expand Down
2 changes: 1 addition & 1 deletion premiumizer/settings.cfg.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ updated = 1
auto_update = 0
update_date = Never
config_version = 2.2
req_version = 8.9
req_version = 9.0
11 changes: 0 additions & 11 deletions premiumizer/static/css/animate.min.css

This file was deleted.

10 changes: 0 additions & 10 deletions premiumizer/static/css/bootstrap-switch.min.css

This file was deleted.

Loading

0 comments on commit f4a757b

Please sign in to comment.