How to use mirakurun - 3 common examples

To help you get started, we’ve selected a few mirakurun examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Chinachu / Chinachu / app-wui.js View on Github external
const child_process = require('child_process');
const url = require('url');
const querystring = require('querystring');
const vm = require('vm');
const os = require('os');
const zlib = require('zlib');
const events = require('events');
const http = require('http');
const https = require('https');
const auth = require('http-auth');
const socketio = require('socket.io');
const chinachu = require('chinachu-common');
const ip = require("ip");
const geoip = require('geoip-lite');
const mdns = require('mdns-js');
const mirakurun = new (require("mirakurun").default)();

// Directory Checking
if (!fs.existsSync('./data/') || !fs.existsSync('./log/') || !fs.existsSync('./web/')) {
	console.error('FATAL: Current working directory is invalid.');
	process.exit(1);
}

const apps = require("./processes.json").apps;

const WUI_LOG_FILE = !!process.env.pm_id ? apps[0].out_file : (__dirname + '/log/wui');
const OPERATOR_LOG_FILE = !!process.env.pm_id ? apps[1].out_file : (__dirname + '/log/operator');
const OPERATOR_PID_FILE = (() => {
	if (process.env.pm_id) {
		const jlist = JSON.parse(child_process.execSync("pm2 jlist"));
		const proc = jlist.find(_proc => _proc.name === "chinachu-operator");
		return proc.pm2_env.pm_pid_path;
github Chinachu / Chinachu / app-operator.js View on Github external
});

// 例外処理
process.on('uncaughtException', (err) => {
	console.error('uncaughtException: ' + err.stack);
});

// 追加モジュールのロード
const dateFormat = require('dateformat');
const mkdirp = require('mkdirp');
const Mtwitter = require('mtwitter');
const disk = require('diskusage');
const nodemailer = require("nodemailer");
const sendmail = require("nodemailer-sendmail-transport");
const chinachu = require('chinachu-common');
const mirakurun = new (require("mirakurun").default)();

//
let reserves = [];
let recorded = [];
let recording = [];

// 設定の読み込み
const pkg = require("./package.json");
const config = require(CONFIG_FILE);

// settings
const schedulerIntervalTime = 1000 * 60 * 10;// 最長10分毎
const notifyIntervalTime = 1000 * 60 * 60 * 3;// 3時間毎
const prepTime = 1000 * 15;// 15秒前
const recordingPriority = config.recordingPriority || 2;
const conflictedPriority = config.conflictedPriority || 1;
github Chinachu / Mirakurun-UI / app / main.js View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
"use strict";

const electron = require("electron");
const app = electron.app;
const settings = require("electron-settings");
const { autoUpdater } = require("electron-updater");
const isDev = require("electron-is-dev");
const Mirakurun = require("mirakurun").default;
const regexp = require("./regexp");
const pkg = require("../package.json");

const mirakurun = global.mirakurun = new Mirakurun();
mirakurun.userAgent = `${pkg.name}/${app.getVersion()}`;

const icon = {
    normal: electron.nativeImage.createFromPath(`${__dirname}/images/icon.png`),
    normal30: electron.nativeImage.createFromPath(`${__dirname}/images/icon30.png`),
    offline: electron.nativeImage.createFromPath(`${__dirname}/images/icon-gray.png`),
    active: electron.nativeImage.createFromPath(`${__dirname}/images/icon-active.png`)
};

autoUpdater.on("update-downloaded", () => {
    // Wait 5 seconds, then quit and install
    // In your application, you don't need to wait 5 seconds.
    // You could call autoUpdater.quitAndInstall(); immediately
    setTimeout(() => autoUpdater.quitAndInstall(), 5000);
});

mirakurun

DVR Tuner Server for Japanese TV.

Apache-2.0
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis

Popular mirakurun functions