diff options
Diffstat (limited to 'js/controller/ContentController.js')
-rw-r--r-- | js/controller/ContentController.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/js/controller/ContentController.js b/js/controller/ContentController.js index c5af2c6a5..dfee837d5 100644 --- a/js/controller/ContentController.js +++ b/js/controller/ContentController.js @@ -9,7 +9,7 @@ */ app.controller('ContentController', function (Publisher, FeedResource, ItemResource, SettingsResource, data, - $route, $routeParams, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading) { + $route, $routeParams, $location, FEED_TYPE, ITEM_AUTO_PAGE_SIZE, Loading) { 'use strict'; ItemResource.clear(); @@ -152,10 +152,11 @@ function (Publisher, FeedResource, ItemResource, SettingsResource, data, var oldestFirst = getOrdering(); var showAll = SettingsResource.get('showAll'); var self = this; + var search = $location.search().search; Loading.setLoading('autopaging', true); - ItemResource.autoPage(type, id, oldestFirst, showAll) + ItemResource.autoPage(type, id, oldestFirst, showAll, search) .success(function (data) { Publisher.publishAll(data); @@ -190,4 +191,14 @@ function (Publisher, FeedResource, ItemResource, SettingsResource, data, $route.reload(); }; + this.getMediaType = function (type) { + if (type && type.indexOf('audio') === 0) { + return 'audio'; + } else if (type && type.indexOf('video') === 0) { + return 'video'; + } else { + return undefined; + } + }; + });
\ No newline at end of file |