-def sync(dry_run, source, dest, files):
+def export_m3u(dry_run, dest, path_prefix, playlist_name, files):
+ if dry_run:
+ return
+ if not path_prefix:
+ path_prefix = "../"
+ playlist_file = os.path.join(dest, "-Playlists-", playlist_name) + ".m3u"
+ mkdirhier(os.path.dirname(playlist_file))
+ logging.info("Writing: " + playlist_file)
+ f = open(playlist_file, "w")
+ for filename in files:
+ if path_prefix.find("\\") > 0:
+ filename = filename.replace("/", "\\")
+ filename = encode_filename(filename)
+ f.write("%s%s\n" % (path_prefix, filename))
+ f.close()
+
+def sync(dry_run, source, dest, files_to_copy):