- ${titleField.value}
+
+
+ ${titleField?.mixed
+ ? html`
+ ${this.countDistinctValues('title')} different titles
`
- : nothing}
- ${artistField?.mixed
- ? html`
- ${this.countDistinctValues('artist')} different artists
- `
- : artistField?.value
- ? html`
- ${artistField.value}
+ : html`
+ ${titleField?.value || 'None'}
+ `}
+
+
+
+ ${artistField?.mixed
+ ? html`
+ ${this.countDistinctValues('artist')} different artists
`
- : nothing}
- ${albumField?.mixed
- ? html`
- ${this.countDistinctValues('album')} different albums
- `
- : albumField?.value
- ? html`
- ${albumField.value}
+ : html`
+ ${artistField?.value || 'Unknown Artist'}
+ `}
+
+
+
+ ${albumField?.mixed
+ ? html`
+ ${this.countDistinctValues('album')} different albums
`
- : nothing}
+ : html`
+ ${albumField?.value || 'No album'}
+ `}
+
`;
}
@@ -1235,45 +1238,54 @@ export class TrackDetails extends LitElement {
private renderMainFields(t: library.Track) {
if (this.editing) {
return html`
-
- this.onEditInput(
+
+
+
-
- this.onEditInput(
+ @input=${(e: Event) =>
+ this.onEditInput(
+ 'title',
+ e,
+ )}
+ placeholder="Title"
+ />
+
+
+
+
-
- this.onEditInput(
+ @input=${(e: Event) =>
+ this.onEditInput(
+ 'artist',
+ e,
+ )}
+ placeholder="Artist"
+ />
+
+
+
+
+ @input=${(e: Event) =>
+ this.onEditInput(
+ 'album',
+ e,
+ )}
+ placeholder="Album"
+ />
+
${formatMilliseconds(t.TrackLength)}
@@ -1281,17 +1293,28 @@ export class TrackDetails extends LitElement {
}
return html`
-
- ${t.TrackName || this.fileNameFromPath(t.FilePath)}
-
-
- ${t.ArtistName || 'Unknown Artist'}
-
- ${t.Album
- ? html`${t.Album}`
- : nothing}
+
+
+
+ ${t.TrackName || this.fileNameFromPath(t.FilePath)}
+
+
+
+
+
+ ${t.ArtistName || 'Unknown Artist'}
+
+
+
+
+ ${t.Album
+ ? html`${t.Album}`
+ : html`No album`}
+
${formatMilliseconds(t.TrackLength)}