Skip to content

Commit

Permalink
- [x] Fix bug of "Index out of range" [#126](#126)
Browse files Browse the repository at this point in the history
- [x] Fix bug of "Illegal characters in path" [#132](#132)
- [x] Fix bug of "Russian lyrics are added as Chinese" [#130](#130)
- [X] Fix bug of "Object reference not set to an instance of an object" [#127](#127)
  • Loading branch information
yaronzz committed Sep 1, 2021
1 parent cc64da8 commit 0ac511a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/TIDALDL-UI-PRO/bin
/TIDALDL-UI-PRO/packages
/TIDALDL-UI-PRO/obj
/TIDALDL-UI-PRO/.vs
Binary file removed TIDALDL-UI-PRO/.vs/TIDALDL-UI/v16/-Home.suo
Binary file not shown.
Binary file removed TIDALDL-UI-PRO/.vs/TIDALDL-UI/v16/.suo
Binary file not shown.
8 changes: 4 additions & 4 deletions TIDALDL-UI-PRO/Else/Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static string GetAlbumPath(Album album, Settings settings)
name = "{ArtistName}/{Flag} [{AlbumID}] [{AlbumYear}] {AlbumTitle}";
name = name.Replace("{ArtistName}", artist);
name = name.Replace("{AlbumID}", album.ID);
name = name.Replace("{AlbumYear}", album.ReleaseDate.Substring(0, 4));
name = name.Replace("{AlbumYear}", album.ReleaseDate != null ? album.ReleaseDate.Substring(0, 4) : "");
name = name.Replace("{AlbumTitle}", FormatPath(album.Title, settings));
name = name.Replace("{Flag}", flag);
name = name.Trim();
Expand Down Expand Up @@ -115,7 +115,7 @@ public static string GetAlbumPath2(Album album, Settings settings)

// album and addyear
string albumName = FormatPath(album.Title, settings);
string addyear = $"[{album.ReleaseDate.Substring(0, 4)}]";
string addyear = album.ReleaseDate == null ? "" : $"[{album.ReleaseDate.Substring(0, 4)}]";

if (settings.AddYear == ePositionYear.After)
albumName = albumName + addyear;
Expand Down Expand Up @@ -179,7 +179,7 @@ public static string GetTrackPath(Settings settings, Track track, StreamUrl stre
if (album != null)
{
name = name.Replace("{AlbumID}", album.ID);
name = name.Replace("{AlbumYear}", album.ReleaseDate.Substring(0, 4));
name = name.Replace("{AlbumYear}", album.ReleaseDate == null ? "" : album.ReleaseDate.Substring(0, 4));
name = name.Replace("{AlbumTitle}", FormatPath(album.Title, settings));
}
return $"{basepath}{name}{extension}";
Expand Down Expand Up @@ -393,7 +393,7 @@ public static string SetMetaData(string filepath, Album TidalAlbum, Track TidalT
tfile.Tag.Lyrics = lyrics;

//ReleaseDate
if (TidalAlbum.ReleaseDate.IsNotBlank())
if (TidalAlbum.ReleaseDate != null && TidalAlbum.ReleaseDate.IsNotBlank())
tfile.Tag.Year = (uint)AIGS.Common.Convert.ConverStringToInt(TidalAlbum.ReleaseDate.Split("-")[0]);

//Cover
Expand Down
7 changes: 7 additions & 0 deletions TIDALDL-UI-PRO/UPDATE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@


- [x] Fix bug of "Index out of range" [#126](https://github.com/yaronzz/Tidal-Media-Downloader-PRO/issues/126)
- [x] Fix bug of "Illegal characters in path" [#132](https://github.com/yaronzz/Tidal-Media-Downloader-PRO/issues/132)
- [x] Fix bug of "Russian lyrics are added as Chinese" [#130](https://github.com/yaronzz/Tidal-Media-Downloader-PRO/issues/130)
- [X] Fix bug of "Object reference not set to an instance of an object" [#127](https://github.com/yaronzz/Tidal-Media-Downloader-PRO/issues/127)

#### v1.2.1.6
- [x] add lyrics

Expand Down

0 comments on commit 0ac511a

Please sign in to comment.