]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui/dvr: Add age_rating in recording details dialogs
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 11 Aug 2023 05:45:14 +0000 (05:45 +0000)
committerFlole998 <Flole998@users.noreply.github.com>
Fri, 11 Aug 2023 23:33:57 +0000 (01:33 +0200)
The details dialogs in the various recording tabs do not open anymore
with the error `Uncaught TypeError: params[25] is undefined` in the JS
console as the age_rating wasn't requested for those, only for the
overview columns.

While we are at it lets also display the value in the same way the
similar looking (but completely different implemented…) EPG dialog does.

Regession-of: d501059995
Fixes: https://tvheadend.org/issues/6297
src/webui/static/app/dvr.js

index b3913fd4649e5d8022e6f4e6025d356024074fa4..212f464d9046b49d2278f21c05072bf86ae7f435 100644 (file)
@@ -138,6 +138,8 @@ tvheadend.dvrDetails = function(grid, index) {
           content += tvheadend.sortAndAddArray(keyword, _('Keywords'));
         if (category)
           content += tvheadend.sortAndAddArray(category, _('Categories'));
+        if (age_rating)
+            content += '<div class="x-epg-meta"><span class="x-epg-prefix">' + _('Age Rating') + ':</span><span class="x-epg-desc">' + age_rating + '</span></div>';
         if (status)
             content += '<div class="x-epg-meta"><span class="x-epg-prefix">' + _('Status') + ':</span><span class="x-epg-body">' + status + '</span></div>';
         if (filesize)
@@ -306,7 +308,7 @@ tvheadend.dvrDetails = function(grid, index) {
             list: 'channel_icon,disp_title,disp_subtitle,disp_summary,episode_disp,start_real,stop_real,' +
                   'duration,disp_description,status,filesize,comment,duplicate,' +
                   'autorec_caption,timerec_caption,image,copyright_year,credits,keyword,category,' +
-                  'first_aired,genre,channelname,fanart_image,broadcast',
+                  'first_aired,genre,channelname,fanart_image,broadcast,age_rating',
         },
         success: function(d) {
             d = json_decode(d);