From f9c13ef4d3debf68d40d2a027c191c72a6cc0bd5 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sun, 2 Jan 2011 15:00:22 +1100 Subject: [PATCH] Renamed stuff --- itunes.py => libsyncitunes.py | 0 sync.py => syncitunes.py | 11 ++++++----- 2 files changed, 6 insertions(+), 5 deletions(-) rename itunes.py => libsyncitunes.py (100%) rename sync.py => syncitunes.py (87%) diff --git a/itunes.py b/libsyncitunes.py similarity index 100% rename from itunes.py rename to libsyncitunes.py diff --git a/sync.py b/syncitunes.py similarity index 87% rename from sync.py rename to syncitunes.py index 9375c91..a354470 100755 --- a/sync.py +++ b/syncitunes.py @@ -7,7 +7,7 @@ import optparse import os import sys -import itunes +import libsyncitunes def parse_options(): @@ -59,10 +59,11 @@ def main(): sys.exit(1) logging.info("Loading library") + library = libsyncitunes.Library.alloc() if opts.itunes_library: - library = itunes.Library.alloc().initWithFilename_(opts.itunes_library) + library = library.initWithFilename_(opts.itunes_library) else: - library = itunes.Library.alloc().init() + library = library.init() for playlist in opts.playlists: if not library.has_playlist(playlist): @@ -74,12 +75,12 @@ def main(): for playlist in opts.playlists: tracks = list(library.get_playlist(playlist)) all_tracks.extend(tracks) - itunes.export_m3u(opts.dry_run, opts.full_dest, + libsyncitunes.export_m3u(opts.dry_run, opts.full_dest, opts.drive_letter, opts.media_dir, playlist, tracks) logging.info("Synchronising") - itunes.sync(opts.dry_run, library.folder, opts.full_dest, all_tracks) + libsyncitunes.sync(opts.dry_run, library.folder, opts.full_dest, all_tracks) if __name__ == "__main__": -- 2.39.2