Skip to content

Commit

Permalink
Merge pull request #3 from sharkykh/refactors
Browse files Browse the repository at this point in the history
Refactors
  • Loading branch information
sharkykh committed Sep 3, 2018
2 parents 7892f7a + 14f2904 commit d9ff9bb
Show file tree
Hide file tree
Showing 14 changed files with 389 additions and 216 deletions.
5 changes: 3 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ verify_ssl = true
name = "pypi"

[packages]
"trakt.py" = "<3.0"
"six" = ">= 1.11.0"
"trakt.py" = "< 3.0.0"

[dev-packages]
"flake8" = "*"

[requires]
python_version = "2.7"
python_version = "3.6"
32 changes: 4 additions & 28 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion main.pyw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python
# coding: utf-8
""" Trakt Playback Manager """
from __future__ import absolute_import
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
trakt.py<3.0
six >= 1.11.0
trakt.py == 2.14.1
22 changes: 11 additions & 11 deletions send_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@
from trakt import Trakt


def send_test_data(main_app):
with Trakt.configuration.oauth.from_response(main_app.authorization):
Trakt['scrobble'].pause(movie={'ids': {'tmdb': 118340}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5761493}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5951173}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5950264}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5966778}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5940102}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 6636942}})
def send_test_data():
Trakt['scrobble'].pause(movie={'ids': {'tmdb': 118340}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5761493}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5951173}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5950264}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5966778}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5966780}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 5940102}})
Trakt['scrobble'].pause(episode={'ids': {'tvdb': 6636942}})

print('Test data sent.')


def main():
root = Application()
if not root._check_auth():
if not root.authorization:
print('Authentication required.')
return

send_test_data(root)
send_test_data()


if __name__ == '__main__':
Expand Down

0 comments on commit d9ff9bb

Please sign in to comment.