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

[RFC]feat: Implement google play music #315

Open
wants to merge 6 commits 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ volumio-plugins.iml
.idea/modules.xml
.idea/vcs.xml
.idea/workspace.xml
node_modules/
8 changes: 8 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"node": true,
"validthis": true,
"undef": true,
"globals": {
"nodetools": false
}
}
1 change: 1 addition & 0 deletions plugins/music_service/googleplaymusic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This plugin/project is not endorsed by of affiliated with Google in any way.
96 changes: 96 additions & 0 deletions plugins/music_service/googleplaymusic/UIConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"login": {
"page": {
"label": "Google Play Music"
},
"sections": [
{
"id": "section_account",
"element": "section",
"label": "Importatn Login Information",
"description": "You can use your google password to login here. You can also use one time password, that is called app password by google. You can provide app password instead of your normal password.",
"icon": "fa-user"
},
{
"id": "section_account",
"label": "Some info for Volumio's Play Music Access:",
"element": "section",
"content": [
{
"id": "turnOnLessSecureApp",
"element": "button",
"label": "Go to Google Setting Page.",
"description": "To get Play Music Access for Volumio, The Google account needs to have the 'Allow less secure apps' setting set to 'ON'. To turn it on click 'Go to Google Setting page'",
"onClick": {
"type": "openUrl",
"url": "https://myaccount.google.com/security#connectedapps"
}
},
{
"id": "appPasswordLink",
"element": "button",
"label": "Create a app password",
"description": "Please go to this link and get a app password(Kind of otp for application access) for Volumio, by providing app name 'Volumio'.",
"onClick": {
"type": "openUrl",
"url": "https://myaccount.google.com/u/2/apppasswords?utm_source=google-account&utm_medium=web"
}
}
]
},
{
"id": "section_account",
"label": "Play Music Access:",
"element": "section",
"onSave": {
"type": "controller",
"endpoint": "music_service/googleplaymusic",
"method": "saveGoogleAccount"
},
"saveButton": {
"label": "TRANSLATE.LOGIN",
"data": ["email", "password", "bitrate"]
},
"content": [
{
"id": "email",
"type": "text",
"element": "input",
"doc": "This is the email id of your Google account",
"label": "Email",
"value": ""
},
{
"id": "password",
"type": "password",
"element": "input",
"doc": "This is the password/app password for Volumio of your Google account",
"label": "Password",
"value": ""
}
]
}
]
},
"logout": {
"page": {
"label": "Google Play Music"
},
"sections": [
{
"id": "section_account",
"label": "Play Music Access:",
"element": "section",
"onSave": {
"type": "controller",
"endpoint": "music_service/googleplaymusic",
"method": "logoutGoogleAccount"
},
"saveButton": {
"label": "Logout"
},
"content": []
}
]
}
}
19 changes: 19 additions & 0 deletions plugins/music_service/googleplaymusic/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"enabled": {
"type": "boolean",
"value": true
},
"username": {
"type": "string",
"value": ""
},
"password": {
"type": "string",
"value": ""
},
"bitrate": {
"type": "boolean",
"value": true
}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions plugins/music_service/googleplaymusic/i18n/strings_en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"PLUGIN_CONFIGURATION": "Example Plugin Configuration",
"LOGIN": "Log In"
}
Loading