Skip to content

Commit

Permalink
Merge pull request #108 from anxdpanic/save_trim
Browse files Browse the repository at this point in the history
save trimmed keys to settings
  • Loading branch information
jdf76 authored Nov 11, 2016
2 parents 1a8af96 + 21661b5 commit 42c8e98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/lib/youtube/client/__config__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
__settings = __context.get_settings()

_own_key = __settings.get_string('youtube.api.key', '').strip()
_own_id = __settings.get_string('youtube.api.id', '').strip().replace('.apps.googleusercontent.com', '')
_own_id = __settings.get_string('youtube.api.id', '').replace('.apps.googleusercontent.com', '').strip()
_own_secret = __settings.get_string('youtube.api.secret', '').strip()

__settings.set_string('youtube.api.key', _own_key)
__settings.set_string('youtube.api.id', _own_id)
__settings.set_string('youtube.api.secret', _own_secret)


def _has_own_keys():
return False if not _own_key or \
Expand Down

0 comments on commit 42c8e98

Please sign in to comment.