-
Notifications
You must be signed in to change notification settings - Fork 640
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
NW.js to Electron.js migration #894
Conversation
…, load vendors using npm
When this is done, can we finally stop using sc-redirect.herokuapp.com?
|
and use what @wb9688 ? |
I don't know, the authentication part that's currently in Soundnode always looked like a hack to me… |
It is a hack.. but there is no other way because Soundcloud expect the third party to have a domain. |
…uthenticated, wip
I came here to look at what's being done, but the changes are cluttered by a huge amount of style changes. Is there a reason these are included in this particular PR? |
@bardiharborow I updated the |
- All nw.js references are now replaced - Angular app can bootstrap - Code refactoring was done to get modules loading correctly. - Replace custom window management to a third party module removing the need to do it "manually".
- Remove all grunt tasks - Add npm script tasks - Remove jshint since eslint is being used
- Fix window/app action buttons - Improve webpack config
@wb9688 @Pitros @jakejarrett It's all migrated but would be nice if any of you could test it out. Here are the files for Mac, Win and Linux https://www.dropbox.com/sh/vkyq4jbr9ol1mpg/AABHzCFPoFHes8G_Y5k2Fy9Va?dl=0 (the rate limit is being reached pretty easily this days though so you might have issues playing tracks) To build locally you just need to run that's it. thanks. |
@weblancaster on linux build, i am unable to use some custom shortcuts that were previously present (Scaling & devtools) |
@weblancaster: I'll try it when I've time, but I can always manually set
the API keys in the localStorage to my own ones…
|
@jakejarrett hm yeah I removed some shortcuts and did not notice, I'm going to add back once I get a chance. |
@wb9688 @Pitros @jakejarrett I have updated the build on dropbox if you are not building locally. @jakejarrett the scale down/up works normally on mac |
@weblancaster I just tried the Win build but I can't seem to be able to login. It just shows a white rectangle popup along with another white box popup saying "This popup should automatically close in a few seconds" after entering my SC account details. |
@SW1FT I'm going to check here |
@wb9688 I will let you know when I get home from school. Give me about 2hrs |
@jakejarrett I will give That a try when I get home from school |
@Legitgamer264 try log out and then log back in. The |
@weblancaster I am able to get the Minimize, X, and settings, etc buttons to appear. But I still can't play any track. Is this still because of the API? It's been a few days since I was able to play a track |
@Legitgamer264: Soundnode doesn't use the const fs = require('fs');
const userConfig = JSON.parse(fs.readFileSync(`${__dirname}/userConfig.json`, 'utf-8'));
// set window access token
window.scAccessToken = userConfig.accessToken;
// set window clientId
window.scClientId = userConfig.clientId Which means there's a Btw don't share your Access Token, because then everyone is able to log in as you… |
@Legitgamer264 yes usually by 3pm CST Soundnode reached the API limit already so then just in the next day. Weekends not as much people use so you will be able to use for longer (mostly during the mornings and beginning of the afternoon). |
@weblancaster: Can you make |
@wb9688 good point.. going to do that today. thanks. |
@wb9688 do you have any idea when your python script will be fixed to work with the electron build? |
@Legitgamer264 try changing the |
@weblancaster I got it to work. But you have to also change app/public/js/system/userConfig.json, and put in the AccessToken and ClientId in that file too. That along with changing the clientID in main.js will work |
@Legitgamer264 I'm adding the You can take a look here https://github.com/Soundnode/soundnode-app/blob/electron-migration/main.js#L73 |
#923), remove not in use code, improve ngDialog styles, fix js error on showMoreDirective.
I have pushed new commits so if anyone wants to test please pull latest. thanks. |
I will pull the latest when I get home |
@weblancaster When I logged out and went to sign back in, I get this window - http://i.imgur.com/pw3JiNP.png |
@wb9688 so what would the script be to get the clientID and accessToken for the electron build? since that is the one I am using at this time |
@Legitgamer264: The Python script is always the same, because it just gets some tokens from SoundCloud, but the place where you need to paste the tokens is different in this Electron build, I haven't yet had the time to look at the Electron build, so you should ask @weblancaster where to place them, btw tomorrow I'll _probably_ make a patch for the Electron build à la my patch for the "old" Soundnode…
|
@wb9688 thank you. I have ran the script and copied the access token and clientID into the userConfig, and I changed the clientID in the main.js file too but whenever I package the app up and then run the exe, I still get the API limit error. idk what I am doing wrong |
@Legitgamer264: The errors show a Client ID in the URLs, is that one the same as the one you just copied from my Python script? |
@wb9688 I am using the same clientID that I get from your script. Same with the access token. I put the accessToken and ClientID in the userConfig located in (for me) soundnode-app\dist\Soundnode\Soundnode-win32-x64\resources\app\app\public\js\system |
@weblancaster I think I found the issue on why the clientID and accesstokens that I get from the python script aren't working. I tried the build on my laptop, before the update on 12/19, and I was able to play songs just fine. But when I pulled the latest electron from today, that is when I got the API limit error. I am not sure which of the changes that were made that caused it to not work. But I know its the latest update from today that is causing it. I am pretty sure of that. |
Pretty sure it's just the keys that are limited because of the number of
plays. Nothing to do with Electron or NW
…On Tue, Dec 20, 2016 at 12:20 AM Legitgamer264 ***@***.***> wrote:
@weblancaster <https://github.com/weblancaster> I think I found the issue
on why the clientID and accesstokens that I get from the python script
aren't working. I tried the build on my laptop, before the update on 12/19,
and I was able to play songs just fine. But when I pulled the latest
electron from today, that is when I got the API limit error. I am not sure
which of the changes that were made that caused it to not work. But I know
its the latest update from today that is causing it. I am pretty sure of
that
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#894 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABT29Ml-XAS1adixRgyhblT6eBavBV0kks5rJxFXgaJpZM4KXUs8>
.
|
…t when token is expired.
Merging this work in master since soon or later that will happen and we are not changing anything in master. |
Master has latest fixes which I'm going to release a test version tonight for anyone who is interested. Or just build from master if you don't want/need to wait for me to release. |
I might be forgetting something so I'm going to add as I go.