Skip to content

Commit

Permalink
chore: disable preview playback
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi authored Jul 25, 2024
1 parent 6a2fa8c commit d5e1a72
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ public MirroringAudioTrack(AudioTrackInfo trackInfo, String albumName, String al

@Override
public void process(LocalAudioTrackExecutor executor) throws Exception {
if (this.isPreview) {
if (this.previewUrl == null) {
throw new FriendlyException("No preview url found", FriendlyException.Severity.COMMON, new IllegalArgumentException());
}
try (var httpInterface = this.sourceManager.getHttpInterface()) {
try (var stream = new PersistentHttpStream(httpInterface, new URI(this.previewUrl), this.trackInfo.length)) {
processDelegate(createAudioTrack(this.trackInfo, stream), executor);
}
}
return;
}
var track = this.sourceManager.getResolver().apply(this);

if (track instanceof AudioPlaylist) {
Expand Down

0 comments on commit d5e1a72

Please sign in to comment.