Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Improve UPNP sort order for TV recordings #19

Open
wants to merge 2 commits into from

2 participants

Joseph Lord Karl Dietz
Joseph Lord

It can be very hard to use the current sort order for the content items over UPNP especially if you have large numbers of a title and don't know the exact date of the recording.

This patch adds logical folders for date sorted versions of the listings by title and it also applies a subtitle sort to the non-date sorted title list to help where you know the particular episode that you want.

I have tested these changes on Ubuntu Precise but have not built from the Git source. I think that this is a very low risk change.

I understand if the design choices you make do not want to offer all these choices but as a heavy UPNP user I would strongly request that you do make a user obvious sort apply to the title grouped content (and I suggest by date). I also understand if you need to change the names, especially if internationalisation is required but I wanted to offer this upstream anyway.

Karl Dietz
dekarl commented June 06, 2012

the corresponding ticket is http://code.mythtv.org/trac/ticket/10687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 24 additions and 2 deletions. Show diff stats Hide diff stats

  1. 26  mythtv/programs/mythbackend/upnpcdstv.cpp
26  mythtv/programs/mythbackend/upnpcdstv.cpp
@@ -49,7 +49,7 @@ UPnpCDSRootInfo UPnpCDSTv::g_RootNodes[] =
49 49
             "ORDER BY starttime DESC",
50 50
         "", "starttime DESC" },
51 51
 
52  
-    {   "By Title",
  52
+    {   "By Title (newest first)",
53 53
         "title",
54 54
         "SELECT title as id, "
55 55
           "title as name, "
@@ -58,7 +58,29 @@ UPnpCDSRootInfo UPnpCDSTv::g_RootNodes[] =
58 58
             "%1 "
59 59
             "GROUP BY title "
60 60
             "ORDER BY title",
61  
-        "WHERE title=:KEY", "title" },
  61
+        "WHERE title=:KEY", "starttime DESC" },
  62
+
  63
+    {   "By Title (oldest first)",
  64
+        "title",
  65
+        "SELECT title as id, "
  66
+          "title as name, "
  67
+          "count( title ) as children "
  68
+            "FROM recorded "
  69
+            "%1 "
  70
+            "GROUP BY title "
  71
+            "ORDER BY title",
  72
+        "WHERE title=:KEY", "starttime" },
  73
+        
  74
+    {   "By Title (ordered by subtitle)",
  75
+        "title",
  76
+        "SELECT title as id, "
  77
+          "title as name, "
  78
+          "count( title ) as children "
  79
+            "FROM recorded "
  80
+            "%1 "
  81
+            "GROUP BY title "
  82
+            "ORDER BY title",
  83
+        "WHERE title=:KEY", "subtitle" },
62 84
 
63 85
     {   "By Genre",
64 86
         "category",
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.