<commit_before><template>
	<div class="details">
		<div class="coverArt">
			<img
				v-bind:src="artworkURL"
				draggable="true"
				v-on:dragstart="event => $emit('items-drag-start', event, songs)"
			/>
		</div>
		<div class="trackList">
			<ul>
				<li v-for="(disc, index) in discs" v-bind:key="index">
					<div
						draggable="true"
						class="discNumber"
						v-if="discs.length > 1 && disc.discNumber > 0"
						v-on:dragstart="event => $emit('items-drag-start', event, disc.songs)"
					>Disc {{ disc.discNumber }}</div>
					<ol class="discContent">
						<li
							draggable="true"
							v-bind:value="item.fields.track_number"
							v-bind:class="{ song: 1, 'no-track-number': !item.fields.track_number }"
							v-for="(item, index) in disc.songs"
							v-bind:key="index"
							v-on:click="$emit('item-click', item)"
							v-on:dragstart="event => $emit('items-drag-start', event, [item])"
						>
							<span class="songName">
								{{ formatSongTitle(item) }}
								<span
									class="trackArtist"
									v-if="item.fields.artist && item.fields.album_artist && item.fields.artist != item.fields.album_artist"
								>({{ item.fields.artist }})</span>
							</span>
						</li>
					</ol>
				</li>
			</ul>
		</div>
	</div>
</template>

<script>
import API from "/src/api";
import * as Format from "/src/format";
export default {
	props: {
		items: {
			type: Array,
			required: true,
		},
	},

	data: function () {
		return {};
	},

	computed: {
		discs: function () {
			return this.songs.reduce((discs, item) => {
				let disc = discs[discs.length - 1];
				let discNumber = item.fields.disc_number || 0;
				if (!disc || disc.discNumber != discNumber) {
					disc = {
						discNumber: discNumber,
						songs: [],
					};
					discs.push(disc);
				}
				disc.songs.push(item);
				return discs;
			}, []);
		},

		songs: function () {
			return this.items.sort((a, b) => {
				const discA = a.fields.disc_number || 0;
				const discB = b.fields.disc_number || 0;
				if (discA != discB) {<commit_msg>Cleanup<commit_after><template>
	<div class="details">
		<div class="coverArt">
			<img
				v-bind:src="artworkURL"
				draggable="true"
				v-on:dragstart="event => $emit('items-drag-start', event, songs)"
			/>
		</div>
		<div class="trackList">
			<ul>
				<li v-for="(disc, index) in discs" v-bind:key="index">
					<div
						draggable="true"
						class="discNumber"
						v-if="discs.length > 1 && disc.discNumber"
						v-on:dragstart="event => $emit('items-drag-start', event, disc.songs)"
					>Disc {{ disc.discNumber }}</div>
					<ol class="discContent">
						<li
							draggable="true"
							v-bind:value="item.fields.track_number"
							v-bind:class="{ song: 1, 'no-track-number': !item.fields.track_number }"
							v-for="(item, index) in disc.songs"
							v-bind:key="index"
							v-on:click="$emit('item-click', item)"
							v-on:dragstart="event => $emit('items-drag-start', event, [item])"
						>
							<span class="songName">
								{{ formatSongTitle(item) }}
								<span
									class="trackArtist"
									v-if="item.fields.artist && item.fields.album_artist && item.fields.artist != item.fields.album_artist"
								>({{ item.fields.artist }})</span>
							</span>
						</li>
					</ol>
				</li>
			</ul>
		</div>
	</div>
</template>

<script>
import API from "/src/api";
import * as Format from "/src/format";
export default {
	props: {
		items: {
			type: Array,
			required: true,
		},
	},

	data: function () {
		return {};
	},

	computed: {
		discs: function () {
			return this.songs.reduce((discs, item) => {
				let disc = discs[discs.length - 1];
				let discNumber = item.fields.disc_number;
				if (!disc || disc.discNumber != discNumber) {
					disc = {
						discNumber: discNumber,
						songs: [],
					};
					discs.push(disc);
				}
				disc.songs.push(item);
				return discs;
			}, []);
		},

		songs: function () {
			return this.items.sort((a, b) => {
				const discA = a.fields.disc_number || 0;
				const discB = b.fields.disc_number || 0;
				if (discA != discB) {
{'fraction_non_alphanumeric': 0.1880362834027948, 'fraction_numerical': 0.0029418975239029173, 'mean_word_length': 2.5571054925893635, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 64, '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': '921980', 'n_tokens_mistral': 1994, 'n_tokens_neox': 1461, 'n_words': 276}