Compare commits

...

2 Commits

143 changed files with 412 additions and 468 deletions

View File

@ -1,71 +0,0 @@
# .pipeline.yml
# -----------------
# Build, publish, and deploy Java Spring Boot app
when:
event: [ push, pull_request ]
steps:
- name: test
image: maven:3.9.11-eclipse-temurin-25
commands:
- echo "🧪 Building and testing Spring Boot app...."
- mvn -B clean verify
when:
- event: pull_request
branch: [main, develop]
- event: push
branch: [ main, develop ]
- name: publish-image
depends_on: [ test ]
image: woodpeckerci/plugin-docker-buildx
settings:
platforms: linux/amd64
repo: git.badger-pirarucu.ts.net/mangamochi/backend
registry: git.badger-pirarucu.ts.net
dockerfile: Dockerfile
context: .
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_PASSWORD
tags:
- latest
- ${CI_COMMIT_SHA}
when:
event: [ push ]
branch: [ main ]
- name: deploy
depends_on: [ publish-image ]
image: alpine:3.20
environment:
DEPLOY_USER: rov
DEPLOY_HOST: mangamochi.badger-pirarucu.ts.net
DEPLOY_PORT: 22
IMAGE: git.badger-pirarucu.ts.net/mangamochi/backend:${CI_COMMIT_SHA}
DEPLOY_SSH_KEY:
from_secret: DEPLOY_SSH_KEY
commands:
- echo "🚀 Deploying to $DEPLOY_HOST..."
- apk add --no-cache openssh-client docker-cli
- mkdir -p ~/.ssh
- echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts
- >
ssh -p $DEPLOY_PORT $DEPLOY_USER@$DEPLOY_HOST "
docker pull $IMAGE &&
docker stop mangamochi-backend 2>/dev/null || true &&
docker rm mangamochi-backend 2>/dev/null || true &&
docker run -d --name mangamochi-backend \
--restart always \
--network host \
--env-file /home/rov/mangamochi/.env \
-p 8080:8080 \
$IMAGE
"
when:
event: [ push ]
branch: [ main ]

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi;
package com.magamochi;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.client;
package com.magamochi.client;
import io.github.resilience4j.retry.annotation.Retry;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.client;
package com.magamochi.client;
import io.github.resilience4j.retry.annotation.Retry;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.client;
package com.magamochi.client;
import io.github.resilience4j.retry.annotation.Retry;
import java.time.OffsetDateTime;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.client;
package com.magamochi.client;
import com.magamochi.mangamochi.model.dto.MangaDexMangaDTO;
import com.magamochi.model.dto.MangaDexMangaDTO;
import io.github.resilience4j.retry.annotation.Retry;
import java.util.List;
import java.util.UUID;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.client;
package com.magamochi.client;
import io.github.resilience4j.retry.annotation.Retry;
import org.springframework.cloud.openfeign.FeignClient;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.config;
package com.magamochi.config;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.config;
package com.magamochi.config;
import com.google.common.util.concurrent.RateLimiter;
import org.springframework.context.annotation.Bean;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.config;
package com.magamochi.config;
import java.net.URI;
import org.springframework.beans.factory.annotation.Value;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.config;
package com.magamochi.config;
import lombok.NonNull;
import org.springframework.context.annotation.Configuration;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.controller;
package com.magamochi.controller;
import com.magamochi.mangamochi.model.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.GenreDTO;
import com.magamochi.mangamochi.service.GenreService;
import com.magamochi.model.dto.DefaultResponseDTO;
import com.magamochi.model.dto.GenreDTO;
import com.magamochi.service.GenreService;
import io.swagger.v3.oas.annotations.Operation;
import java.util.List;
import lombok.RequiredArgsConstructor;

View File

@ -1,13 +1,13 @@
package com.magamochi.mangamochi.controller;
package com.magamochi.controller;
import com.magamochi.mangamochi.client.NtfyClient;
import com.magamochi.mangamochi.model.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.UpdateMangaDataCommand;
import com.magamochi.mangamochi.model.repository.UserRepository;
import com.magamochi.mangamochi.queue.UpdateMangaDataProducer;
import com.magamochi.mangamochi.task.ImageCleanupTask;
import com.magamochi.mangamochi.task.MangaFollowUpdateTask;
import com.magamochi.mangamochi.task.UpdateMangaListTask;
import com.magamochi.client.NtfyClient;
import com.magamochi.model.dto.DefaultResponseDTO;
import com.magamochi.model.dto.UpdateMangaDataCommand;
import com.magamochi.queue.UpdateMangaDataProducer;
import com.magamochi.task.ImageCleanupTask;
import com.magamochi.task.MangaFollowUpdateTask;
import com.magamochi.task.UpdateMangaListTask;
import com.magamochi.user.model.repository.UserRepository;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

View File

@ -1,8 +1,9 @@
package com.magamochi.mangamochi.controller;
package com.magamochi.controller;
import com.magamochi.mangamochi.model.dto.*;
import com.magamochi.mangamochi.model.enumeration.ArchiveFileType;
import com.magamochi.mangamochi.service.MangaChapterService;
import com.magamochi.model.dto.DefaultResponseDTO;
import com.magamochi.model.dto.MangaChapterImagesDTO;
import com.magamochi.model.enumeration.ArchiveFileType;
import com.magamochi.service.MangaChapterService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.controller;
package com.magamochi.controller;
import com.magamochi.mangamochi.model.dto.*;
import com.magamochi.mangamochi.service.MangaService;
import com.magamochi.model.dto.*;
import com.magamochi.service.MangaService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import java.util.List;

View File

@ -1,8 +1,10 @@
package com.magamochi.mangamochi.controller;
package com.magamochi.controller;
import com.magamochi.mangamochi.model.dto.*;
import com.magamochi.mangamochi.service.MangaImportService;
import com.magamochi.mangamochi.service.ProviderManualMangaImportService;
import com.magamochi.model.dto.DefaultResponseDTO;
import com.magamochi.model.dto.ImportMangaResponseDTO;
import com.magamochi.model.dto.ImportRequestDTO;
import com.magamochi.service.MangaImportService;
import com.magamochi.service.ProviderManualMangaImportService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.controller;
package com.magamochi.controller;
import com.magamochi.mangamochi.model.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.model.dto.ImportReviewDTO;
import com.magamochi.mangamochi.service.MangaImportReviewService;
import com.magamochi.model.dto.DefaultResponseDTO;
import com.magamochi.model.dto.ImportReviewDTO;
import com.magamochi.service.MangaImportReviewService;
import io.swagger.v3.oas.annotations.Operation;
import java.util.List;
import lombok.RequiredArgsConstructor;

View File

@ -1,7 +1,8 @@
package com.magamochi.mangamochi.controller;
package com.magamochi.controller;
import com.magamochi.mangamochi.model.dto.*;
import com.magamochi.mangamochi.service.ProviderService;
import com.magamochi.model.dto.DefaultResponseDTO;
import com.magamochi.model.dto.ProviderListDTO;
import com.magamochi.service.ProviderService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.controller;
package com.magamochi.controller;
import com.magamochi.mangamochi.model.dto.DefaultResponseDTO;
import com.magamochi.mangamochi.service.UserFavoriteMangaService;
import com.magamochi.model.dto.DefaultResponseDTO;
import com.magamochi.service.UserFavoriteMangaService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.exception;
package com.magamochi.exception;
public class ConflictException extends RuntimeException {
public ConflictException(String message) {

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.exception;
package com.magamochi.exception;
import com.magamochi.mangamochi.model.dto.ErrorResponseDTO;
import com.magamochi.model.dto.ErrorResponseDTO;
import java.time.Instant;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.exception;
package com.magamochi.exception;
public class NotFoundException extends RuntimeException {
public NotFoundException(String message) {

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.exception;
package com.magamochi.exception;
public class UnprocessableException extends RuntimeException {
public UnprocessableException(String message) {

View File

@ -1,6 +0,0 @@
package com.magamochi.mangamochi.model.enumeration;
public enum ArchiveFileType {
CBZ,
CBR
}

View File

@ -1,5 +0,0 @@
package com.magamochi.mangamochi.model.enumeration;
public enum UserRole {
USER
}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import jakarta.validation.constraints.NotBlank;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.enumeration.MangaStatus;
import com.magamochi.model.enumeration.MangaStatus;
import jakarta.validation.constraints.NotBlank;
public record ContentProviderMangaInfoResponseDTO(

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import jakarta.annotation.Nullable;
import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.Genre;
import com.magamochi.model.entity.Genre;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import jakarta.validation.constraints.NotNull;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import jakarta.validation.constraints.NotNull;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.MangaImportReview;
import com.magamochi.model.entity.MangaImportReview;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.Instant;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import static java.util.Objects.isNull;
import com.magamochi.mangamochi.model.entity.Language;
import com.magamochi.model.entity.Language;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.MangaChapter;
import com.magamochi.model.entity.MangaChapter;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
public record MangaChapterDownloadCommand(Long chapterId) {}

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaChapterImage;
import com.magamochi.model.entity.MangaChapter;
import com.magamochi.model.entity.MangaChapterImage;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.Comparator;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import jakarta.validation.constraints.NotNull;
import java.util.UUID;

View File

@ -1,12 +1,12 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import static java.util.Objects.isNull;
import com.magamochi.mangamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.MangaAlternativeTitle;
import com.magamochi.mangamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaProvider;
import com.magamochi.mangamochi.model.enumeration.ProviderStatus;
import com.magamochi.model.entity.Manga;
import com.magamochi.model.entity.MangaAlternativeTitle;
import com.magamochi.model.entity.MangaChapter;
import com.magamochi.model.entity.MangaProvider;
import com.magamochi.model.enumeration.ProviderStatus;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.OffsetDateTime;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import java.util.List;
import java.util.Map;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import static java.util.Objects.nonNull;
import com.magamochi.mangamochi.model.entity.Manga;
import com.magamochi.model.entity.Manga;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.OffsetDateTime;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import java.util.List;

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
public record MangaListUpdateCommand(String contentProviderName, Integer page) {}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import java.util.List;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import com.magamochi.mangamochi.model.entity.*;
import com.magamochi.model.entity.Provider;
import jakarta.validation.constraints.NotNull;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import java.util.List;
import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
import lombok.Builder;
import lombok.Getter;

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
public record UpdateMangaDataCommand(Long mangaId) {}

View File

@ -1,3 +1,3 @@
package com.magamochi.mangamochi.model.dto;
package com.magamochi.model.dto;
public record UpdateMangaFollowChapterListCommand(Long mangaProviderId) {}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import java.time.Instant;
import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import lombok.*;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import java.time.Instant;

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import jakarta.persistence.*;
import java.time.Instant;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import com.magamochi.mangamochi.model.enumeration.ProviderStatus;
import com.magamochi.model.enumeration.ProviderStatus;
import jakarta.persistence.*;
import java.time.Instant;
import java.util.List;

View File

@ -1,5 +1,6 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import com.magamochi.user.model.entity.User;
import jakarta.persistence.*;
import java.time.Instant;
import lombok.*;

View File

@ -1,5 +1,6 @@
package com.magamochi.mangamochi.model.entity;
package com.magamochi.model.entity;
import com.magamochi.user.model.entity.User;
import jakarta.persistence.*;
import lombok.*;

View File

@ -0,0 +1,6 @@
package com.magamochi.model.enumeration;
public enum ArchiveFileType {
CBZ,
CBR
}

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.enumeration;
package com.magamochi.model.enumeration;
public enum MangaStatus {
ONGOING,

View File

@ -1,4 +1,4 @@
package com.magamochi.mangamochi.model.enumeration;
package com.magamochi.model.enumeration;
public enum ProviderStatus {
ACTIVE,

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Author;
import com.magamochi.model.entity.Author;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Genre;
import com.magamochi.model.entity.Genre;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Image;
import com.magamochi.model.entity.Image;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Language;
import com.magamochi.model.entity.Language;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.MangaAlternativeTitle;
import com.magamochi.model.entity.MangaAlternativeTitle;
import org.springframework.data.jpa.repository.JpaRepository;
public interface MangaAlternativeTitlesRepository

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Author;
import com.magamochi.mangamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.MangaAuthor;
import com.magamochi.model.entity.Author;
import com.magamochi.model.entity.Manga;
import com.magamochi.model.entity.MangaAuthor;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaChapterImage;
import com.magamochi.model.entity.MangaChapter;
import com.magamochi.model.entity.MangaChapterImage;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaProvider;
import com.magamochi.model.entity.MangaChapter;
import com.magamochi.model.entity.MangaProvider;
import jakarta.validation.constraints.NotBlank;
import java.util.List;
import java.util.Optional;

View File

@ -1,6 +1,8 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.*;
import com.magamochi.model.entity.Genre;
import com.magamochi.model.entity.Manga;
import com.magamochi.model.entity.MangaGenre;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.MangaImportReview;
import com.magamochi.model.entity.MangaImportReview;
import org.springframework.data.jpa.repository.JpaRepository;
public interface MangaImportReviewRepository extends JpaRepository<MangaImportReview, Long> {

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.MangaProvider;
import com.magamochi.mangamochi.model.entity.Provider;
import com.magamochi.model.entity.Manga;
import com.magamochi.model.entity.MangaProvider;
import com.magamochi.model.entity.Provider;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Manga;
import com.magamochi.model.entity.Manga;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Provider;
import com.magamochi.model.entity.Provider;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.User;
import com.magamochi.mangamochi.model.entity.UserFavoriteManga;
import com.magamochi.model.entity.Manga;
import com.magamochi.model.entity.UserFavoriteManga;
import com.magamochi.user.model.entity.User;
import java.util.Optional;
import java.util.Set;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.model.repository;
package com.magamochi.model.repository;
import com.magamochi.mangamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.User;
import com.magamochi.mangamochi.model.entity.UserMangaFollow;
import com.magamochi.model.entity.Manga;
import com.magamochi.model.entity.UserMangaFollow;
import com.magamochi.user.model.entity.User;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

View File

@ -1,11 +1,11 @@
package com.magamochi.mangamochi.model.specification;
package com.magamochi.model.specification;
import static java.util.Objects.nonNull;
import com.magamochi.mangamochi.model.dto.MangaListFilterDTO;
import com.magamochi.mangamochi.model.entity.Author;
import com.magamochi.mangamochi.model.entity.Manga;
import com.magamochi.mangamochi.model.entity.User;
import com.magamochi.model.dto.MangaListFilterDTO;
import com.magamochi.model.entity.Author;
import com.magamochi.model.entity.Manga;
import com.magamochi.user.model.entity.User;
import jakarta.persistence.criteria.*;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.queue;
package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.MangaChapterDownloadCommand;
import com.magamochi.mangamochi.service.MangaChapterService;
import com.magamochi.model.dto.MangaChapterDownloadCommand;
import com.magamochi.service.MangaChapterService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.queue;
package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.MangaChapterDownloadCommand;
import com.magamochi.model.dto.MangaChapterDownloadCommand;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.queue;
package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.UpdateMangaDataCommand;
import com.magamochi.mangamochi.service.MangaImportService;
import com.magamochi.model.dto.UpdateMangaDataCommand;
import com.magamochi.service.MangaImportService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.queue;
package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.UpdateMangaDataCommand;
import com.magamochi.model.dto.UpdateMangaDataCommand;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.queue;
package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.UpdateMangaFollowChapterListCommand;
import com.magamochi.mangamochi.service.MangaService;
import com.magamochi.model.dto.UpdateMangaFollowChapterListCommand;
import com.magamochi.service.MangaService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.queue;
package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.UpdateMangaFollowChapterListCommand;
import com.magamochi.model.dto.UpdateMangaFollowChapterListCommand;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.queue;
package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.MangaListUpdateCommand;
import com.magamochi.mangamochi.service.MangaListService;
import com.magamochi.model.dto.MangaListUpdateCommand;
import com.magamochi.service.MangaListService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.queue;
package com.magamochi.queue;
import com.magamochi.mangamochi.model.dto.MangaListUpdateCommand;
import com.magamochi.model.dto.MangaListUpdateCommand;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.registry;
package com.magamochi.registry;
import com.magamochi.mangamochi.model.entity.FlareSession;
import com.magamochi.model.entity.FlareSession;
import java.util.concurrent.ConcurrentHashMap;
import lombok.Getter;
import org.springframework.stereotype.Component;

View File

@ -1,6 +1,6 @@
package com.magamochi.mangamochi.service;
package com.magamochi.service;
import com.magamochi.mangamochi.client.FlareClient;
import com.magamochi.client.FlareClient;
import lombok.RequiredArgsConstructor;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

View File

@ -1,11 +1,11 @@
package com.magamochi.mangamochi.service;
package com.magamochi.service;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
import com.magamochi.mangamochi.client.FlareClient;
import com.magamochi.mangamochi.model.entity.FlareSession;
import com.magamochi.mangamochi.registry.FlareSessionRegistry;
import com.magamochi.client.FlareClient;
import com.magamochi.model.entity.FlareSession;
import com.magamochi.registry.FlareSessionRegistry;
import java.time.Duration;
import java.time.Instant;
import lombok.RequiredArgsConstructor;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.service;
package com.magamochi.service;
import com.magamochi.mangamochi.model.dto.GenreDTO;
import com.magamochi.mangamochi.model.repository.GenreRepository;
import com.magamochi.model.dto.GenreDTO;
import com.magamochi.model.repository.GenreRepository;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

View File

@ -1,7 +1,7 @@
package com.magamochi.mangamochi.service;
package com.magamochi.service;
import com.magamochi.mangamochi.model.entity.Image;
import com.magamochi.mangamochi.model.repository.ImageRepository;
import com.magamochi.model.entity.Image;
import com.magamochi.model.repository.ImageRepository;
import java.io.InputStream;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;

View File

@ -1,8 +1,8 @@
package com.magamochi.mangamochi.service;
package com.magamochi.service;
import com.magamochi.mangamochi.exception.NotFoundException;
import com.magamochi.mangamochi.model.entity.Language;
import com.magamochi.mangamochi.model.repository.LanguageRepository;
import com.magamochi.exception.NotFoundException;
import com.magamochi.model.entity.Language;
import com.magamochi.model.repository.LanguageRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

View File

@ -1,15 +1,15 @@
package com.magamochi.mangamochi.service;
package com.magamochi.service;
import com.google.common.util.concurrent.RateLimiter;
import com.magamochi.mangamochi.exception.UnprocessableException;
import com.magamochi.mangamochi.model.dto.MangaChapterArchiveDTO;
import com.magamochi.mangamochi.model.dto.MangaChapterImagesDTO;
import com.magamochi.mangamochi.model.entity.MangaChapter;
import com.magamochi.mangamochi.model.entity.MangaChapterImage;
import com.magamochi.mangamochi.model.enumeration.ArchiveFileType;
import com.magamochi.mangamochi.model.repository.MangaChapterImageRepository;
import com.magamochi.mangamochi.model.repository.MangaChapterRepository;
import com.magamochi.mangamochi.service.providers.ContentProviderFactory;
import com.magamochi.exception.UnprocessableException;
import com.magamochi.model.dto.MangaChapterArchiveDTO;
import com.magamochi.model.dto.MangaChapterImagesDTO;
import com.magamochi.model.entity.MangaChapter;
import com.magamochi.model.entity.MangaChapterImage;
import com.magamochi.model.enumeration.ArchiveFileType;
import com.magamochi.model.repository.MangaChapterImageRepository;
import com.magamochi.model.repository.MangaChapterRepository;
import com.magamochi.service.providers.ContentProviderFactory;
import io.github.resilience4j.retry.Retry;
import io.github.resilience4j.retry.RetryRegistry;
import java.io.BufferedInputStream;

Some files were not shown because too many files have changed in this diff Show More