Skip to content

Commit 73f75f5

Browse files
committed
Improved "Update common album" function
- Now the track count is updated only to items of the same album that are on the same disk - The disc number is updated only if it's "1" - Fixed a bug that updated all the Performers in the "Update common album fields" mode - Updated README with the new "Play audio" dialog - Bumped version to 2.0.2
1 parent cac1049 commit 73f75f5

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

App.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@
518518
item);
519519
} else if (selectedFile.tag.Tag.Album != null && selectedFile.tag.Tag.Album.Trim() != "" && (IntelligentAlbumUpdate == MultipleUpdateOptions.UPDATE_ALBUM || (IntelligentAlbumUpdate == MultipleUpdateOptions.UPDATE_COMMON_ALBUM && EnsureNotCommonValue(item)))) {
520520
foreach (TagInfoContainer file in files.Where(item => item.tag.Tag.Album == selectedFile.tag.Tag.Album).ToArray()) { // We need to convert the IEnumerable to an Array since otherwise, if the user changed the album name, not all of the objects would be updated with the new album name. By converting it to an array, we iterate over all the items that currently have that album name, even if we change their album value.
521+
if (IntelligentAlbumUpdate == MultipleUpdateOptions.UPDATE_COMMON_ALBUM && item.TagLibProperty == "TrackCount" && file.tag.Tag.DiscCount > 1 && file.tag.Tag.Disc != selectedFile.tag.Tag.Disc && selectedFile.id != file.id) continue; // Since multiple disks have different track count, we should update this property only if they're on the same disk.
522+
if (IntelligentAlbumUpdate == MultipleUpdateOptions.UPDATE_COMMON_ALBUM && item.TagLibProperty == "Disc" && file.tag.Tag.DiscCount > 1 && file.id != selectedFile.id) continue; // Also, the "Disk" property is no longer a common value if there's more than a disk.
521523
TagValueHandler.SetCurrentValue(val.Value == null ? null : val.Value.ToString(), file.tag.Tag, item);
522524
}
523525
} else TagValueHandler.SetCurrentValue(val.Value == null ? null : val.Value.ToString(), selectedFile.tag.Tag,

AvailableProperties.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public enum PropertiesType
4646
new("Album Artists", "AlbumArtists", PropertiesObject.PropertiesType.STRING_ARRAY),
4747
new ("Album Artists (Sort by)", "AlbumArtistsSort", PropertiesObject.PropertiesType.STRING_ARRAY),
4848
new ("Amazon ID", "AmazonID", PropertiesObject.PropertiesType.STRING),
49-
new ("Artists", "Artists", PropertiesObject.PropertiesType.STRING_ARRAY),
49+
new ("Artists", "Performers", PropertiesObject.PropertiesType.STRING_ARRAY),
50+
new ("Artists (Sort by)", "PerformersSort", PropertiesObject.PropertiesType.STRING_ARRAY),
5051
new ("Comment", "Comment", PropertiesObject.PropertiesType.STRING_TEXTAREA),
5152
new ("Composers", "Composers", PropertiesObject.PropertiesType.STRING_ARRAY),
5253
new ("Composers (Sort by)", "ComposersSort", PropertiesObject.PropertiesType.STRING_ARRAY),

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ buttons at the left:
2626
- The star icon will show you the `Custom metadata edtor` dialog. Here you can
2727
add a custom metadata (if the container is supported), see all the metadata that have been added to the audio/video file and also download all the fetched information by TagLib Sharp in either a JSON or CSV (really experimental) file.
2828
- The attachment text icon will show you the `Upload lyrics` dialog. Here you can either upload the lyrics from a local LRC/TTML/text file, or you can fetch them from LRCLib. In this last case, you can also download a zip file with the synced lyrics.
29-
29+
- The play icon will show you the `Play audio/video` dialog.
3030

3131
Before the table, you can find a dropdown menu: here you can choose
3232
- If you want to edit only the single entry;
@@ -44,9 +44,7 @@ metadata field to edit manually.
4444

4545
![Single file view UI](./readme_assets/single_metadata_ui.jpg)
4646

47-
In this UI, the three dialogs mentioned above can be
48-
accessed by clicking on the `Edit other metadata` dropdown button. In both of the UIs you'll
49-
find a third button, "Copy metadata", that allows you to copy metadata from a
47+
In this UI, the four dialogs mentioned above can be opened by clicking on the `Edit other metadata` dropdown button. In both of the UIs you'll find a third button, "Copy metadata", that allows you to copy metadata from a
5048
file to another. You can find more about this below.
5149

5250
### Saving the edits
@@ -180,6 +178,11 @@ With this dialog, you can update the lyrics of either the file you've chosen, or
180178

181179
![The lyrics upload UI](./readme_assets/lyrics_upload.jpg)
182180

181+
### Play audio/video
182+
If you're not sure about the audio or video file you've picked, you can view it using the browser's native Video or Audio controls. You'll also find below the audio/video content the most important metadata.
183+
184+
![The audio player UI](./readme_assets/audio_player.jpg)
185+
183186
## Settings
184187

185188
In the settings, you can change:

readme_assets/audio_player.jpg

74.4 KB
Loading

readme_assets/grid_ui.jpg

55.2 KB
Loading

wwwroot/index.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
<title>TagLibSharp-Web</title>
88
<base href="./" />
99
<link rel="stylesheet" href="css/app.css" />
10-
<link rel="stylesheet" href="css/fonts/400-italic.css">
11-
<link rel="stylesheet" href="css/fonts/400.css">
12-
<link rel="stylesheet" href="css/fonts/700.css">
13-
<link rel="stylesheet" href="css/fonts/700-italic.css">
1410
<link rel="icon" type="image/png" href="icon.svg" />
1511
<link href="MetadataChange.styles.css" rel="stylesheet" />
1612
<meta name="description"
@@ -103,7 +99,7 @@ <h1>Welcome to TagLibSharp-Web!</h1>
10399
localStorage.setItem("TagLibWeb-UseGridUI", grid ? "a" : "b");
104100
}
105101
navigator.serviceWorker.register('service-worker.js', { scope: window.location.href.substring(0, window.location.href.lastIndexOf("/") + 1) });
106-
const appVersion = "2.0.1";
102+
const appVersion = "2.0.2";
107103
fetch("./updatecode", { cache: "no-store" }).then((res) => res.text().then((text) => { if (text.replace("\n", "") !== appVersion) if (confirm(`There's a new version of TagLibSharp-Web. Do you want to update? [${appVersion} --> ${text.replace("\n", "")}]`)) { caches.delete("taglibsharpweb-cache"); location.reload(true); } }).catch((e) => { console.error(e) })).catch((e) => console.error(e)); // Check if the application code is the same as the current application version and, if not, ask the user to update
108104

109105
window.onbeforeunload = (event) => {

wwwroot/updatecode

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.1
1+
2.0.2

0 commit comments

Comments
 (0)