
In order to better follow the google naming convention. See https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub
52 lines
No EOL
1.8 KiB
JavaScript
52 lines
No EOL
1.8 KiB
JavaScript
'use strict';
|
|
|
|
var jamstash = angular.module('JamStash');
|
|
|
|
jamstash.service('model', function (utils) {
|
|
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' : utils.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;
|
|
};
|
|
}); |