<commit_before>var TrackInfo = React.createClass({
	mixins: [FluxMixin],

	getDefaultProps: function() {
		return {id: null}
	},

	getInitialState: function() {
		return {
			image: null,
			title: '',
			artist: ''
		}
	},

	componentWillReceiveProps: function(props) {
		if (props.id === 0 || props.id === null) {
			return;
		}

		var options = {
			headers: {
				'Authorization': 'Bearer ' + this.getFlux().store('AuthStore').bearer
			}
		};

		jQuery.ajax('/api/Tracks/' + props.id, options).done(function(track) {
			this.setState({title: track.Name});
			jQuery.ajax('/api/Albums/' + track.AlbumId, options).done(function(album) {
				this.setState({image: album.Artwork});<commit_msg>Fixed metadata refresh bug<commit_after>var TrackInfo = React.createClass({
	mixins: [FluxMixin],

	getDefaultProps: function() {
		return {id: null}
	},

	getInitialState: function() {
		return {
			image: null,
			title: '',
			artist: ''
		}
	},

	componentWillReceiveProps: function(props) {
		if (props.id === 0 || props.id === null) {
			return;
		}

		if (props.id === this.props.id) {
			return;
		}

		this.getMeta(props.id);
	},

	componentDidMount: function() {
		this.getMeta(this.props.id);
	},

	getMeta: function(trackId) {
		var options = {
			headers: {
				'Authorization': 'Bearer ' + this.getFlux().store('AuthStore').bearer
			}
		};

		jQuery.ajax('/api/Tracks/' + trackId, options).done(function(track) {
			this.setState({title: track.Name});
			jQuery.ajax('/api/Albums/' + track.AlbumId, options).done(function(album) {
				this.setState({image: album.Artwork});
{'fraction_non_alphanumeric': 0.18015170670037928, 'fraction_numerical': 0.0012642225031605564, 'mean_word_length': 3.6558823529411764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1029118', 'n_tokens_mistral': 634, 'n_tokens_neox': 552, 'n_words': 94}