Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fs uniquifier #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions admin/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ class User(Base, UserMixin):
last_login_ip = Column(String(100))
current_login_ip = Column(String(100))
active = Column(Boolean())
fs_uniquifier = Column(String(255), unique=True, nullable=False)
confirmed_at = Column(DateTime())
roles = relationship('Role', secondary='roles_users', backref=backref('users', lazy='dynamic'))
26 changes: 13 additions & 13 deletions admin/reference_settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ engines:
# shortcut : fa
# api_key : 'apikey' # required!

- name : 500px
engine : www500px
shortcut : px
# - name : 500px
# engine : www500px
# shortcut : px

- name : 1x
engine : www1x
Expand Down Expand Up @@ -505,13 +505,13 @@ engines:
shortcut : se
categories : science

- name : spotify
engine : spotify
shortcut : stf
# - name : spotify
# engine : spotify
# shortcut : stf

- name : subtitleseeker
engine : subtitleseeker
shortcut : ss
# - name : subtitleseeker
# engine : subtitleseeker
# shortcut : ss
# The language is an option. You can put any language written in english
# Examples : English, French, German, Hungarian, Chinese...
# language : English
Expand All @@ -530,10 +530,10 @@ engines:
timeout : 6.0
disabled : True

- name : swisscows
engine : swisscows
shortcut : sw
disabled : True
# - name : swisscows
# engine : swisscows
# shortcut : sw
# disabled : True

- name : tokyotoshokan
engine : tokyotoshokan
Expand Down
9 changes: 6 additions & 3 deletions admin/searx_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,14 @@ def __init__(self, root, uwsgi_extra_args):
outfile.write(config)

def _merge_settings(self, new_settings):
for k, s in new_settings.items():
for k, s in list(new_settings.items()):
if k == 'engines':
continue
for kk, c in s.items():
self.settings[k][kk] = c
try:
for kk, c in list(s.items()):
self.settings[k][kk] = c
except AttributeError: # s is not a dictionary
self.settings[k] = s

editable_engines = {e['name']: e for e in new_settings['engines']}
for i, e in enumerate(self.settings['engines']):
Expand Down