Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Searches that don't get a result in redis are immediately redirected …

…to the tvdb search
  • Loading branch information...
commit 1bb49e225e3023b0d7d593de5fba886a0ba16fcf 1 parent 3050624
@maritz authored
Showing with 10 additions and 6 deletions.
  1. +1 −1  config.js
  2. +9 −5 static/js/views/showView.js
View
2  config.js
@@ -2,7 +2,7 @@ var env = process.env.NODE_ENV || 'development';
var defaults = {
"static": {
- port: 3002
+ port: 3003
},
"socket": {
options: {
View
14 static/js/views/showView.js
@@ -214,11 +214,15 @@ _r(function (app) {
showResults: function (collection) {
var self = this;
- this.$el.find('#cant_find_show').removeClass('hidden');
- this.addLocals({collection: collection});
- app.template(this.module, 'search_result', this.locals, function (html) {
- self.$el.find('ul').html(html);
- });
+ if (collection.length === 0) {
+ this.$el.find('.tvdb_import_controls button').click();
+ } else {
+ this.$el.find('#cant_find_show').removeClass('hidden');
+ this.addLocals({collection: collection});
+ app.template(this.module, 'search_result', this.locals, function (html) {
+ self.$el.find('ul').html(html);
+ });
+ }
},
searchImport: function (e) {
Please sign in to comment.
Something went wrong with that request. Please try again.