<commit_before>(function () {
  'use strict';

  angular
    .module('flexget.plugins.series')
    .component('seriesShow', {
      templateUrl: 'plugins/series/components/series-show/series-show.tmpl.html',
      controllerAs: 'vm',
      controller: seriesShowController,
      bindings: {
        show: '<',
        forgetShow: '&'
      },
    });

    function seriesShowController($state, $mdDialog, $http) {
      var vm = this;

      vm.gotoEpisodes = function() {
        $state.go('flexget.episodes', { id: vm.show.show_id });
      };

      //Dialog for the update possibilities, such as begin and alternate names
      function showDialog(params) {
        return $mdDialog.show({
          controller: 'seriesUpdateController',
          controllerAs: 'vm',
          templateUrl: 'plugins/series/components/series-update/series-update.tmpl.html',
          locals: {
            showId: vm.show.show_id,
            params: params
          }
        });
      }

      function loadMetadata() {
        $http.get('/api/tvdb/series/' + vm.show.show_name)
          .success(function(data) {
            vm.metadata = data;
          })
      }<commit_msg>Added caching to series metadata<commit_after>(function () {
  'use strict';

  angular
    .module('flexget.plugins.series')
    .component('seriesShow', {
      templateUrl: 'plugins/series/components/series-show/series-show.tmpl.html',
      controllerAs: 'vm',
      controller: seriesShowController,
      bindings: {
        show: '<',
        forgetShow: '&'
      },
    });

    function seriesShowController($state, $mdDialog, $http) {
      var vm = this;

      vm.gotoEpisodes = function() {
        $state.go('flexget.episodes', { id: vm.show.show_id });
      };

      //Dialog for the update possibilities, such as begin and alternate names
      function showDialog(params) {
        return $mdDialog.show({
          controller: 'seriesUpdateController',
          controllerAs: 'vm',
          templateUrl: 'plugins/series/components/series-update/series-update.tmpl.html',
          locals: {
            showId: vm.show.show_id,
            params: params
          }
        });
      }

      function loadMetadata() {
        $http.get('/api/tvdb/series/' + vm.show.show_name, { cache: true })
          .success(function(data) {
            vm.metadata = data;
          })
      }
{'fraction_non_alphanumeric': 0.13372582001682085, 'fraction_numerical': 0.0, 'mean_word_length': 2.085603112840467, 'pattern_counts': {'":': 0, '<': 5, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6891992', 'n_tokens_mistral': 687, 'n_tokens_neox': 678, 'n_words': 126}