Add media metadata, provide default thumbnail
This commit is contained in:
BIN
webui/static/img/movie-reel.jpg
Normal file
BIN
webui/static/img/movie-reel.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 MiB |
@@ -22,11 +22,21 @@ xbmc.factory('XbmcApi', function($resource) {
|
||||
);
|
||||
});
|
||||
|
||||
xbmc.filter('thumb', function() {
|
||||
return function(html) {
|
||||
return html.replace(/<thumb.*>(.*)<\/thumb>/, "$1");
|
||||
xbmc.directive('thumbnail', function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: '<img ng-src="{/url/}"></img>',
|
||||
link: function(scope, element, attrs, ctrl) {
|
||||
scope.url = '/static/img/movie-reel.jpg';
|
||||
if (attrs['source']) {
|
||||
url = $(scope.$eval(attrs['source'])).first().text();
|
||||
if (url) {
|
||||
scope.url = url;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
xbmc.controller('MovieCtrl', function ($scope, XbmcApi) {
|
||||
$scope.movies = XbmcApi.get({
|
||||
|
||||
2
webui/static/lib/angularui/js/ui-bootstrap-tpls-0.6.0.min.js
vendored
Normal file
2
webui/static/lib/angularui/js/ui-bootstrap-tpls-0.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user