Skip to content

Commit

Permalink
Adapt to lizzy 4.0.0 API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Nov 6, 2023
1 parent 1e7e5e5 commit 8ce1b71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void serialize(Playlist playlist, OutputStream outputStream) throw
SpecificPlaylist specificPlaylist = LizzyPlaylistUtil.toPlaylist(playlistFormat, playlist);
try
{
specificPlaylist.writeTo(outputStream, null);
specificPlaylist.writeTo(outputStream);
}
catch (Exception e)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/listfix/io/playlists/LizzyPlaylistUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static SpecificPlaylist writeNewPlaylist(Playlist playlist, Path path, Pl
try (OutputStream outputStream = Files.newOutputStream(path, options))
{
SpecificPlaylist specificPlaylist = specificPlaylistFactory.getProvider(playlistFormat).toSpecificPlaylist(playlist);
specificPlaylist.writeTo(outputStream, null);
specificPlaylist.writeTo(outputStream);
return specificPlaylist;
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/listfix/model/playlists/Playlist.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private void loadPlaylistEntries(List<PlaylistEntry> playlistEntries, Path playl
final InputStream observableInputStream = observer == null ? is : new ObservableInputStream(is, Files.size(playlistPath), observer);
try
{
this.specificPlaylist = specificPlaylistProvider.readFrom(observableInputStream, null);
this.specificPlaylist = specificPlaylistProvider.readFrom(observableInputStream);
if (this.specificPlaylist != null)
{
toPlaylistEntries(playlistEntries, this.specificPlaylist.toPlaylist().getRootSequence());
Expand Down Expand Up @@ -985,8 +985,7 @@ public final void save(PlaylistFormat format, IProgressObserver<String> observer
OutputStream observableOutputStream = observer == null ? os : new ObservableOutputStream(os, currentFileSize, observer);
try
{
final String encoding = this.playlistPath.toString().toLowerCase().endsWith(".m3u8") ? "UTF-8" : null;
this.specificPlaylist.writeTo(observableOutputStream, encoding);
this.specificPlaylist.writeTo(observableOutputStream);
}
catch (Exception e)
{
Expand Down

0 comments on commit 8ce1b71

Please sign in to comment.