mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-12 21:30:29 +05:30
chore: remove unused imports
This commit is contained in:
parent
30e6bf2a7d
commit
6cac1ca8a1
@ -8,7 +8,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
|||||||
import io.minio.MinioClient;
|
import io.minio.MinioClient;
|
||||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||||
import me.kavin.piped.utils.PageMixin;
|
import me.kavin.piped.utils.PageMixin;
|
||||||
import me.kavin.piped.utils.RequestUtils;
|
|
||||||
import me.kavin.piped.utils.resp.ListLinkHandlerMixin;
|
import me.kavin.piped.utils.resp.ListLinkHandlerMixin;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.brotli.BrotliInterceptor;
|
import okhttp3.brotli.BrotliInterceptor;
|
||||||
@ -19,17 +18,13 @@ import org.schabi.newpipe.extractor.Page;
|
|||||||
import org.schabi.newpipe.extractor.StreamingService;
|
import org.schabi.newpipe.extractor.StreamingService;
|
||||||
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
|
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
|
||||||
import org.schabi.newpipe.extractor.localization.ContentCountry;
|
import org.schabi.newpipe.extractor.localization.ContentCountry;
|
||||||
import rocks.kavin.reqwest4j.ReqwestUtils;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.net.InetSocketAddress;
|
|
||||||
import java.net.ProxySelector;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
public class Constants {
|
public class Constants {
|
||||||
|
|
||||||
|
@ -2,15 +2,12 @@ package me.kavin.piped.server;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.rometools.rome.feed.synd.SyndFeed;
|
|
||||||
import com.rometools.rome.io.SyndFeedInput;
|
|
||||||
import io.activej.config.Config;
|
import io.activej.config.Config;
|
||||||
import io.activej.http.*;
|
import io.activej.http.*;
|
||||||
import io.activej.inject.annotation.Provides;
|
import io.activej.inject.annotation.Provides;
|
||||||
import io.activej.inject.module.AbstractModule;
|
import io.activej.inject.module.AbstractModule;
|
||||||
import io.activej.inject.module.Module;
|
import io.activej.inject.module.Module;
|
||||||
import io.activej.launchers.http.MultithreadedHttpServerLauncher;
|
import io.activej.launchers.http.MultithreadedHttpServerLauncher;
|
||||||
import io.sentry.Sentry;
|
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
||||||
import me.kavin.piped.consts.Constants;
|
import me.kavin.piped.consts.Constants;
|
||||||
import me.kavin.piped.server.handlers.*;
|
import me.kavin.piped.server.handlers.*;
|
||||||
@ -19,30 +16,20 @@ import me.kavin.piped.server.handlers.auth.FeedHandlers;
|
|||||||
import me.kavin.piped.server.handlers.auth.StorageHandlers;
|
import me.kavin.piped.server.handlers.auth.StorageHandlers;
|
||||||
import me.kavin.piped.server.handlers.auth.UserHandlers;
|
import me.kavin.piped.server.handlers.auth.UserHandlers;
|
||||||
import me.kavin.piped.utils.*;
|
import me.kavin.piped.utils.*;
|
||||||
import me.kavin.piped.utils.obj.MatrixHelper;
|
|
||||||
import me.kavin.piped.utils.obj.federation.FederatedVideoInfo;
|
|
||||||
import me.kavin.piped.utils.resp.*;
|
import me.kavin.piped.utils.resp.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.StatelessSession;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
|
||||||
import org.schabi.newpipe.extractor.localization.DateWrapper;
|
|
||||||
import org.xml.sax.InputSource;
|
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import static io.activej.config.converter.ConfigConverters.ofInetSocketAddress;
|
import static io.activej.config.converter.ConfigConverters.ofInetSocketAddress;
|
||||||
import static io.activej.http.HttpHeaders.*;
|
import static io.activej.http.HttpHeaders.*;
|
||||||
import static io.activej.http.HttpMethod.*;
|
import static io.activej.http.HttpMethod.*;
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
import static me.kavin.piped.consts.Constants.YOUTUBE_SERVICE;
|
|
||||||
import static me.kavin.piped.consts.Constants.mapper;
|
import static me.kavin.piped.consts.Constants.mapper;
|
||||||
|
|
||||||
public class ServerLauncher extends MultithreadedHttpServerLauncher {
|
public class ServerLauncher extends MultithreadedHttpServerLauncher {
|
||||||
|
@ -30,7 +30,8 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
|||||||
import static me.kavin.piped.consts.Constants.YOUTUBE_SERVICE;
|
import static me.kavin.piped.consts.Constants.YOUTUBE_SERVICE;
|
||||||
import static me.kavin.piped.consts.Constants.mapper;
|
import static me.kavin.piped.consts.Constants.mapper;
|
||||||
import static me.kavin.piped.utils.CollectionUtils.collectRelatedItems;
|
import static me.kavin.piped.utils.CollectionUtils.collectRelatedItems;
|
||||||
import static me.kavin.piped.utils.URLUtils.*;
|
import static me.kavin.piped.utils.URLUtils.getLastThumbnail;
|
||||||
|
import static me.kavin.piped.utils.URLUtils.substringYouTube;
|
||||||
|
|
||||||
public class PlaylistHandlers {
|
public class PlaylistHandlers {
|
||||||
public static byte[] playlistResponse(String playlistId) throws Exception {
|
public static byte[] playlistResponse(String playlistId) throws Exception {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package me.kavin.piped.server.handlers.auth;
|
package me.kavin.piped.server.handlers.auth;
|
||||||
|
|
||||||
import com.rometools.rome.feed.synd.*;
|
import com.rometools.rome.feed.synd.SyndEntry;
|
||||||
|
import com.rometools.rome.feed.synd.SyndFeed;
|
||||||
import com.rometools.rome.io.FeedException;
|
import com.rometools.rome.io.FeedException;
|
||||||
import com.rometools.rome.io.SyndFeedOutput;
|
import com.rometools.rome.io.SyndFeedOutput;
|
||||||
import jakarta.persistence.criteria.CriteriaBuilder;
|
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package me.kavin.piped.utils;
|
package me.kavin.piped.utils;
|
||||||
|
|
||||||
import com.rometools.modules.mediarss.MediaEntryModuleImpl;
|
import com.rometools.modules.mediarss.MediaEntryModuleImpl;
|
||||||
import com.rometools.modules.mediarss.types.*;
|
import com.rometools.modules.mediarss.types.MediaContent;
|
||||||
|
import com.rometools.modules.mediarss.types.Metadata;
|
||||||
|
import com.rometools.modules.mediarss.types.PlayerReference;
|
||||||
|
import com.rometools.modules.mediarss.types.Thumbnail;
|
||||||
import com.rometools.rome.feed.synd.*;
|
import com.rometools.rome.feed.synd.*;
|
||||||
import me.kavin.piped.consts.Constants;
|
import me.kavin.piped.consts.Constants;
|
||||||
import me.kavin.piped.utils.obj.db.Channel;
|
import me.kavin.piped.utils.obj.db.Channel;
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
package me.kavin.piped.utils;
|
package me.kavin.piped.utils;
|
||||||
|
|
||||||
import me.kavin.piped.utils.obj.db.Playlist;
|
import me.kavin.piped.utils.obj.db.Playlist;
|
||||||
import org.hibernate.Session;
|
|
||||||
|
|
||||||
import me.kavin.piped.utils.obj.db.User;
|
import me.kavin.piped.utils.obj.db.User;
|
||||||
|
import org.hibernate.Session;
|
||||||
|
|
||||||
public class PlaylistHelpers {
|
public class PlaylistHelpers {
|
||||||
public static Playlist getUserPlaylist(Session s, User user, String playlistId) throws IllegalArgumentException {
|
public static Playlist getUserPlaylist(Session s, User user, String playlistId) throws IllegalArgumentException {
|
||||||
|
@ -6,7 +6,6 @@ import me.kavin.piped.consts.Constants;
|
|||||||
import me.kavin.piped.utils.obj.db.Video;
|
import me.kavin.piped.utils.obj.db.Video;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.hibernate.StatelessSession;
|
import org.hibernate.StatelessSession;
|
||||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor;
|
|
||||||
import org.schabi.newpipe.extractor.stream.StreamExtractor;
|
import org.schabi.newpipe.extractor.stream.StreamExtractor;
|
||||||
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
import org.schabi.newpipe.extractor.stream.StreamInfo;
|
||||||
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
||||||
|
Loading…
Reference in New Issue
Block a user