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 @@
-
+
+
+