<commit_before>'use strict';

// Make sure that we have the necessary files created when
// we run the application (e.g. for the first time or if
// the user accidentally deleted the "cache" folder).
const Paths = require('./app/paths');

// > For folders.
['user', 'covers', 'playlists'].forEach((folder) => {
  if (!Paths.exists(folder))
    Paths.mkdir(folder);
});

// > For the "Listen later" and "YouTube History" playlist files.
if (!Paths.exists('listen_later'));
  Paths.touchPlaylistFile('listen_later');
if (!Paths.exists('youtube_history'));
  Paths.touchPlaylistFile('youtube_history');

// Start the Electron "popote".
const electron       = require('electron');
const app            = electron.app;           // Module to control application life.
const BrowserWindow  = electron.BrowserWindow; // Module to create browser window.
const globalShortcut = electron.globalShortcut;

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
var mainWindow = null;

// Quit when all windows are closed.
app.on('window-all-closed', function() {
  // On OS X it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform != 'darwin')
    app.quit();

  globalShortcut.unregisterAll();
});
<commit_msg>Fix reset of the YouTube history and "Listen later" at boot<commit_after>'use strict';

// Make sure that we have the necessary files created when
// we run the application (e.g. for the first time or if
// the user accidentally deleted the "cache" folder).
const Paths = require('./app/paths');

// > For folders.
['user', 'covers', 'playlists'].forEach((folder) => {
  if (!Paths.exists(folder))
    Paths.mkdir(folder);
});

// > For the "Listen later" and "YouTube History" playlist files.
if (!Paths.exists('listen_later'))
  Paths.touchPlaylistFile('listen_later');
if (!Paths.exists('youtube_history'))
  Paths.touchPlaylistFile('youtube_history');

// Start the Electron "popote".
const electron       = require('electron');
const app            = electron.app;           // Module to control application life.
const BrowserWindow  = electron.BrowserWindow; // Module to create browser window.
const globalShortcut = electron.globalShortcut;

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
var mainWindow = null;

// Quit when all windows are closed.
app.on('window-all-closed', function() {
  // On OS X it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform != 'darwin')
    app.quit();

  globalShortcut.unregisterAll();
});

{'fraction_non_alphanumeric': 0.1225071225071225, 'fraction_numerical': 0.0, 'mean_word_length': 3.8347676419965575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4339345', 'n_tokens_mistral': 779, 'n_tokens_neox': 754, 'n_words': 300}