Rename the previously changed subsonic controller, service and related tests.
In order to better follow the google naming convention. See https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub
This commit is contained in:
parent
f57b969e55
commit
a2747a633d
7 changed files with 67 additions and 81 deletions
|
@ -1,81 +1,4 @@
|
|||
JamStash.service('model', function () {
|
||||
// Figure out how to move this, circular dependency with utils
|
||||
secondsToTime = function (secs) {
|
||||
// secs = 4729
|
||||
var times = new Array(3600, 60, 1);
|
||||
var time = '';
|
||||
var tmp;
|
||||
for (var i = 0; i < times.length; i++) {
|
||||
tmp = Math.floor(secs / times[i]);
|
||||
// 0: 4729/3600 = 1
|
||||
// 1: 1129/60 = 18
|
||||
// 2: 49/1 = 49
|
||||
if (tmp < 1) {
|
||||
tmp = '00';
|
||||
}
|
||||
else if (tmp < 10) {
|
||||
tmp = '0' + tmp;
|
||||
}
|
||||
if (i === 0 && tmp == '00') {
|
||||
} else {
|
||||
time += tmp;
|
||||
if (i < 2) {
|
||||
time += ':';
|
||||
}
|
||||
}
|
||||
secs = secs % times[i];
|
||||
}
|
||||
return time;
|
||||
};
|
||||
this.Index = function (name, artist) {
|
||||
this.name = name;
|
||||
this.artist = artist;
|
||||
};
|
||||
this.Artist = function (id, name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
};
|
||||
this.Album = function (id, parentid, name, artist, artistId, coverartthumb, coverartfull, date, starred, description, url, type) {
|
||||
this.id = id;
|
||||
this.parentid = parentid;
|
||||
this.name = name;
|
||||
this.artist = artist;
|
||||
this.artistId = artistId;
|
||||
this.coverartthumb = coverartthumb;
|
||||
this.coverartfull = coverartfull;
|
||||
this.date = date;
|
||||
this.starred = starred;
|
||||
this.description = description;
|
||||
this.url = url;
|
||||
this.type = type;
|
||||
};
|
||||
this.Song = function (id, parentid, track, name, artist, artistId, album, albumId, coverartthumb, coverartfull, duration, rating, starred, suffix, specs, url, position, description) {
|
||||
this.id = id;
|
||||
this.parentid = parentid;
|
||||
this.track = track;
|
||||
this.name = name;
|
||||
this.artist = artist;
|
||||
this.artistId = artistId;
|
||||
this.album = album;
|
||||
this.albumId = albumId;
|
||||
this.coverartthumb = coverartthumb;
|
||||
this.coverartfull = coverartfull;
|
||||
this.duration = duration;
|
||||
this.time = duration === '' ? '00:00' : secondsToTime(duration);
|
||||
this.rating = rating;
|
||||
this.starred = starred;
|
||||
this.suffix = suffix;
|
||||
this.specs = specs;
|
||||
this.url = url;
|
||||
this.position = position;
|
||||
this.selected = false;
|
||||
this.playing = false;
|
||||
this.description = description;
|
||||
this.displayName = this.name + " - " + this.album + " - " + this.artist;
|
||||
};
|
||||
});
|
||||
|
||||
JamStash.service('notifications', function ($rootScope, globals) {
|
||||
JamStash.service('notifications', function ($rootScope, globals) {
|
||||
var msgIndex = 1;
|
||||
this.updateMessage = function (msg, autohide) {
|
||||
if (msg != '') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue