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;
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) {
selected.selected = true;
selected.quality.selected = true;
}
self.templateFunction = Marionette.TemplateCache.get(templateName);

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