23

🎵 Yandex.Music Desktop (un-official port of website) — powered by Golang and Nod...

 4 years ago
source link: https://github.com/koddr/yandex-music-desktop
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

:musical_note: Yandex.Music Desktop (un-official port of website)

2ANrM3i.jpg!web

Please note:this is only desktop port of Yandex.Music website.

The author of this desktop port is not responsible for long support of this desktop application, because YANDEX LLC may changes the way it provides content and/or releases its own desktop application.

:thought_balloon: The Why?

y6jmaav.png!web

I love listen music and always want to do it as easy as possible. Concept of Yandex.Music service (web for desktop clients and app for mobile) are great, but not so really .

  • First (and most important): I would like to always keep application music app on hand while working at Mac/MacBook. Quickly click on the icon in macOS dock, open app, switch to another song and collapse again. At the same time, without opening a browser and not looking for the desired tab with Yandex.Music.
  • Second (and important too): my smartphone is always busy with other applications that use headphones with mic, like Skype, Zoom, Discord, mobile calls and so on. In order not to run into browser, look for a tab and pause music. Just took off these headphones and put on others!
  • Third (and no less important): as an active macOS user, I got used to native desktop apps for listening music (for example, built-in Apple iTunes) and place it on side-mode with another apps (like Telegram) on a separate workspace.

Therefore, I was very upset that Yandex.Music does not have a macOS (or Windows/Linux) desktop application... and created this port of the official Yandex.Music website! :wink:

:link: Download latest version:

GNU/Linux and MS Windows → comming as soon as possible.

⚙️ Under the hood

Since this is an open source project, you can easily see how it all actually works . The code is written with Go (Golang) 1.13.4 and using Go Modules .

Yandex.Music Desktop source code
package main

import "github.com/zserge/webview"

func main() {
	// Webview options:
	//  - name: Yandex.Music Desktop
	name := "Yandex.Music Desktop"
	//  - URL to login screen: https://passport.yandex.com/auth?...
	url := "https://passport.yandex.com/auth?origin=music_button-header&retpath=https%3A%2F%2Fmusic.yandex.com%2Fhome"
	//  - sizes: 800x800 px
	width := 800
	height := 800
	//  - resizable: true
	resizable := true

	// Let's open window app with options:
	webview.Open(name, url, width, height, resizable)
}

But all magic is done by absolutely awesome webview module by Serge Zaitsev .

More about webview module

A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Nim bindings, Haskell and C# bindings available.

It supports two-way JavaScript bindings (to call JavaScript from C/C++/Go and to call C/C++/Go from JavaScript).

It uses Cocoa/WebKit on macOS, gtk-webkit2 on Linux and MSHTML (IE10/11) on Windows.

Mbuya2V.png!web

Installation .dmg images for macOS was created by node-appdmg (many thx to Linus Unnebäck ).

For developers

  1. Clone this repository and go to folder yandex-music-desktop :
foo@bar:~$ git clone https://github.com/koddr/yandex-music-desktop.git
foo@bar:~$ cd yandex-music-desktop
  1. Change anything you want :ok_hand:
  2. Build app binary again (at this moment, only for macOS), it's required Go 1.13+:
foo@bar:~$ make build-macos
  1. Go to ./build folder and copy Yandex.Music Desktop.app to your /Applications :
foo@bar:~$ sudo cp -R ./build/Yandex.Music\ Desktop.app /Applications

(Optional) Create macOS installation images

  • Install node-appdmg (required Node.js and npm ):
foo@bar:~$ npm install -g appdmg
  • Create macOS installation image ( .dmg ):
foo@bar:~$ make installer-macos-10_4 # for macOS 10.4+
foo@bar:~$ make installer-macos-10_11 # for macOS 10.11+
  • You can found created image into ./releases folder.

For designers

At ./static/macOS folder you can found layered Adobe Photoshop source file ( .psd ) of macOS installation image: yamusic_desktop.background.psd ( CC0 1.0 Universal ).

:warning: Terms of Use of Yandex.Music

All logos, images and Yandex.Music service website — belong to their respective owners, namely YANDEX LLC.

If you download, install and run Yandex.Music Desktop application from current repository, you're already agree with official Terms of Use of Yandex.Music : EN , RU , BY , KZ .

Developers

Project assistance

If you want to say «thank you» or/and support active development Yandex.Music Desktop :

  1. Add a GitHub Star to project.
  2. Donate some money to project author via PayPal: @paypal.me/koddr .
  3. Join DigitalOcean at my referral link (your profit is $100 and I get $25).

Thanks for your support! :kissing_heart: Together, we make this project better every day.

License

Yandex.Music Desktop by Vic Shóstak is an open source software under MIT license.

Background image for macOS installer is designed by Vic Shóstak and under CC0 1.0 Universal license.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK