Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding:utf-8 -*-
  3. from gmusicapi import Mobileclient
  4.  
  5. api = Mobileclient()
  6. api.login('email@example.com', 'password', Mobileclient.FROM_MAC_ADDRESS)
  7.  
  8. library = api.get_all_songs()
  9. nonFilteringSong = []
  10. filteringSong = []
  11. overlapSong = []
  12.  
  13. for i in library:
  14. song = {'title':i['title'], 'album': i['album']}
  15. nonFilteringSong.append(song)
  16.  
  17. for i in range(len(library)):
  18. song = {'title':library[i]['title'], 'album': library[i]['album']}
  19. if song in filteringSong:
  20. overlapSong.append(library[i]['id'])
  21. print library[i]['title'], library[i]['album']
  22. else :
  23. filteringSong.append(song)
  24.  
  25. if raw_input('これらの曲を削除しますか?[y/n] > ') == 'y':
  26. api.delete_songs(overlapSong)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement