Fixed: Changing quality of episode file

pull/4/head
Mark McDowall 11 years ago
parent 4e5588f5dd
commit a6c653651f

@ -28,10 +28,12 @@ define(
var templateName = self.template; var templateName = self.template;
self.schema = qualityProfileSchemaCollection.first(); self.schema = qualityProfileSchemaCollection.first();
var selected = _.find(self.schema.get('available'), { 'id': self.model.get(self.column.get('name')).quality.id }); var selected = _.find(self.schema.get('items'), function (model) {
return model.quality.id === self.model.get(self.column.get('name')).quality.id;
});
if (selected) { if (selected) {
selected.selected = true; selected.quality.selected = true;
} }
self.templateFunction = Marionette.TemplateCache.get(templateName); self.templateFunction = Marionette.TemplateCache.get(templateName);

@ -1,7 +1,9 @@
{{#each available}} {{#each items}}
{{#if selected}} {{#with quality}}
<option value="{{id}}" selected="selected">{{name}}</option> {{#if selected}}
{{else}} <option value="{{id}}" selected="selected">{{name}}</option>
<option value="{{id}}">{{name}}</option> {{else}}
{{/if}} <option value="{{id}}">{{name}}</option>
{{/if}}
{{/with}}
{{/each}} {{/each}}
Loading…
Cancel
Save