fix: Peertube playlist urls

This commit is contained in:
ThetaDev 2022-10-24 00:37:12 +02:00
parent 53e772c3d9
commit e6907ca1bd
3 changed files with 4 additions and 5 deletions

View File

@ -121,7 +121,7 @@ public class PeertubeAccountExtractor extends ChannelExtractor {
@Nonnull
@Override
public List<ChannelTabHandler> getTabs() throws ParsingException {
public List<ChannelTabHandler> getTabs() {
return Collections.singletonList(
new ChannelTabHandler(getLinkHandler(), ChannelTabHandler.Tab.Channels));
}

View File

@ -100,7 +100,7 @@ public class PeertubeChannelExtractor extends ChannelExtractor {
@Nonnull
@Override
public List<ChannelTabHandler> getTabs() throws ParsingException {
public List<ChannelTabHandler> getTabs() {
return Collections.singletonList(
new ChannelTabHandler(getLinkHandler(), ChannelTabHandler.Tab.Playlists));
}

View File

@ -1,7 +1,6 @@
package org.schabi.newpipe.extractor.services.peertube.extractors;
import com.grack.nanojson.JsonObject;
import org.schabi.newpipe.extractor.ServiceList;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.playlist.PlaylistInfoItemExtractor;
@ -21,8 +20,8 @@ public class PeertubePlaylistInfoItemExtractor implements PlaylistInfoItemExtrac
@Override
public String getUrl() throws ParsingException {
final String uuid = JsonUtils.getString(item, "uuid");
return ServiceList.PeerTube.getPlaylistLHFactory().fromId(uuid, baseUrl).getUrl();
final String uuid = JsonUtils.getString(item, "shortUUID");
return baseUrl + "/w/p/" + uuid;
}
@Override