Add media metadata, provide default thumbnail

This commit is contained in:
2013-11-09 19:33:45 +00:00
parent 171538856a
commit ab3d91ecc0
5 changed files with 32 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

View File

@@ -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({

File diff suppressed because one or more lines are too long