def __init__(self, gc, id): Object.__init__(self, gc) self.songs = [] self.index = 0 self.playmode = "random" self.id = id self._request = [] if id is "_library": self.songs = gc["library"].get_files()
def __init__(self, gc, file, update = False, cargs = False, create = False, query_data = None): Object.__init__(self, gc) self.mdata = {} if file is None: raise if create or update is True: self._create_update(file, cargs, update, create) self._get_data(gc, cargs, file, query_data) self.filename = file