PageSourceSearch

https://www.1091.tv/js/controllers/genre.js

js 1091.tv collected 2026-10-02 10:30:58 UTC 1,943 bytes, 43 lines download raw bytes

1angular.module('orchard').controller('GenreController',['$scope', '$routeParams', '$location', '$http', 'flash', 'ImagesService',
2    function($scope, $routeParams, $location, $http, flash, ImagesService){
3        $scope.myInterval = -1;
4        $scope.genre = $location.url().split("/").pop();
5        $scope.genreFound = undefined;
6        var genreMatch= _.find(window.genresMapping,function(genre){
7            if(genre.url===$scope.genre){
8                return true;
9            }
10        });
11
12        if(genreMatch) {
13            $scope.genreTitle = genreMatch.description;
14            window.document.title = "1091 Pictures: " + $scope.genreTitle + " Films";
15        } else {
16            $scope.genreTitle = "";
17            window.document.title = "1091 Pictures: " + $scope.genre + " Films";
18        }
19
20        $http({method: 'GET', url: window.cmsUrl + '/public/categories/'+ $scope.genre}).
21            success(function(data, status, headers, config) {
22                _.each(data.videos, ImagesService.setPosterImageUrls);
23                $scope.mainCategory = data.videos;
24                $scope.subCategories = data.subCategories;
25                _.each(data.subCategories, loadSubCategory);
26                $scope.genreFound = true;
27            }).
28            error(function(data, status, headers, config) {
29                console.log('ERROR:'  + data);
30                $scope.genreFound = false;
31            });
32
33        function loadSubCategory(category) {
34            $http({method: 'GET', url: window.cmsUrl + '/public/categories/' + category.code }).
35                success(function(data, status, headers, config) {
36                    category.videos = data.videos;
37                    _.each(category.videos, ImagesService.setPosterImageUrls);
38                }).
39                error(function(data, status, headers, config) {
40                    console.log('ERROR:'  + data);
41                });
42        }
43    }]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.