Skip to content

Commit

Permalink
Merge pull request #55 from SRGSSR/develop
Browse files Browse the repository at this point in the history
Update ParsePlayUrl javascript version to v27
  • Loading branch information
pyby authored Jun 6, 2021
2 parents 92b2e02 + ed2f259 commit 00ee05a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A wide list of parameters are available.
* `PFFF_USER` (optional, string): A user login to admin service.
* `PFFF_PASSWORD` (optional, string): A user password to admin service.
* `DEEP_LINK_REFRESH_DELAY_MS` (optional, integer): Scheduled fixed delay before refreshing the deep link script cache. If not set, defaults is `300000`.
* `DEEP_LINK_REFRESH_INITIAL_DELAY_MS` (optional, integer): Scheduled fixed initial delay before refreshing the deep link script cache. If not set, defaults is `0`.
* `DEEP_LINK_REFRESH_INITIAL_DELAY_MS` (optional, integer): Scheduled fixed initial delay before refreshing the deep link cache. If not set, defaults is `0`.
* `MAX_DEEP_LINK_REPORTS` (optional, integer): Maximum number of deep link reports in the database. If not set, defaults is `2500`.
* `DEEP_LINK_ENVIRONMENTS` (optional, string, multiple): List of `Environment`s to pull deep link dynamic informations. If not set, defaults is `PROD`.
* `UPDATE_CHECK_DISABLED` (optional, boolean): Disable checking if a recommended or required update is available, if set to `true`. If not set, defaults is `false`.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>ch.srgssr</groupId>
<artifactId>playfff</artifactId>
<version>31</version>
<version>32</version>
<packaging>jar</packaging>

<name>pfff</name>
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/deeplink/v1/parsePlayUrl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// parsePlayUrl

var parsePlayUrlVersion = 26;
var parsePlayUrlVersion = 27;
var parsePlayUrlBuild = "mmf";

if(! console) {
Expand Down Expand Up @@ -273,10 +273,11 @@ function parseForPlayApp(scheme, hostname, pathname, queryParams, anchor) {
/**
* Catch live TV urls
*
* Ex: https://www.srf.ch/play/tv/live/srf-1?tvLiveId=c4927fcf-e1a0-0001-7edd-1ef01d441651
* Ex: https://www.srf.ch/play/tv/live?tvLiveId=c49c1d73-2f70-0001-138a-
* Ex: https://www.srf.ch/play/tv/live/?tvLiveId=c49c1d73-2f70-0001-138a-15e0c4ccd3d0
*/
if (pathname.endsWith("/tv/live") || pathname.endsWith("/tv/live/") || pathname.endsWith("/tv/direct") || pathname.endsWith("/tv/direct/")) {
if (pathname.includes("/tv/live/") || pathname.includes("/tv/direct/") || pathname.endsWith("/tv/live") || pathname.endsWith("/tv/direct") || pathname.endsWith("/tv/live/") || pathname.endsWith("/tv/direct/")) {
var mediaId = queryParams["tvLiveId"];
if (mediaId) {
return openMedia(server, bu, "video", mediaId, null);
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/deeplink/v2/parsePlayUrl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// parsePlayUrl

var parsePlayUrlVersion = 26;
var parsePlayUrlVersion = 27;
var parsePlayUrlBuild = "mmf";

if(! console) {
Expand Down Expand Up @@ -245,10 +245,11 @@ function parseForPlayApp(scheme, hostname, pathname, queryParams, anchor) {
/**
* Catch live TV urls
*
* Ex: https://www.srf.ch/play/tv/live/srf-1?tvLiveId=c4927fcf-e1a0-0001-7edd-1ef01d441651
* Ex: https://www.srf.ch/play/tv/live?tvLiveId=c49c1d73-2f70-0001-138a-15e0c4ccd3d0
* Ex: https://www.srf.ch/play/tv/live/?tvLiveId=c49c1d73-2f70-0001-138a-15e0c4ccd3d0
*/
if (pathname.endsWith("/tv/live") || pathname.endsWith("/tv/live/") || pathname.endsWith("/tv/direct") || pathname.endsWith("/tv/direct/")) {
if (pathname.includes("/tv/live/") || pathname.includes("/tv/direct/") || pathname.endsWith("/tv/live") || pathname.endsWith("/tv/direct") || pathname.endsWith("/tv/live/") || pathname.endsWith("/tv/direct/")) {
var mediaId = queryParams["tvLiveId"];
if (mediaId) {
return openMedia(server, bu, "video", mediaId, null);
Expand Down

0 comments on commit 00ee05a

Please sign in to comment.