Beispiel #1
0
def main():
    iTunesApp = iTunesApplication.iTunesApp()
    library = iTunesApp.LibraryPlaylist;

    i = 0
    for track in library.Tracks:
        i = i + 1

        if (i % OUTPUT_FREQUENCY) == 0:
            print "Working on track %d" % i
            sys.stdout.flush()

        if isPodcast(track):
            continue

        if not hasattr(track, 'Location'):
            print "DEBUG: no Location attribute for %s" % prettyTrack(track)
            continue

        try:
            examineTrack(track)
        except:
            exc = sys.exc_info()
            try:
                print "Unexpected error with %s:" % prettyTrack(track), exc[0]
            except:
                print "Unexpected error:", exc[0]
            traceback.print_exception(exc[0], exc[1], exc[2], file=sys.stdout)
def main():
    iTunesApp = iTunesApplication.iTunesApp()
    #iTunesApp = Dispatch("iTunes.Application")
    library = iTunesApp.LibraryPlaylist;

    i = 0
    for track in library.Tracks:
        i = i + 1

        if (i % OUTPUT_FREQUENCY) == 0:
            print "Working on track %d" % i
            sys.stdout.flush()

        if isPodcast(track):
            continue

        try:
            validateTrackArtwork(track)
        except:
            exc = sys.exc_info()
            try:
                print "Unexpected error with %s:" % prettyTrack(track), exc[0]
            except:
                print "Unexpected error:", exc[0]
            traceback.print_exception(exc[0], exc[1], exc[2], file=sys.stdout)
Beispiel #3
0
def main():
    #iTunesApp = win32com.client.gencache.EnsureDispatch("iTunes.Application")
    iTunesApp = iTunesApplication.iTunesApp()
    library = iTunesApp.LibraryPlaylist;

    current = iTunesApp.CurrentTrack
    print current

    foo = library.Tracks.Item(1)
    print foo
    os._exit(0)

    db = playcountdb.db()
    db.loadAllUnusedEntries(SLOW_SEARCH)

    i = 0
    for track in library.Tracks:
        i = i + 1

        if (i % OUTPUT_FREQUENCY) == 0:
            print "Working on track %d" % i
            sys.stdout.flush()

        if isPodcast(track):
            continue

        print track
        #print track.Kind
        #print dir(track)
        continue


        if not hasattr(track, 'Location'):
            print "DEBUG: no Location attribute for %s" % prettyTrack(track)
            continue

        #if track.Location.find("unloaded") == -1:
        #    continue
        #if track.Album != "Across a Wire (disc 1: VH1 Storytellers)":
        #    continue
        #if track.Name != "Ghost Train":
        #    continue
        # Play count: 2; Last played: 2006-11-25 8:16 PM

        examineTrack(db, track)
        try:
            pass
        except:
            exc = sys.exc_info()
            try:
                print "Unexpected error with %s:" % prettyTrack(track), exc[0]
            except:
                print "Unexpected error:", exc[0]
            traceback.print_exception(exc[0], exc[1], exc[2], file=sys.stdout)
Beispiel #4
0
def main():
    iTunesApp = iTunesApplication.iTunesApp()
    library = iTunesApp.LibraryPlaylist;

    i = 0
    for track in library.Tracks:
        i = i + 1

        if (i % OUTPUT_FREQUENCY) == 0:
            print "Working on track %d" % i
            sys.stdout.flush()

        # Can't handle podcast cover art
        findCoverArt = FIND_COVER_ART and not isPodcast(track)

        if not hasattr(track, 'Location'):
            print "DEBUG: no Location attribute for %s" % prettyTrack(track)
            continue

        #if not track.Album == 'Laid':
        #    continue

        #try:
        examineTrack(track, CHECK_FILES, FIND_COVER_ART)
        #except:
            #exc = sys.exc_info()
            #try:
            #    print "Unexpected error with %s:" % prettyTrack(track), exc[0]
            #except:
            #    print "Unexpected error:", exc[0]
            #traceback.print_exception(exc[0], exc[1], exc[2], file=sys.stdout)

    for track in deleteList:
        try:
            print "Not Deleting (%s)" % prettyTrack(track)
            #track.Delete()
        except:
            exc = sys.exc_info()
            try:
                print "Unexpected error with %s:" % prettyTrack(track), exc[0]
            except:
                print "Unexpected error:", exc[0]
            traceback.print_exception(exc[0], exc[1], exc[2], file=sys.stdout)