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.
Ombi/RequestPlex.UI/Content/site.js

44 lines
1.0 KiB

function generateNotify(message, type) {
// type = danger, warning, info, successs
$.notify({
// options
message: message
}, {
// settings
type: type
});
}
function buildMovieContext(result) {
var date = new Date(result.releaseDate);
var year = date.getFullYear();
var context = {
posterPath: result.posterPath,
id: result.id,
title: result.title,
overview: result.overview,
voteCount: result.voteCount,
voteAverage: result.voteAverage,
year: year,
type: "movie"
};
return context;
}
function buildTvShowContext(result) {
var date = new Date(result.firstAirDate);
var year = date.getFullYear();
var context = {
posterPath: result.posterPath,
id: result.id,
title: result.name,
overview: result.overview,
voteCount: result.voteCount,
voteAverage: result.voteAverage,
year: year,
type: "tv"
};
return context;
}