diff --git a/app/data/config.db b/app/data/config.db index 61b1030..db2a6cc 100644 --- a/app/data/config.db +++ b/app/data/config.db @@ -1,9 +1,9 @@ -{"type":"win-state","maxed":false,"position":[372,72],"size":[1226,845],"_id":"0"} +{"type":"win-state","maxed":false,"position":[262,25],"size":[1280,984],"_id":"0"} {"type":"trackers","url":"https://newtrackon.com/api/stable","trackers":["http://tracker.tfile.me:80/announce","udp://tracker.torrent.eu.org:451/announce","udp://thetracker.org:80/announce","http://torrent.nwps.ws:80/announce","http://alpha.torrenttracker.nl:443/announce","http://0d.kebhana.mx:443/announce","udp://bt.xxx-tracker.com:2710/announce","udp://inferno.demonoid.pw:3418/announce","udp://tracker.justseed.it:1337/announce","udp://tracker.vanitycore.co:6969/announce","udp://open.stealth.si:80/announce","udp://tracker.coppersurfer.tk:6969/announce","udp://tracker.opentrackr.org:1337/announce","udp://tracker.cypherpunks.ru:6969/announce","udp://tracker.tiny-vps.com:6969/announce","http://retracker.mgts.by:80/announce","udp://retracker.lanta-net.ru:2710/announce","udp://public.popcorn-tracker.org:6969/announce","http://tracker.skyts.net:6969/announce","udp://ipv4.tracker.harry.lu:80/announce","http://tracker.city9x.com:2710/announce","udp://tracker.martlet.tk:6969/announce","http://retracker.telecom.by:80/announce","udp://9.rarbg.com:2710/announce"],"_id":"1"} -{"type":"search","rs_count":100,"smart":true,"inst":false,"useAC":false,"history":[],"_id":"2"} -{"type":"dump","updURL":"http://127.0.0.1/tpb/torrent_dump_full.csv.gz","updLast":"2018-04-23T16:44:44.000Z","updType":"off","updInt":20,"keepDL":true,"updStat":["complete","",""],"_id":"3"} -{"type":"gen","sysTray":false,"logToFile":false,"useDHT":true,"supMsg":"2018-05-24T19:09:11.635Z","confVer":"1.0","_id":"4"} -{"type":"etc","thmURL":"https://www.google.com/search?q=OfflineBay%20themes","appUpdURL":"https://raw.githubusercontent.com/techtacoriginal/ob_release/master/release.json","_id":"5"} -{"type":"win-state","maxed":false,"position":[362,77],"size":[1240,826],"_id":"0"} -{"type":"win-state","maxed":false,"position":[362,77],"size":[1240,826],"_id":"0"} -{"type":"search","rs_count":100,"smart":true,"inst":false,"useAC":false,"history":[],"_id":"2"} +{"type":"search","rs_count":100,"smart":true,"inst":false,"useAC":true,"history":[],"_id":"2"} +{"type":"dump","updURL":"https://thepiratebay.org/static/dump/csv/torrent_dump_full.csv.gz","updLast":"2003-01-01T00:00:00.000Z","updType":"notify","updInt":10,"keepDL":true,"updStat":["complete","",""],"_id":"3"} +{"type":"gen","sysTray":true,"logToFile":true,"useDHT":true,"supMsg":"2018-06-01T05:03:08.261Z","confVer":"1.0","_id":"4"} +{"type":"etc","thmURL":"https://github.com/techtacoriginal/offlinebay-themes","appUpdURL":"https://raw.githubusercontent.com/techtacoriginal/ob_release/master/release.json","_id":"5"} +{"type":"win-state","maxed":false,"position":[262,25],"size":[1280,984],"_id":"0"} +{"type":"win-state","maxed":false,"position":[262,25],"size":[1280,984],"_id":"0"} +{"type":"search","rs_count":100,"smart":true,"inst":false,"useAC":true,"history":[],"_id":"2"} diff --git a/app/main.js b/app/main.js index 69aa6c5..7f7df2c 100644 --- a/app/main.js +++ b/app/main.js @@ -558,7 +558,13 @@ function showSplash() { // Create the main window and handle events function startOB() { - let curScreen = electron.screen.getDisplayNearestPoint({x: prefs.position[0], y: prefs.position[1]}); + let curScreen; + + if (prefs.position[0] !== null && prefs.position[1] !== null) { + curScreen = electron.screen.getDisplayNearestPoint({x: prefs.position[0], y: prefs.position[1]}); + } else { + curScreen = electron.screen.getPrimaryDisplay(); + } if (prefs.size[0] > curScreen.workAreaSize.width) { prefs.size[0] = curScreen.workAreaSize.width;