Skip to content

Commit

Permalink
feat: finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
very-doge-wow committed Jan 1, 2024
1 parent ae2f7db commit efbf561
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 10 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Basic Info (please complete the following information):**
- OS:
- amazify version:

**Additional context**
Add any other context about the problem here.

cc @very-doge-wow
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always
frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features
you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

cc @very-doge-wow
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Maintenance request
about: Request maintenance action
title: ''
labels: enhancement
assignees: ''

---

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.

cc @very-doge-wow
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Description:

Explain the purpose of the PR.

### Checklist:

* [ ] Does your PR pass tests?
* [ ] Have you written new tests for your changes?
* [ ] Have you linted your code locally prior to submission?
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
15 changes: 15 additions & 0 deletions .github/workflows/lintmarkdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Markdownlint
on: [push]
jobs:
lint-markdown:
name: lint_markdown
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: lint_markdown
uses: docker://avtodev/markdown-lint:v1
with:
args: './*.md'
ignore: './test/output.md ./test/custom-template-keywords.md ./EXAMPLE_OUTPUT.md'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ dmypy.json
__pycache__
.idea
lol.json
.DS_Store
.DS_Store
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ Commits should follow the pattern as specified
## References

This document was adapted from the open-source contribution guidelines for
[Facebook's Draft](https://github.com/facebook/draft-js/blob/main/CONTRIBUTING.md).
[Facebook's Draft](https://github.com/facebook/draft-js/blob/main/CONTRIBUTING.md).
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 🎵 amazify

![logo](logo.png)
![logo](https://github.com/very-doge-wow/amazify/blob/main/logo.png?raw=true)

[![Lint Markdown](https://github.com/very-doge-wow/amazify/actions/workflows/lintmarkdown.yml/badge.svg)](https://github.com/very-doge-wow/amazify/actions/workflows/lintmarkdown.yml)

Migrate your playlists from Amazon Music to Spotify using a simple Flask web interface.

Expand All @@ -11,26 +13,27 @@ Migrate your playlists from Amazon Music to Spotify using a simple Flask web int
Navigate to [developer.spotify.com](https://developer.spotify.com/dashboard) and
create a new app. Use this as the callback URL:

```
```shell
http://127.0.0.1:5000/callback
```

Retrieve your client id and client secret for later use.

### 🔑 Amazon Authentication (Workaround)

Currently, the Amazon Music API won't let us create applications for OAuth ourselves without
them needing to be approved by Amazon. Since we only want to perform a one-time
migration, we can obtain an OAuth token via Amazon's own API reference, hence eliminating
the need for us to be able to create our own application.
Currently, the Amazon Music API won't let us create applications for OAuth
ourselves without them needing to be approved by Amazon. Since we only want
to perform a one-time migration, we can obtain an OAuth token via Amazon's
own interactive API reference, hence eliminating the need for us to be able
to create our own application.

Navigate to [dashboard.music.amazon.dev](https://dashboard.music.amazon.dev/console/api/get-playlist/)
and press the button `Get Token` in order to retrieve a valid token.
Login using your Amazon Music profile's credentials when prompted.

Copy the resulting token and set it as environment variable as described in the next step.
Make sure to also copy the `x-api-key` value as provided in the example `curl`
command given on Amazon's website as well.
Copy the resulting token and set it as environment variable as described in
the next step. Make sure to also copy the `x-api-key` value as provided in
the example `curl` command given on Amazon's interactive API reference as well.

### ℹ️ Required Environment Variables

Expand Down Expand Up @@ -67,15 +70,19 @@ You can then open the webinterface under the URL `https://127.0.0.1:5000`.
Press the button for authenticating at Spotify before running any migration.
Errors will be printed in the Flask app's log, if any occurred.

<!-- markdownlint-disable MD013 -->
| | Tip |
|----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 💡 | Try to verify the status code of the reponses from the Amazon/Spotify API using the log before opening an issue. Refreshing the credentials will most likely resolve the issue. |
<!-- markdownlint-enable MD013 -->

## 🚧 Caveats

The following limitations exist:

<!-- markdownlint-disable MD013 -->
1. Do **not** run multiple migrations simultaneously. This will probably result in rate-limits being exceeded and the progress bar breaking.
2. The Amazon token will expire after about `30min`. Keep that in mind when running migrations.
3. The app does **not** check if a playlist with the same name already exists. A new playlist is created each time you start a migration.
4. If a song from the Amazon Playlist is not present in Spotify, the Spotify Search API might return false songs, which will then be added to the playlist. Make sure to check the result after the migration has finished.
<!-- markdownlint-enable MD013 -->

0 comments on commit efbf561

Please sign in to comment.