LMS-Community/slimserver

M(ore) info link when item is not a play

philippe44 opened this issue · 2 comments

When I look at wmlbrowser.html, around line 190, does anybody know why we don't display the moreLink when item is audio, playlist, or it's an enclosure/play?

The problem is that we must have a "play" entry for such M(ore) to be displayed and that is inconsistent between JSON/Jive-based system and WebBrowser. If you look at XML browser code, as soon as you have a "play" entry, we can't expand the subfeed, so on Jive, when "clicking" on the item, we fail to play, but if we have an action, we can have a "More" type menu, But on WebBrowser, if we do not have a "play" key in the item, then we can't have a More item, whether we have an action or not - huh...

Adding the More entry to xmlbrowser.html (commented-tout below) brings the M(ore) link but I'm wondering if there are side-effects to that...

[% IF item.playLink  || item.insertLink || item.addLink || item.removeLink %]
			[% IF item.playLink; WRAPPER playlink %]onclick="SqueezeJS.Controller.urlRequest('[% webroot %][% item.playLink | replace("'", "%27") %]&player=[% playerURI %]', 1, SqueezeJS.string('connecting_for'));"[% END; END %]
			[% IF allLinks && item.insertLink; WRAPPER insertlink %]onclick="SqueezeJS.Controller.urlRequest('[% webroot %][% item.insertLink | replace("'", "%27") %]&player=[% playerURI %]', 1);"[% END; END %]
			[% IF item.addLink; WRAPPER addlink %]onclick="SqueezeJS.Controller.urlRequest('[% webroot %][% item.addLink | replace("'", "%27") %]&player=[% playerURI %]', 1);"[% END; END %]
			[% IF allLinks && item.removeLink; WRAPPER removelink %]onclick="SqueezeJS.Controller.urlRequest('[% webroot %][% item.removeLink | replace("'", "%27") %]&player=[% playerURI %]', 1);"[% END; END %]
			[% IF item.mixersLink; WRAPPER morelink %]href="[% webroot %][% item.mixersLink %]?player=[% playerURI %]"[% END; END %]
		[% ELSIF item.type == 'audio' || item.type == 'playlist' || item.enclosure || item.play %]
			[% WRAPPER playlink %]onclick="Browse.XMLBrowser.play[% IF item.type == 'playlist' %]All[% END %]Link('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% sess %]');"[% END %]
			[% IF allLinks; WRAPPER insertlink %]onclick="Browse.XMLBrowser.insertLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% sess %]');"[% END; END %]
			[% WRAPPER addlink %]onclick="Browse.XMLBrowser.add[% IF item.type == 'playlist' %]All[% END %]Link('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% sess %]');"[% END %]
			<!-- [% IF item.mixersLink; WRAPPER morelink %]href="[% webroot %][% item.mixersLink %]?player=[% playerURI %]"[% END; END %]			 -->
		[% ELSIF item.mixersLink %]
			[% WRAPPER morelink %]href="[% webroot %][% item.mixersLink %]?player=[% playerURI %]"[% END %]
		[% ELSE %]
			[% PROCESS dummylink %]
			[% PROCESS dummylink %]
		[% END %]

Hmm... the link even is there in the EN skin:

[% IF item.mixersLink; WRAPPER cmdlink cmdimage='b_mix.gif' cmdtitle='MORE' %]
href="[% webroot %][% item.mixersLink %]&player=[% playerURI %]" [% IF browserTarget %]target="[% browserTarget %]"[% END %]
[% END; END %]

I don't see any good reason why it shouldn't for Default. Did you try to git blame the file to see from the commit history why that might be the case?

I think I just understood: MoreItem can't be used because XMLBrowser builds actions for everything, include remove but that only makes sense when the entity presented is one single element.