<commit_before>;(function () {
  /**
   * Media info manager.
  */
  function _MediaInfo () {
    this.vue = new App.Vue({
      el: '.popup .mediainfo-pop',
      data: {
        info: {}
      }
    })
  }

  /**
   * Get media info from the server.
   * @param {string} title - Media title.
  */
  _MediaInfo.prototype.get = function (title) {
    var self = this
    title = App.Format.name(title)
    if (App.Storage.readData(title) != null) {
      self.vue.$data.info = App.Storage.readData(title)
    } else {
      $.post('/info-d', {
        type: self.getType(title),
        query: title
      }, function (data) {
        data = JSON.parse(data)
        self.vue.$data.info = data
        App.Storage.storeData(data.query.toLowerCase(), data)
        self.show()
      })
    }
  }

  /**
   * Display the mediainfo popup
  */
  _MediaInfo.prototype.show = function () {
    var self = this
    $.popupjs.init({
      pos: {
        x: null,
        y: '5%'
      },
      width: '50%',
      height: '90%',
      title: self.vue.$data.info.title,
      html: $('.popup .mediainfo-pop'),
      closeBut: true
    })
    $.popupjs.draw()
  }

  /**
   * Get type of the media (tvshow / movie).
   * @param {string} title - Media title.
   * @return {string} - Type of the media (films / series)
  */
  _MediaInfo.prototype.getType = function (title) {
    title = title.toLowerCase()
    var regex = /s[0-9^e]*e[0-9]/
    if (title.search(regex) === -1) {
      return 'films'
    } else {
      return 'series'
    }
  }
  App.MediaInfo = new _MediaInfo()
})()
<commit_msg>setup show<commit_after>;(function () {
  /**
   * Media info manager.
  */
  function _MediaInfo () {
    this.vue = new App.Vue({
      el: '.popup .mediainfo-pop',
      data: {
        info: {}
      }
    })
  }

  /**
   * Get media info from the server.
   * @param {string} title - Media title.
  */
  _MediaInfo.prototype.get = function (title) {
    var self = this
    var type = self.getType(title)
    title = App.Format.name(title)
    var data = App.Storage.readData(title)
    if (data != null) {
      self.vue.$data.info = data
      setTimeout(function(){self.show()}, 1000)
    } else {
      $.post('/info-d', {
        type: type,
        query: title
      }, function (data) {
        data = JSON.parse(data)
        console.log(data)
        self.vue.$data.info = data
        App.Storage.storeData(data.query.toLowerCase(), data)
        self.show()
      })
    }
  }

  /**
   * Display the mediainfo popup
  */
  _MediaInfo.prototype.show = function () {
    var self = this
    $.popupjs.init({
      pos: {
        x: null,
        y: '5%'
      },
      width: '50%',
      height: '90%',
      title: self.vue.$data.info.title,
      html: $('.popup .mediainfo-pop'),
      closeBut: true
    })
    $.popupjs.draw()
  }

  /**
   * Get type of the media (tvshow / movie).
   * @param {string} title - Media title.
   * @return {string} - Type of the media (films / series)
  */
  _MediaInfo.prototype.getType = function (title) {
    title = title.toLowerCase()
    var regex = /s[0-9^e]*e[0-9]/
    if (title.search(regex) === -1) {
      return 'films'
    } else {
      return 'series'
    }
  }
  App.MediaInfo = new _MediaInfo()
})()

{'fraction_non_alphanumeric': 0.16533742331288342, 'fraction_numerical': 0.007361963190184049, 'mean_word_length': 1.8935226264418812, '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': '1661026', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1122, 'n_words': 248}