2019-01-10 15:39:37 +03:00
|
|
|
define([], function () {
|
|
|
|
'use strict';
|
2018-10-23 01:05:09 +03:00
|
|
|
|
|
|
|
function getStaticBackdrops() {
|
|
|
|
var list = [];
|
2019-01-10 15:39:37 +03:00
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg1-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg2-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg3-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg4-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg5-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg6-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg7-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg8-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg9-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg10-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg11-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg12-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg13-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg14-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
list.push([
|
|
|
|
{
|
|
|
|
url: 'https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/images/wallpaper/bg15-1920.jpg',
|
|
|
|
width: 1920
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
return list;
|
2018-10-23 01:05:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
function getRandomInt(min, max) {
|
2019-01-10 15:39:37 +03:00
|
|
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
2018-10-23 01:05:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
function getRandomImageUrl() {
|
|
|
|
var images = getStaticBackdrops();
|
2019-01-10 15:39:37 +03:00
|
|
|
var index = getRandomInt(0, images.length - 1);
|
|
|
|
return images[index][0].url;
|
2018-10-23 01:05:09 +03:00
|
|
|
}
|
2019-01-10 15:39:37 +03:00
|
|
|
|
2018-10-23 01:05:09 +03:00
|
|
|
return {
|
|
|
|
getStaticBackdrops: getStaticBackdrops,
|
|
|
|
getRandomImageUrl: getRandomImageUrl
|
2019-01-10 15:39:37 +03:00
|
|
|
};
|
2018-10-23 01:05:09 +03:00
|
|
|
});
|