Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding:utf-8 -*-
- from gmusicapi import Mobileclient
- api = Mobileclient()
- api.login('email@example.com', 'password', Mobileclient.FROM_MAC_ADDRESS)
- library = api.get_all_songs()
- nonFilteringSong = []
- filteringSong = []
- overlapSong = []
- for i in library:
- song = {'title':i['title'], 'album': i['album']}
- nonFilteringSong.append(song)
- for i in range(len(library)):
- song = {'title':library[i]['title'], 'album': library[i]['album']}
- if song in filteringSong:
- overlapSong.append(library[i]['id'])
- print library[i]['title'], library[i]['album']
- else :
- filteringSong.append(song)
- if raw_input('これらの曲を削除しますか?[y/n] > ') == 'y':
- api.delete_songs(overlapSong)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement