diffuse icon indicating copy to clipboard operation
diffuse copied to clipboard

Suggestion: MEGA cloud-storage support

Open icidasset opened this issue 5 years ago • 7 comments

https://mega.io/ Not immediately clear if possible.

icidasset avatar Jan 24 '21 18:01 icidasset

@icidasset It's been a couple of years since the Mega.nz player was written https://play.google.com/store/apps/details?id=com.media.library

master255 avatar Sep 24 '21 09:09 master255

Seems to be possible, hard to tell with the documentation focusing on the C++ SDK. There's a bit of info available at https://mega.nz/doc (see "under the hood")

One thing that might be difficult is the login sessions, but maybe the prepare function can deal with that. Sadly it's not immediately clear what a REST API request should look like.

icidasset avatar Jul 22 '22 17:07 icidasset

@icidasset And a decentralized player has already been written, too. There is no need to write a second one.

master255 avatar Jul 22 '22 19:07 master255

More research.

  • https://github.com/AlttiRi/meganz-api
  • https://github.com/linuxenko/mega.js/blob/master/api.js
  • https://github.com/topac/rmega

Things I think that should happen:

  • Login with username and password
  • Decode private key from response
  • Generate session token based on private key?
  • New session token for each request?
  • Use https://g.api.mega.co.nz/cs?id=135132513532&ak=APP_KEY&node_id=NODE_ID endpoint where node id is the id in the url you can find in the official UI?

Example of auth: https://github.com/topac/rmega/blob/master/lib/rmega/session.rb#L116

icidasset avatar Feb 05 '23 14:02 icidasset

Is there any update on support for MEGA? Would love this as for the 20GB free tier in MEGA.

vyoln avatar Jan 04 '24 22:01 vyoln

@vyoln iOS player with mega support: evermusic

loudsven avatar Jan 05 '24 07:01 loudsven

Is there any update on support for MEGA? Would love this as for the 20GB free tier in MEGA.

@vyoln I don’t really have time to work on it right now, but hopefully soon.

I still don’t fully know how to implement it though, so if anyone can point at any source code from other apps that’d be helpful. I should also point out that Diffuse needs to play according to the browser’s CORS rules so the implementation might not be as straightforward as in some other native apps (eg. evermusic).

icidasset avatar Jan 05 '24 09:01 icidasset