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

fix duplicate pushes with pushbullet #253

Merged
merged 3 commits into from
Apr 4, 2014
Merged

fix duplicate pushes with pushbullet #253

merged 3 commits into from
Apr 4, 2014

Conversation

dj-nitehawk
Copy link
Contributor

@gazpachoking
Copy link
Member

Hmm. With this patch, won't only the first accepted item cause a notification?

by not specifying any device idens, the push will be sent to all devices
of the user. or the user can specify only the devices they want to
receive pushes on.
@dj-nitehawk
Copy link
Contributor Author

ok i fixed the problem properly this time. pushbullet needs to update their api doc to mention that by not specifying a device iden, the msg will be delivered to all devices owned by the user. please check the new commit. should be flawless now :-)

@@ -47,7 +47,7 @@ def prepare_config(self, config):
config.setdefault("body", "{% if series_name is defined %}{{tvdb_series_name|d(series_name)}} "
"{{series_id}} {{tvdb_ep_name|d('')}}{% elif imdb_name is defined %}{{imdb_name}} "
"{{imdb_year}}{% else %}{{title}}{% endif %}")

config.setdefault("device", "Nothing")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than using a specific string here, I'd just use None

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldnt doing that cause the for loop to not run due to "devices" being nothing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devices would end up being [None] i.e. a list with one item in it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i see... ill test it out and push a new commit. thanks... im new to python :)

@dj-nitehawk
Copy link
Contributor Author

ok @gazpachoking i've made the changes you suggested. let me know if u spot any more. thanks!

@dj-nitehawk dj-nitehawk changed the title fix for flexget sending duplicate pushes with pushbullet fix duplicate pushes with pushbullet Apr 3, 2014
gazpachoking added a commit that referenced this pull request Apr 4, 2014
fix duplicate pushes with pushbullet
@gazpachoking gazpachoking merged commit 7e63ce3 into Flexget:develop Apr 4, 2014
@gazpachoking
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants