Google Workspace Add-on to help translate Spotify® album track names and search within the artist's discography.
album.translate.mp4
Note: This is not an official Google or Spotify product.
These instructions will get you a copy of the project up and running on your Google account for development or personal use.
If you're already familiar with the clasp
utility and using it, you can skip to the next paragraph.
If you'd like to follow the add-on deployment instructions below, you'll need clasp
utility installed and authorized to the Google account where you intend to deploy this add-on. You can start with the installation, the instructions of which can be found here. Once you have clasp
installed, execute the following command to authorize it into
your Google account:
clasp login
Then, create and upload standalone App Script project:
-
Clone the repo and navigate to the directory.
-
Create a new project:
clasp create --type standalone --title "Album Translate for Spotify"
Note: You can modify the --title
argument value as you wish.
-
Push the code:
clasp push -f
Note: Alternatively, you can manually create Apps Script project and copy file contents from this repo to it.
-
Open the script project from your Google Drive.
-
Navigate to
Deploy
menu (blue button) in the Apps Script tab, chooseTest deployments
. -
Click
Install
button (at bottom-right corner) andDone
.
In order to use the add-on you'll need to create an app from Spotify developer dashboard. Once you've signed-in/up, click Create an app
and fill app Name
/Description
as preferred.
Note: Additionally, you can refer to official Spotify developer guide which comes with a few screenshots and might be more helpful.
After you successfully created the app:
-
Copy
Client ID
andClient Secret
values. -
Open the add-on from either Google
Drive
,Sheets
orDocs
tab. -
Optionally, mark the
Playback feature
checkbox. -
Paste copied values into the corresponding fields and click
Save
. -
Copy
Redirect URI
value from add-on and add to Spotify app settings. The latter can be accessed from developer dashboard, clickEdit Settings
. Make sure to save changes. -
Go back to add-on and click the
Authorize
button and follow the pop-up window. -
After authorization status message is displayed, you should close the pop-up window and refresh the add-on to navigate to its dashboard, and then you're all set.
The add-on currently supports two core functions, which, going forward, we'll refer to as Translate
and Search
features.
Translate
feature is supposed to be utilized when users need to translate all track names for a given album and display them in the add-on user GUI. You only need to insert an album URL in the translate field and click the Translate
button to display results.
This function utilizes Google Translate service which, so corresponding daily quota limits apply as listed here. Add-on tries to minimize translate calls by concatenating track names per album, however, sometimes this does not yield correct results and the add-on reverts back to translating each track name in the album one by one.
Note: Currently, this feature is set to target only English translation.
Search
feature is meant to be utilized when users want to search for a given track name in an artist's discography, which contains some albums listed in non-English language. You will need to provide an artist URL and track name to search for this function, however, it does not display results immediately. The search is run as the background process that ultimately is supposed to store results internally, which later can be displayed by the user with the Show Results
button.
Consider that, this feature similar to the Translate
utilizes quota-limited service and uses relatively much more translation calls depending on the size of the artist's discography. In case the Search
background task fails, the corresponding message will be displayed when you click Show Results
. Otherwise, all translated and matched track names will be displayed.
Note: Currently, this feature is set to target only English translation. Hence, the track name to search should be specified in English.
Playback
feature is optional and users can choose to enable it by marking a corresponding checkbox during the initial add-on authorization process. The feature can be utilized to add multiple tracks to the queue of the active player. You can select tracks from the results of either Translate
or Search
features.
Note: This feature is limited (by Spotify) to only users with Premium subscription plans.
Library
feature is optional and users can choose to enable it by marking a corresponding checkbox during the initial add-on authorization process. The feature can be utilized to add multiple tracks to the user's library. You can select tracks from the results of either Translate
or Search
features.
This project is licensed under the MIT License - see the LICENSE file for details