add code and requirements files

This commit is contained in:
2014-06-15 11:57:18 +01:00
parent 4132d79226
commit b69810ea5c
2 changed files with 20 additions and 0 deletions

18
delete.py Normal file
View File

@@ -0,0 +1,18 @@
from pyItunes import *
from gmusicapi import Mobileclient
# iTunes songs
l = Library("<full path to iTunes Music Library.xml>")
songs = [(song.artist, song.name) for id,song in l.songs.items()]
# Google Music songs
api = Mobileclient()
api.login('<account>', '<password>')
library = api.get_all_songs()
# Find songs to delete
delete = filter(lambda song: (song['artist'], song['title']) not in songs, library)
delete = [song['id'] for song in delete]
# Delete songs
api.delete_songs(delete)

2
requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
git+git://github.com/liamks/pyitunes.git
git+git://github.com/simon-weber/Unofficial-Google-Music-API