Skip to content

Commit

Permalink
Merge branch 'trakt_integration'
Browse files Browse the repository at this point in the history
  • Loading branch information
midgetspy committed Dec 14, 2011
2 parents 73e30e8 + c5e31f8 commit 9b43f71
Show file tree
Hide file tree
Showing 16 changed files with 1,431 additions and 374 deletions.
Binary file added data/images/notifiers/trakt.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions data/interfaces/default/config_notifications.tmpl
Expand Up @@ -674,6 +674,65 @@



<div id="core-component-group11" class="component-group clearfix">

<div class="component-group-desc">
<h3><a href="http://trakt.tv/" onclick="window.open(this.href, '_blank'); return false;"><img src="$sbRoot/images/notifiers/trakt.gif" alt="Trakt" title="Trakt" width="16" height="16" /> Trakt</a></h3>
<p>trakt helps keep a record of what TV shows and movies you are watching. Based on your favorites, trakt recommends additional shows and movies you'll enjoy!</p>
</div>

<fieldset class="component-group-list">
<div class="field-pair">
<input type="checkbox" class="enabler" name="use_trakt" id="use_trakt" #if $sickbeard.USE_TRAKT then "checked=\"checked\"" else ""# />
<label class="clearfix" for="use_trakt">
<span class="component-title">Enable</span>
<span class="component-desc">Should Sick Beard send Trakt.tv notifications?</span>
</label>
</div>

<div id="content_use_trakt">
<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Trakt Username</span>
<input type="text" name="trakt_username" id="trakt_username" value="$sickbeard.TRAKT_USERNAME" size="35" />
</label>
<label class="nocheck clearfix">
<span class="component-title">&nbsp;</span>
<span class="component-desc">Username of your Trakt account.</span>
</label>
</div>

<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Trakt Password</span>
<input type="password" name="trakt_password" id="trakt_password" value="$sickbeard.TRAKT_PASSWORD" size="35" />
</label>
<label class="nocheck clearfix">
<span class="component-title">&nbsp;</span>
<span class="component-desc">Password of your Trakt account.</span>
</label>
</div>

<div class="field-pair">
<label class="nocheck clearfix">
<span class="component-title">Trakt API key:</span>
<input type="text" name="trakt_api" id="trakt_api" value="$sickbeard.TRAKT_API" size="35" />
</label>
<label class="nocheck clearfix">
<span class="component-title">&nbsp;</span>
<span class="component-desc">Get your key at: <a href="http://trakt.tv/settings/api" onclick="window.open(this.href, '_blank'); return false;">http://trakt.tv/settings/api</a></span>
</label>
</div>

<div class="testNotification" id="testTrakt-result">Click below to test.</div>
<input type="button" value="Test Trakt" id="testTrakt" />
<input type="submit" class="config_submitter" value="Save Changes" />

</div><!-- /enabler_trakt //-->

</fieldset>
</div><!-- /component-group //-->

<br/><input type="submit" class="config_submitter" value="Save Changes" /><br/>

</div><!-- /config-components //-->
Expand Down
10 changes: 10 additions & 0 deletions data/js/configNotifications.js
Expand Up @@ -117,4 +117,14 @@ $(document).ready(function(){
$.get(sbRoot+"/home/testNMJ", {'host': nmj_host, 'database': nmj_database, 'mount': nmj_mount},
function (data){ $('#testNMJ-result').html(data); });
});

$('#testTrakt').click(function(){
$('#testTrakt-result').html(loading);
var trakt_api = $("#trakt_api").val();
var trakt_username = $("#trakt_username").val();
var trakt_password = $("#trakt_password").val();

$.get(sbRoot+"/home/testTrakt", {'api': trakt_api, 'username': trakt_username, 'password': trakt_password},
function (data){ $('#testTrakt-result').html(data); });
});
});

0 comments on commit 9b43f71

Please sign in to comment.