remove simplejson import as we've converted all uses of simplejson already pick_best_link_or_download(): find a local version of a file from the list, or download one and return that (or None for an empty list). modifies local_files_map to avoid re-downloading redundantly #HACK: doesn't actually download anything. Just pretends it has. #Will go through and download songs later. pick_best_link(): find a local version of a file from the list, or return None if none are available. get_local_song_location(): Match the spotify song to a local file (or downloaded file) as best you can. * If there is an exact (artist, title) match, use that. * Otherwise, list all artists that have versions of the song, and get the user to pick one. get_m3u_string(): turn a spotify playlist into an m3u string as best you can. convert_to_m3u(): os.path.walk callback that creates m3u files from json files. in main: os.path.walk() and dump m3u files in m3u/ also: save local_files_map_end.json that the user can copy to local_files_map.json after doing a diff. This will prevent them having to make choices multiple times.
It's just a map from filename to directory. I also cache it on disk, because os.walk is slow on windows HACK: hard-coded directory path.
Note the excess of dunnos