You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.3 KiB
67 lines
1.3 KiB
/*jslint laxbreak:true */
|
|
/*jslint laxcomma:true */
|
|
/*jslint loopfunc:true */
|
|
/*jslint strict:true */
|
|
/*jslint browser:true */
|
|
/*jslint devel:true */
|
|
|
|
// Filename: app.js
|
|
define([
|
|
"views/app"
|
|
, "views/footer"
|
|
, "views/sidebar"
|
|
, "views/player"
|
|
, "views/main"
|
|
|
|
, "models/client"
|
|
, "models/dmap"
|
|
],
|
|
function(
|
|
AppView
|
|
, FooterView
|
|
, SideBarView
|
|
, PlayerView
|
|
, MainView
|
|
|
|
, ClientModel
|
|
, DMAPModel
|
|
) {
|
|
"use strict";
|
|
|
|
var init = function() {
|
|
console.log("app.js::init()");
|
|
|
|
this.Views = {};
|
|
|
|
this.Views.Footer = new FooterView();
|
|
this.Views.SideBar = new SideBarView();
|
|
this.Views.Player = new PlayerView();
|
|
this.Views.Main = new MainView();
|
|
this.Views.App = new AppView();
|
|
|
|
var client = new ClientModel({
|
|
hostname: "daap.localhost"
|
|
, protocol: "http"
|
|
, port: 80
|
|
, password: "lawl"
|
|
});
|
|
|
|
client.on("unauthorized", function __client_unauthorized() {
|
|
console.log(arguments);
|
|
});
|
|
|
|
client.on("inited", function (collections) {
|
|
console.log(client.url(), arguments);
|
|
|
|
var item = collections.databases[collections.databasesInfo.get("dmap_listing").at(0).id].get("dmap_listing").get(107);
|
|
console.log(item, item.toJSON(), collections.databases[collections.databasesInfo.get("dmap_listing").at(0).id].get("dmap_listing").toJSON());
|
|
});
|
|
|
|
//client.init();
|
|
|
|
return this;
|
|
};
|
|
|
|
return { init: init };
|
|
});
|