Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgraded to electron 1.4.12 #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Playback-win32.zip
Playback.app
Playback.app.zip
.DS_Store
debug.log
17 changes: 6 additions & 11 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#!/usr/bin/env electron

var app = require('app')
var BrowserWindow = require('browser-window')
var path = require('path')
var ipc = require('electron').ipcMain
var dialog = require('dialog')
var shell = require('shell')
var powerSaveBlocker = require('electron').powerSaveBlocker
var globalShortcut = require('electron').globalShortcut
const
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this, much appreciated.

Can you follow the code patterns that's already being used. Mainly that we use var and not const/let.

path = require('path'),
{ app, BrowserWindow, dialog, ipcMain, powerSaveBlocker, globalShortcut, shell } = require('electron');

var ipc = ipcMain
var win
var link
var ready = false
Expand All @@ -27,14 +23,13 @@ var onopen = function (e, lnk) {
app.on('open-file', onopen)
app.on('open-url', onopen)

var frame = process.platform === 'win32'

app.on('ready', function () {

win = new BrowserWindow({
title: 'playback',
width: 860,
height: 470,
frame: frame,
frame: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What has changed since you removed the platform check?

show: false,
transparent: true
})
Expand Down
12 changes: 4 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const {remote, ipcRenderer} = require('electron');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const -> var

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and no ; :)

const {Menu, MenuItem, clipboard} = remote;
var request = require('request')
var drop = require('drag-and-drop-files')
var mdns = require('multicast-dns')()
var concat = require('concat-stream')
var vtt = require('srt-to-vtt')
var ipc = require('electron').ipcRenderer
var remote = require('remote')
var Menu = remote.require('menu')
var MenuItem = remote.require('menu-item')
var ipc = ipcRenderer
var http = require('http')
var rangeParser = require('range-parser')
var pump = require('pump')
Expand All @@ -18,7 +17,6 @@ var network = require('network-address')
var chromecasts = require('chromecasts')()
var $ = require('dombo')
var titlebar = require('titlebar')()
var clipboard = require('clipboard')
var player = require('./player')
var playlist = require('./playlist')
var mouseidle = require('./mouseidle')
Expand Down Expand Up @@ -54,9 +52,7 @@ $(document).on('paste', function (e) {
var media = player($('#player')[0])
var list = playlist()

if (process.platform !== 'win32') {
titlebar.appendTo('#titlebar')
}
titlebar.appendTo('#titlebar')

drop($('body')[0], function (files) {
for (var i = 0; i < files.length; i++) {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
"ytdl-core": "^0.5.1"
},
"devDependencies": {
"electron-packager": "^5.1.1",
"electron-prebuilt": "0.35.4"
"electron-packager": "^8.4.0",
"electron-prebuilt": "1.4.12"
},
"bin": {
"playback": "./app.js"
},
"scripts": {
"rebuild": "npm rebuild --runtime=electron --target=0.35.4 --disturl=https://atom.io/download/atom-shell",
"rebuild": "npm rebuild --runtime=electron --target=1.4.12 --disturl=https://atom.io/download/atom-shell",
"start": "electron app.js",
"dev": "electron app.js test.mp4",
"mac-bundle": "electron-packager . Playback --platform=darwin --arch=x64 --version=0.35.4 --ignore=node_modules/electron-prebuilt && cp info.plist Playback-darwin-x64/Playback.app/Contents/Info.plist && cp icon.icns Playback-darwin-x64/Playback.app/Contents/Resources/atom.icns",
"win-bundle": "electron-packager . Playback --platform=win32 --arch=ia32 --version=0.35.4 --icon=icon.ico",
"linux-64-bundle": "electron-packager . Playback --platform=linux --arch=x64 --version=0.35.4 ignore='node_modules/(electron-packager|electron-prebuilt)'"
"mac-bundle": "electron-packager . Playback --platform=darwin --arch=x64 --version=1.4.12 --ignore=node_modules/electron-prebuilt && cp info.plist Playback-darwin-x64/Playback.app/Contents/Info.plist && cp icon.icns Playback-darwin-x64/Playback.app/Contents/Resources/atom.icns",
"win-bundle": "electron-packager . Playback --platform=win32 --arch=ia32 --version=1.4.12 --icon=icon.ico",
"linux-64-bundle": "electron-packager . Playback --platform=linux --arch=x64 --version=1.4.12 ignore='node_modules/(electron-packager|electron-prebuilt)'"
},
"repository": {
"type": "git",
Expand Down