Opened 14 years ago

Closed 14 years ago

#111 closed patch (fixed)

Sort "Recording Schedule" in priority order

Reported by: marc.aronson@… Owned by: xris
Priority: minor Milestone: unknown
Component: mythweb Version: head
Severity: low Keywords: sort priority order
Cc: lists@… Ticket locked: no

Description

I find the ability to review recording schedules in priority order in the myth frontend very useful and missed having this capability via mythweb, so I made a small change to sort by recording priority from mythweb. When you have made these changes the default sort order for "Recording Schedules" is by priority. Also, when you "hover" the mouse over the title the information box that appears now includes the recording priority.

The changes I made are below. All of these diffs are relative to the Knoppmyth R5A16 release, which I believe is based on Myth 0.18.1.

diff -bu for ./mythweb/includes/recording_schedules.php

@@ -356,6 +356,9 @@
             }
             $str .= "</dd>\n";
         }
+    // Recording Priority
+	$str .= "\t<dt>" . t('Rec Priority') . ":</dt>\n"; 
+	$str .= "\t<dd>" . $this->recpriority . "</dd>\n";
     // Profile
         if (preg_match('/\\S/', $this->profile)) {
             $str .= "\t<dt>".t('Profile').":</dt>\n"

diff -bu ./mythweb/includes/sorting.php

@@ -180,5 +180,9 @@
         return ($a->profile > $b->profile) ? 1 : -1;
     }
 
+    function by_recpriority(&$a, &$b) {
+	if ($a->recpriority == $b->recpriority) return 0;
+	return ($a->recpriority < $b->recpriority) ? 1 : -1;
+    }
 
 ?>

diff -bu for ./mythweb/languages/English.php

@@ -50,6 +50,7 @@
     'Original Airdate'                                   => '',
     'Previous recordings'                                => '',
     'Rating'                                             => '',
+    'Rec Priority'					 => '',
     'Record new and expire old'                          => '',
     'Recorded Programs'                                  => '',
     'Recording Group'                                    => '',

diff -bu for ./mythweb/themes/Default/theme.php

@@ -157,7 +157,7 @@
                 &nbsp; | &nbsp;
                 <a href="schedule_manually.php"><?php echo t('Manually Schedule') ?></a>
                 &nbsp; | &nbsp;
-                <a href="recording_schedules.php"><?php echo t('Recording Schedules') ?></a>
+                <a href="recording_schedules.php?sortby=recpriority"><?php echo t('Recording Schedules') ?></a>
                 &nbsp; | &nbsp;
                 <a href="scheduled_recordings.php"><?php echo t('Scheduled Recordings') ?></a>
                 &nbsp; | &nbsp;

Attachments (7)

English.php (549 bytes) - added by marc.aronson@… 14 years ago.
diff -bu ./mythweb/languages/English.php
English.2.php (549 bytes) - added by anonymous 14 years ago.
recording_schedules.php (467 bytes) - added by marc.aronson@… 14 years ago.
diff -bu ./mythweb/includes/recording_schedules.php
sorting.php (353 bytes) - added by marc.aronson@… 14 years ago.
diff -bu ./mythweb/includes/sorting.php
theme.php (650 bytes) - added by marc.aronson@… 14 years ago.
diff -bu ./mythweb/themes/Default/theme.php
mythweb.recpriority.diff (2.3 KB) - added by Robert Tsai <rtsai1111> 14 years ago.
proper diff against svn; provide clickable "recpriority" sort column
mythweb.recpriority.2.diff (2.8 KB) - added by Robert Tsai <rtsai1111> 14 years ago.
sneak in a fix to show transcoder name instead of number in popup

Download all attachments as: .zip

Change History (9)

Changed 14 years ago by marc.aronson@…

Attachment: English.php added

diff -bu ./mythweb/languages/English.php

Changed 14 years ago by anonymous

Attachment: English.2.php added

Changed 14 years ago by marc.aronson@…

Attachment: recording_schedules.php added

diff -bu ./mythweb/includes/recording_schedules.php

Changed 14 years ago by marc.aronson@…

Attachment: sorting.php added

diff -bu ./mythweb/includes/sorting.php

Changed 14 years ago by marc.aronson@…

Attachment: theme.php added

diff -bu ./mythweb/themes/Default/theme.php

Changed 14 years ago by Robert Tsai <rtsai1111>

Attachment: mythweb.recpriority.diff added

proper diff against svn; provide clickable "recpriority" sort column

Changed 14 years ago by Robert Tsai <rtsai1111>

Attachment: mythweb.recpriority.2.diff added

sneak in a fix to show transcoder name instead of number in popup

comment:1 Changed 14 years ago by Robert Tsai <rtsai1111>

Type: enhancementpatch
Version: 0.18.1head

comment:2 Changed 14 years ago by xris

Resolution: fixed
Status: newclosed

(In [7710]) apply patch to close #111 -- thanks Rob for cleaning up the patches

Note: See TracTickets for help on using tickets.