Ticket #3340: 3340_mythweb_update_recgroup_count_v1.diff
File 3340_mythweb_update_recgroup_count_v1.diff, 3.2 KB (added by , 17 years ago) |
---|
-
mythplugins/mythweb/modules/tv/tmpl/default/recorded.php
71 71 file.subtitle = '<?php echo addslashes($show->subtitle) ?>'; 72 72 file.chanid = '<?php echo addslashes($show->chanid) ?>'; 73 73 file.starttime = '<?php echo addslashes($show->recstartts) ?>'; 74 file. group = '<?php echo addslashes(str_replace('%2F', '/', rawurlencode($show->group))) ?>';75 file.filename = '<?php echo addslashes(str_replace('%2F', '/', rawurlencode($show->filename))) ?>';74 file.recgroup = '<?php echo addslashes(str_replace('%2F', '/', rawurlencode($show->recgroup))) ?>'; 75 file.filename = '<?php echo addslashes(str_replace('%2F', '/', rawurlencode($show->filename))) ?>'; 76 76 file.size = '<?php echo addslashes($show->filesize) ?>'; 77 77 file.length = '<?php echo addslashes($show->recendts - $show->recstartts) ?>'; 78 78 file.autoexpire = <?php echo $show->auto_expire ? 1 : 0 ?>; … … 147 147 if (rowcount[section] == 0) { 148 148 toggle_vis('breakrow_' + section, 'display'); 149 149 } 150 // Change the recording groups dropdown on the fly. 151 if (file.recgroup) { 152 // Decrement the number of episodes for this group 153 groups[file.recgroup]--; 154 var group_count = groups[file.recgroup] 155 // Change the groups dropdown menu on the fly 156 if (group_count == 0) { 157 toggle_vis('Group ' + file.recgroup, 'display'); 158 } 159 else { 160 var group_text; 161 group_text = (group_count > 1) ? ' (' + group_count + ' episodes)' : ''; 162 $('Group ' + file.recgroup).innerHTML = file.recgroup + group_text; 163 } 164 } 150 165 // Change the recordings dropdown menu on the fly 151 166 if (episode_count == 0) { 152 167 toggle_vis('Title ' + file.title, 'display'); … … 156 171 count_text = (episode_count > 1) ? ' (' + episode_count + ' episodes)' : ''; 157 172 $('Title ' + file.title).innerHTML = file.title + count_text; 158 173 } 159 // TODO: test changing the groups dropdown on the fly.160 // I can't test it because I haven't set up any recording groups, and probably never will161 if (file.group) {162 // Decrement the number of episodes for this group163 groups[file.group]--;164 var group_count = titles[file.title]165 // Change the groups dropdown menu on the fly166 if (group_count == 0) {167 toggle_vis('Group ' + file.group, 'display');168 }169 else {170 var count_text;171 group_text = (group_count >1) ? ' (' + group_count + ' episodes)' : '';172 $('Group ' + file.group).innerHTML = file.group + group_text;173 }174 }175 174 // Decrement the total number of shows and update the page 176 175 programs_shown--; 177 176 programcount--;