render movies as folders with dlna

This commit is contained in:
Luke Pulverenti 2014-10-22 00:42:26 -04:00
parent 68ad0f6226
commit ab4fd843d3
4 changed files with 18 additions and 11 deletions

View File

@ -20,6 +20,9 @@
<button type="submit" data-icon="check">
${ButtonSignIn}
</button>
<p>
<a href="http://mediabrowser.tv/community/index.php?app=core&module=global&section=lostpass" target="_blank">${ButtonForgotPassword}</a>
</p>
<br /><br /><br />
<h2 style="text-align: left;">${HeaderNewUsers}</h2>

View File

@ -37,6 +37,7 @@
}).done(function (result) {
Dashboard.serverAddress(server.Url);
Dashboard.setCurrentUser(result.LocalUserId, result.AccessToken);
window.location = 'index.html';

View File

@ -100,6 +100,9 @@ var Dashboard = {
serverAddress: function (val) {
if (val != null) {
console.log('Setting server address to: ' + val);
store.setItem('serverAddress', val);
}
@ -776,15 +779,7 @@ var Dashboard = {
return;
}
var location = window.location;
var webSocketUrl = "ws://" + location.hostname;
if (location.port) {
webSocketUrl += ':' + location.port;
}
ApiClient.openWebSocket(webSocketUrl);
ApiClient.openWebSocket();
},
onWebSocketOpened: function () {

View File

@ -67,6 +67,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
throw new Error("Must supply a serverAddress");
}
console.log('ApiClient serverAddress: ' + serverAddress);
console.log('ApiClient clientName: ' + clientName);
console.log('ApiClient applicationVersion: ' + applicationVersion);
console.log('ApiClient deviceName: ' + deviceName);
console.log('ApiClient deviceId: ' + deviceId);
var self = this;
var currentUserId;
var accessToken;
@ -181,9 +187,11 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
return url;
};
self.openWebSocket = function (webSocketAddress) {
self.openWebSocket = function () {
var url = webSocketAddress + self.apiPrefix();
var url = serverAddress + self.apiPrefix();
url = url.replace('http', 'ws');
webSocket = new WebSocket(url);