Exemplo n.º 1
0
    print "Failed to read %s" % dbname
    sys.exit(2)
itdb.mountpoint = ipod_mount

if True:
    for playlist in gpod.sw_get_playlists(itdb):
        print playlist.name
        print type(playlist.name)
        print gpod.itdb_playlist_tracks_number(playlist)
        for track in gpod.sw_get_playlist_tracks(playlist):
            print track.title
    
for track in gpod.sw_get_tracks(itdb):
    lists = []
    for playlist in gpod.sw_get_playlists(itdb):
        if gpod.itdb_playlist_contains_track(playlist, track):
            lists.append(playlist)

    print track.artist
    print track.tracklen
    print track.size
    if track.artist == "Placebo":
        print u"%-25s %-20s %-20s %-30s %s" % (track.title,
                                               track.album,
                                               track.artist,
                                               gpod.itdb_filename_on_ipod(track),
                                               repr(u",".join([l.name for l in lists])))

        if gpod.itdb_track_set_thumbnail(track,"/tmp/placebo.jpg") != 0:
            print "Failed to save image thumbnail"
        print track.orig_image_filename
Exemplo n.º 2
0
 def __contains__(self, track):
     if gpod.itdb_playlist_contains_track(self._pl, track._track):
         return True
     else:
         return False
Exemplo n.º 3
0
 def __contains__(self, track):
     if gpod.itdb_playlist_contains_track(self._pl, track._track):
         return True
     else:
         return False