Git Product home page Git Product logo

unitunes's Introduction

unitunes PyPI version example workflow

unituneslogo

A python GUI and library to sync playlists across music streaming services.

playlist_tab

Introduction

unitunes manages playlists across streaming services. unitunes can transfer songs between services and keep playlists in sync.

unitunes stores your playlists in plain text, allowing you to version control your music. Playlists can be pushed and pulled from streaming services. Tracks from one service can be searched on another.

Current Supported Streaming Services

Name Pullable Pushable Searchable
MusicBrainz
Spotify
Youtube Music
Beatsaber

Want to add support for another service? See contributing.

Usage

pip install unitunes
unitunes

In settings, set the directory to store your playlists. You can version control this directory with git.

Connect services in the service tab. Enter a service name, and click the button to add the corresponding service. Each service type requires some configuration, Spotify requires a client id and secret, and Youtube Music requires request headers. service_tab

Playlists can then be added to the playlist tab.

After adding playlists, you can sync them. You likely just want to press the Sync All button, which will pull, search, and push all playlists.

Contributing

unitunes is rapidly evolving. Take a look at the contributing guide.

unitunes's People

Contributors

ciaranwoodward avatar johan12345 avatar platers avatar steveh0401 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

unitunes's Issues

Add more services

Currently unitunes supports spotify and youtube music. I'm open to all kinds of services, even platforms that aren't exactly services.

Examples: Deezer, iTunes, local files, osu!, bsaber, musescore.

Please create a new issue if you would like to add support for a service.

Handle pulling tracks without URI's

When pulling tracks from YTM or Spotify, currently tracks without URI's are skipped. These are usually user uploaded tracks or removed tracks.

These tracks should still be added to the UP.

rename playlist command

unitunes rename PLAYLIST_NAME NEW_NAME

Add a command to rename playlists. Remember to add a test.

Consider keeping the CLI?

It seems that the CLI was removed (8a8b2ca) in version 2.0.0 in favor of the new GUI. I think it would still be nice to have a CLI available, e.g. for running unitunes as part of a cron job. What do you think?

Formalize service configs

Currently service configs are parsed from json into dicts.

Create classes for service configs. Provides type safety and clearly shows which options exist.

SpotifyException: spotipy.exceptions.SpotifyException

When I try to search YTMusic's playlist on Spotify as:
unitunes search spotify 'Your Likes'

I get the following exception:
....
    raise SpotifyException(
spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/search?q=track%3A%22value%3D%27Me+%26+My+Friends+%28feat.+Fortune%29%27+aliases%3D%5B%5D%22+artist%3A%22Munn+%26+Jude.%22+album%3A%22Me+%26+My+Friends+%28feat.+fortune%29%22&limit=5&offset=0&type=track:
 Not found., reason: None
  3%|████                                                                                                                                                 | 17/619 [00:03<02:15,  4.43it/s]

I guess, if the song is not found on Spotify then this exception gets raised and if so, then the exception should be caught as sound not found and continue the search for next songs in the playlist.

If that's not it, then please help get the error solved.
Thanks for the great tool, cheers!

Error while running unitunes on windows 11

My environment

  • Python version: Python 3.10.7
  • OS: Windows 11
  • unitunes version I tried: 2.0.1 and 2.0.0

Steps to reproduce:

  1. pip install unitunes without administrator privileges
  2. unitunes

Problem:

Error: ModuleNotFoundError: No module named 'platformdirs'

Things I did to solve the issue:

install platformdirs using pip.
After doing that another error appears complaining about a directory not being created.
"C:\Users%USER%\AppData\Local\unitunes"
after creating it manually it solves de issue.

YouTube Music Playlist Pull Error - NoneType object is not iterable

ENV: Win10, 21H2, Python: 3.10.2

  1. Configure
  1. Attempted to Pull configured playlist
  2. Error: 'NoneType' object is not iterable
  3. Stacktrace:
Job 0 failed: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "C:\Users\johndeo\AppData\Local\Programs\Python\Python310\lib\site-packages\unitunes\gui\engine.py", line 109, in _process_queue
    job.execute()
  File "C:\Users\johndeo\AppData\Local\Programs\Python\Python310\lib\site-packages\unitunes\gui\engine.py", line 66, in execute
    self.pm.pull_playlist(
  File "C:\Users\johndeo\AppData\Local\Programs\Python\Python310\lib\site-packages\unitunes\main.py", line 209, in pull_playlist
    remote_tracks = service.pull_tracks(uri)
  File "C:\Users\johndeo\AppData\Local\Programs\Python\Python310\lib\site-packages\unitunes\services\ytm.py", line 139, in pull_tracks
    return self.results_to_tracks(tracks)
  File "C:\Users\johndeo\AppData\Local\Programs\Python\Python310\lib\site-packages\unitunes\services\ytm.py", line 127, in results_to_tracks
    return list(
  File "C:\Users\johndeo\AppData\Local\Programs\Python\Python310\lib\site-packages\unitunes\services\ytm.py", line 171, in raw_to_track
    artists=[AliasedString(value=artist["name"]) for artist in raw["artists"]],
TypeError: 'NoneType' object is not iterable
Finished job 0: Pull Your Likes

GUI

A GUI is necessary for making unitunes more accessible. Currently working on a GUI with dearpygui.

Failed to load service Youtube music

Failed to load service Youtube music: The following entries are missing in your headers: cookie, x-goog-authuser. Please try a different request (such as /browse) and make sure you are logged in.

Can anyone help? in what format and what lines of headers should be inserted?

Support a different YouTube playlist URL

First of all, thank you for this great piece of software.

I couldn't get the right YT playlist URL format at first, then I noticed the supported URL format is different. The one I got from my address bar when browsing is as follows:

https://music.youtube.com/browse/<playlist-id>

Alternatively, as we have to specify the service anyway, wouldn't it be better if we just enter the playlist ID?

Automate the evaluation of matching and searching algorithms

In order to improve search performance we need an automated evaluation suite. I made a first attempt at this in eval.py, where I can manually add hard test cases to debug.

A more systematic, larger, test set is needed to count false negatives and positives.
Maybe can be obtained from the musicbrainz database.

Couldn't read cache at: .cache / Couldn't write token to cache at: .cache

I have unitunes up and running. It seemed to install without any issues. I have added my spotify client ID, secret and redirect URI, as well as the youtube headers. It seems to pull the song okay from both platforms and reflects the correct number of songs. Unfortunately, when I try to push a playlist, I get a long list of the same two errors. The songs don't seem to be migrated between services. The errors are as follows:

Couldn't read cache at: .cache
Couldn't write token to cache at: .cache

I'm on macOS 13.4, python 3.11

Does anyone have any idea what is going on?

Issue when opening app

When I try to open unitunes at the command line, I get the following message:

Traceback (most recent call last):
File "/home/xxxxxxxxx/.local/bin/unitunes", line 5, in
from gui.main import main
ModuleNotFoundError: No module named 'gui'

Do I not have something installed? Am I missing something? Thanks

Add Deezer support

Hello,

Very interested by your project. I think it is one of these services that "needs to" exist. As a Deezer user I would be happy to help adding this service.

As I don't have that much time to dig into your code, maybe you could point me out the useful stuff needed to add such a service ? I'm thinking about the list of classes and methods needed (with their in/out data). Thus I would be able to start playing with some deezer-python API.

Waiting for your answer I will start to but my hands in the code.

A little unsure on how to use this

After running the command in powershell (admin) it installs into "AppData\Local\Programs\Python\Python310\Scripts" but trying to run unitunes just closes it. Is there something I'm missing that I need to run this?

How to sink playlists between YTM and spotify

I have a spotify playlist with 140 ish songs and ytm with 1800+
How do I sync them. When I press Sync All it just pushes and pulls but my spotify playlist still has the same number of songs. I am probably missing something, could someone help me out?

uni

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.