From f7ab3476c6b878db98ae126ecaf284e0d84e8bd9 Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Wed, 30 Mar 2016 13:00:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B2=D0=B8=D0=B4=D0=B5=D0=BE=20=D0=B2=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=B5=20=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B4=20=D0=BF=D0=BB=D0=B5=D0=B5=D1=80=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kinosearch/core/warez/Onlinelife.java | 3 ++- webapp/WEB-INF/player.html | 21 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/main/java/kinosearch/core/warez/Onlinelife.java b/src/main/java/kinosearch/core/warez/Onlinelife.java index d0f1233..941d419 100644 --- a/src/main/java/kinosearch/core/warez/Onlinelife.java +++ b/src/main/java/kinosearch/core/warez/Onlinelife.java @@ -89,7 +89,8 @@ public class Onlinelife implements KinoWarez { if (jsonObj.has("file")) { String fileMp4 = jsonObj.get("file").getAsString().substring("http://".length()); - return "{\"file\":\"/proxy/onlinelife/" + fileMp4 + "\"}"; + String title = jsonObj.get("comment").getAsString(); + return "{\"file\":\"/proxy/onlinelife/" + fileMp4 + "\",\"title\":\"" + title + "\"}"; } else if (jsonObj.has("pl")) { browser.setEncoding("utf-8"); return replaceToProxy(browser.get(jsonObj.get("pl").getAsString())); diff --git a/webapp/WEB-INF/player.html b/webapp/WEB-INF/player.html index 852a7ab..10c1690 100644 --- a/webapp/WEB-INF/player.html +++ b/webapp/WEB-INF/player.html @@ -4,6 +4,7 @@ var video_data = ${json}; var player; var videotime = 0; + var origDocTitle; function msToTime(ms) { function addZ(n) { return (n<10? '0':'') + n; } @@ -22,12 +23,25 @@ }; } + function setTitle(text) { + document.title = text + " :: " + origDocTitle; + $('#title').text(text); + $('#title').show(); + } + $(function(){ player = $('#player'); + origDocTitle = document.title; + if (typeof(video_data.title) !== 'undefined') { + setTitle(video_data.title); + } else { + $('#title').hide(); + } // set video if (typeof(video_data.file) !== 'undefined') { player.attr('src', '${basedir}'+video_data.file); + $('#plbr').hide(); } else if (typeof(video_data.playlist) !== 'undefined') { $('#pl-season').removeClass('hide'); menu = $('#pl-season-menu'); @@ -52,6 +66,7 @@ smenu.find('a').bind('click', function(){ $('#dropdownSerial').html(this.text + ' '); player.attr('src', '${basedir}'+this.attributes['data-file'].value); + setTitle(this.text); }); $('#pl-serial').removeClass('hide'); @@ -126,7 +141,11 @@ -

+
+ +

+ +