Skip to content

Commit ad2a24e

Browse files
committed
Added support for prominent services without ranking
1 parent c90afd1 commit ad2a24e

7 files changed

Lines changed: 31 additions & 6 deletions

File tree

backend/servicelists/prominence_r6.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,5 +241,20 @@
241241
</ServiceInstance>
242242
<ServiceName>Service Ranking None</ServiceName>
243243
<ProviderName>DVB</ProviderName>
244+
<ProminenceList>
245+
<Prominence/>
246+
</ProminenceList>
247+
</Service>
248+
<Service version="1">
249+
<UniqueIdentifier>tag:dvb-i-referenceapp,2023:Ranking-NotProminent</UniqueIdentifier>
250+
<ServiceInstance priority="1">
251+
<DASHDeliveryParameters>
252+
<UriBasedLocation contentType="application/dash+xml">
253+
<dvbi-types:URI>https://refapp.hbbtv.org/livesim/02_llamanofragv1/manifest.mpd</dvbi-types:URI>
254+
</UriBasedLocation>
255+
</DASHDeliveryParameters>
256+
</ServiceInstance>
257+
<ServiceName>Service No Prominence</ServiceName>
258+
<ProviderName>DVB</ProviderName>
244259
</Service>
245260
</ServiceList>

frontend/android/js/channel.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ Channel.prototype.init = function (init_obj, channel_index) {
9191
var container = document.createElement("div");
9292
var ranking = this.getRanking();
9393
if (ranking) {
94-
if (ranking <= 10) {
94+
if (ranking === true) {
95+
newTextbox.classList.add("ranking_none");
96+
} else if (ranking <= 10) {
9597
newTextbox.classList.add("ranking_" + ranking);
9698
} else if (ranking <= 100) {
9799
newTextbox.classList.add("ranking_100");

frontend/android/styles/dvbi.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ body.player {
406406
cursor: pointer;
407407
}
408408

409+
.ranking_none {
410+
background-color: #ff000080;
411+
}
409412
.ranking_1 {
410413
font-size: 1.7em;
411414
background-color: #ff0000e0;

frontend/channel-common.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Channel.prototype.getRanking = function () {
322322
//Region should be unque, no need to check the country
323323
for (i = 0; i < this.prominences.length; i++) {
324324
if (this.prominences[i].region === region) {
325-
return this.prominences[i].ranking;
325+
return this.prominences[i].ranking || true;
326326
}
327327
}
328328
}
@@ -334,14 +334,14 @@ Channel.prototype.getRanking = function () {
334334
countryList.indexOf(this.prominences[i].country) != -1 &&
335335
!this.prominences[i].region
336336
) {
337-
return this.prominences[i].ranking;
337+
return this.prominences[i].ranking || true;
338338
}
339339
}
340340
}
341341
//general prominence, no country or region specified
342342
for (i = 0; i < this.prominences.length; i++) {
343343
if (!this.prominences[i].country && !this.prominences[i].region) {
344-
return this.prominences[i].ranking;
344+
return this.prominences[i].ranking || true;
345345
}
346346
}
347347
return null;

frontend/dvbi-common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ function parseServiceList(data, dvbChannels, supportedDrmSystems) {
548548
var ranking = parseInt(prominences[j].getAttribute("ranking"));
549549
if (!isNaN(ranking)) {
550550
prominence.ranking = ranking;
551-
chan.prominences.push(prominence);
552551
}
552+
chan.prominences.push(prominence);
553553
} catch {}
554554
}
555555
}

frontend/hbbtv/launcher/channel.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ Channel.prototype.init = function (init_obj, element_id) {
254254
var ranking = this.getRanking();
255255
var rankingClass = "";
256256
if (ranking) {
257-
if (ranking <= 10) {
257+
if (ranking === true) {
258+
rankingClass = " ranking_none";
259+
} else if (ranking <= 10) {
258260
rankingClass = " ranking_" + ranking;
259261
} else if (ranking <= 100) {
260262
rankingClass = " ranking_100";

frontend/hbbtv/launcher/navi.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,9 @@ div, span {
764764
background-color: #000C;
765765
}
766766

767+
.ranking_none {
768+
background-color: #ff0000e0;
769+
}
767770
.ranking_1 {
768771
font-size: 1.7em;
769772
background-color: #ff0000e0;

0 commit comments

Comments
 (0)