Exemplo n.º 1
0
 def _create_artist(self, session, id3_name, nest_id, nest_name):
     nest_artist = self._nest_artist(session, nest_id, nest_name)
     for artist in nest_artist.artists:
         if artist.name == id3_name:
             if not artist.tags or twice_monthly():
                 self._reset_tags(session, nest_artist, artist)
             return artist
     return self._music_artist(session, nest_artist, id3_name)
Exemplo n.º 2
0
def link_all(session, linker):
    have_new = session.query(Artist).filter(Artist.new == True).count()
    if have_new: warning('new artists; re-linking all')
    for artist in session.query(Artist).order_by(random()).all():
        if have_new or twice_monthly():
            delete_src(session, artist)
            linker.link(session, artist)
            if have_new:
                artist.new = False
                session.commit()
    debug('done!')
Exemplo n.º 3
0
def is_unchanged_album(session, finder, album, files):
    if twice_monthly(): return False # twice a month, check anyway
    if len(files) != len(album.tracks): return False
    if finder.missing_artist(session, album.tracks): return False
    tracks = dict((track.file, track) for track in album.tracks)
    return seq_and(map(partial(is_unchanged_track, album.path, tracks), files))