webui: set title for the Play links (... playlists)

This commit is contained in:
Jaroslav Kysela 2014-06-24 23:00:45 +02:00
parent c469807285
commit fc15bf3616
4 changed files with 24 additions and 6 deletions

View file

@ -211,7 +211,12 @@ tvheadend.channel_tab = function(panel)
width: 50,
header: 'Play',
renderer: function(v, o, r) {
return "<a href='play/stream/channel/" + r.id + "'>Play</a>";
var title = '';
if (r.data['number'])
title += r.data['number'] + ' : ';
title += r.data['name'];
return "<a href='play/stream/channel/" + r.id +
"?title=" + encodeURIComponent(title) + "'>Play</a>";
}
}
],

View file

@ -218,7 +218,11 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
width: 40,
header: "Play",
renderer: function(v, o, r) {
return '<a href="play/dvrfile/' + r.data['id'] + '">Play</a>';
var title = r.data['title'];
if (r.data['episode'])
title += ' / ' + r.data['episode'];
return '<a href="play/dvrfile/' + r.data['id'] +
'?title=' + encodeURIComponent(title) + '">Play</a>';
}
});
cols.push({

View file

@ -60,8 +60,13 @@ tvheadend.epgDetails = function(event) {
content += '<div id="altbcast"></div>';
now = new Date();
if (event.start < now && event.end > now)
content += '<div class="x-epg-meta"><a href="play/stream/channelid/' + event.channelid + '">Play</a></div>';
if (event.start < now && event.end > now) {
var title = event.title;
if (event.episode)
title += ' / ' + event.episode;
content += '<div class="x-epg-meta"><a href="play/stream/channelid/' + event.channelid +
'?title=' + encodeURIComponent(title) + '">Play</a></div>';
}
var confcombo = new Ext.form.ComboBox({
store: tvheadend.configNames,

View file

@ -84,7 +84,9 @@ tvheadend.muxes = function(panel)
width: 50,
header: 'Play',
renderer: function(v, o, r) {
return "<a href='play/stream/mux/" + r.id + "'>Play</a>";
var title = r.data['name'] + ' / ' + r.data['network'];
return "<a href='play/stream/mux/" + r.id +
"?title=" + encodeURIComponent(title) + "'>Play</a>";
}
}
],
@ -239,7 +241,9 @@ tvheadend.services = function(panel)
width: 50,
header: 'Play',
renderer: function(v, o, r) {
return "<a href='play/stream/service/" + r.id + "'>Play</a>";
var title = r.data['svcname'] + ' / ' + r.data['provider'];
return "<a href='play/stream/service/" + r.id +
"?title=" + encodeURIComponent(title) + "'>Play</a>";
}
},
actions