Esempio n. 1
0
 def _get_all_possible_song_locations_set(playlist_location, roots):
     all_songs = set()
     with open(playlist_location) as playlist:
         for song in playlist:
             song_entity = Song(song.strip(), roots)
             for root in roots:
                 all_songs.add(Song.song_with_root(song_entity, root))
     return all_songs
Esempio n. 2
0
 def test_song_with_root_simple(self):
     song_path = "./_Done_/Belle_and_Sebastian/The Boy with the Arab Strap/06_Belle & Sebastian_Seymour Stein.mp3"
     simple_song = Song(song_path, ['.', './_Done_'])
     song_path_with_new_root = Song.song_with_root(simple_song, '/<microSD>/MUSIC')
     expected_song_path = '/<microSD>/MUSIC/Belle_and_Sebastian/The Boy with the Arab Strap/06_Belle & Sebastian_Seymour Stein.mp3'
     self.assertEquals(expected_song_path, song_path_with_new_root)