Skip to content

Commit

Permalink
chore: removing leftover print log
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentVoid13 committed Oct 13, 2024
1 parent 1bb2a35 commit 5e36f2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SyncDisBoi is a simple and efficient tool designed to synchronize playlists acro
- [Spotify](https://open.spotify.com/)
- [Tidal](https://tidal.com/)

It's the perfect solution for music enthusiasts who want to keep their playlists updated across different music streaming platforms and enjoy the various recommendations algorithms.
It's the perfect solution for music enthusiasts who want to keep their playlists updated across different music streaming platforms and enjoy the various recommendations algorithms, or who simply want to migrate to a new streaming platform and preserve their playlists.

> **Disclaimer**: While SyncDisBoi doesn't perform any deletion operations, it's always a good practice to backup your playlists. I am not responsible for any unintended changes to your playlists.
Expand All @@ -21,18 +21,22 @@ When ISRC codes are not available on the platform API, SyncDisBoi falls back to
- Song duration

Notes:
- The artist names are not used either because the metadata is inconsistent across platforms.
- The artist names are not used because the metadata is inconsistent across platforms.
- For Youtube Music, SyncDisBoi won't sync tracks lacking album metadata, as this typically indicates a video from Youtube, which lacks the necessary metadata for accurate synchronization.

## Usage

You can find binaries of SyncDisBoi for all major platforms (Linux, Windows, Mac) under [releases](https://github.com/SilentVoid13/SyncDisBoi/releases).

```bash
# sync from Youtube Music to Spotify
./sync_dis_boi yt-music spotify --client-id "<CLIENT_ID>" --client-secret "<CLIENT_SECRET>"
# sync from Spotify to Tidal
./sync_dis_boi spotify --client-id "<CLIENT_ID>" --client-secret "<CLIENT_SECRET>" tidal
# sync from Tidal to Youtube Music
./sync_dis_boi tidal yt-music
# sync from Youtube Music to Tidal, with debug mode enabled to generate statistics JSON files
./sync_dis_boi --debug tidal yt-music
# sync from Spotify to Youtube Music, with debug mode enabled to generate detailed statistics about the synchronization process
./sync_dis_boi --debug spotify --client-id "<CLIENT_ID>" --client-secret "<CLIENT_SECRET>" yt-music
```

To use SyncDisBoi, you need to set up account access for the API of the corresponding music platform.
Expand All @@ -48,7 +52,7 @@ To use SyncDisBoi, you need to set up account access for the API of the correspo
You will then need to provide the client id and client secret as arguments for SyncDisBoi.

Notes:
- After authorizing access for your Spotify account, SyncDisBoi will open the 'http://localhost:8888/callback' URL in your browser. If you get 'Unable to connect' this is normal.
- After authorizing access for your Spotify account, SyncDisBoi will open the 'http://localhost:8888/callback' URL in your browser. If you get 'Unable to connect' this is normal as the server is quickly opened and shutdown once it receives the auth code.

### Youtube Music API setup

Expand Down
6 changes: 2 additions & 4 deletions src/music_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use color_eyre::eyre::Result;
use futures::future::try_join_all;
use serde::{Deserialize, Serialize};
use strsim::normalized_levenshtein;
use tracing::debug;

use crate::utils::generic_name_clean;

Expand Down Expand Up @@ -133,10 +134,7 @@ impl Song {

// we allow a 1 second difference
if !(dur1 - 1..=dur1 + 1).contains(&dur2) {
println!(
"Duration: {} vs {} --> {} VS {}",
dur1, dur2, self.name, other.name
);
debug!("Duration: {} vs {} --> {} VS {}", dur1, dur2, self.name, other.name);
return false;
}

Expand Down

0 comments on commit 5e36f2c

Please sign in to comment.