<commit_before>angular.module('Frosch')
    .controller('InicioCtrl', function ($scope, $state, hotkeys, config, $sce, $http, $interval) {

        $scope.iniciar = function () {
            $state.go('jugar.seleccionEquipos');
        };

        hotkeys.bindTo($scope)
            .add({
                combo: 'enter',
                description: 'Iniciar',
                callback: $scope.iniciar
            });

        $scope.videos = [];

        function cargarVideo(numero) {
            var videoURL = 'assets/videos/video' + numero + '.webm';
            $http.head(videoURL)
                .success(function () {
                    $scope.videos.push([{
                        src: $sce.trustAsResourceUrl(videoURL),
                        type: "video/webm"
                    }]);
                    cargarVideo(numero + 1);
                });
        }

        cargarVideo(1);

        var timerVideo = $interval( function () {
            $scope.mostrandoVideo = true;
            $scope.numVideo = Math.floor(Math.random() * ($scope.videos.length))
        }, config.configuracion.minutosEntreVideos * 60 * 1000);


        $scope.quitarVideo = function(){
            $scope.mostrandoVideo = false;
        };

        $scope.$on('$destroy', function () {
            $interval.cancel(timerVideo);
        })
    });<commit_msg>Verificación de que haya en realidad videos<commit_after>angular.module('Frosch')
    .controller('InicioCtrl', function ($scope, $state, hotkeys, config, $sce, $http, $interval) {

        $scope.iniciar = function () {
            $state.go('jugar.seleccionEquipos');
        };

        hotkeys.bindTo($scope)
            .add({
                combo: 'enter',
                description: 'Iniciar',
                callback: $scope.iniciar
            });

        $scope.videos = [];

        function cargarVideo(numero) {
            var videoURL = 'assets/videos/video' + numero + '.webm';
            $http.head(videoURL)
                .success(function () {
                    $scope.videos.push([{
                        src: $sce.trustAsResourceUrl(videoURL),
                        type: "video/webm"
                    }]);
                    cargarVideo(numero + 1);
                });
        }

        cargarVideo(1);

        var timerVideo = $interval( function () {
            if($scope.videos) {
                $scope.mostrandoVideo = true;
                $scope.numVideo = Math.floor(Math.random() * ($scope.videos.length));
            }
        }, config.configuracion.minutosEntreVideos * 60 * 1000);


        $scope.quitarVideo = function(){
            $scope.mostrandoVideo = false;
        };

        $scope.$on('$destroy', function () {
            $interval.cancel(timerVideo);
        })
    });
{'fraction_non_alphanumeric': 0.1382636655948553, 'fraction_numerical': 0.0057163272597356195, 'mean_word_length': 1.5022341376228776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7631702', 'n_tokens_mistral': 848, 'n_tokens_neox': 777, 'n_words': 123}