def load_nat(self, id, node=None): self.create_nats() nat = self.get_nat_by_id(id) if nat: return nat nat = NonAlbumTrack(id) self.nats.tracks.append(nat) self.nats.update(True) if node: nat._parse_recording(node) else: nat.load() return nat
def load_nat(self, nat_id, node=None): self.create_nats() nat = self.get_nat_by_id(nat_id) if nat: log.debug("NAT %s already loaded.", nat_id) return nat nat = NonAlbumTrack(nat_id) self.nats.tracks.append(nat) self.nats.update(True) if node: nat._parse_recording(node) else: nat.load() return nat