fix cover url export to audiocove
This commit is contained in:
@@ -212,14 +212,10 @@ public class StoryService {
|
|||||||
public Story setCoverImage(UUID id, String imagePath) {
|
public Story setCoverImage(UUID id, String imagePath) {
|
||||||
Story story = findById(id);
|
Story story = findById(id);
|
||||||
|
|
||||||
// Delete old cover if exists
|
|
||||||
if (story.getCoverPath() != null && !story.getCoverPath().isEmpty()) {
|
|
||||||
// Note: ImageService would be injected here in a real implementation
|
|
||||||
// For now, we just update the path
|
|
||||||
}
|
|
||||||
|
|
||||||
story.setCoverPath(imagePath);
|
story.setCoverPath(imagePath);
|
||||||
return storyRepository.save(story);
|
Story savedStory = storyRepository.save(story);
|
||||||
|
searchServiceAdapter.updateStory(savedStory);
|
||||||
|
return savedStory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -227,9 +223,9 @@ public class StoryService {
|
|||||||
Story story = findById(id);
|
Story story = findById(id);
|
||||||
|
|
||||||
if (story.getCoverPath() != null && !story.getCoverPath().isEmpty()) {
|
if (story.getCoverPath() != null && !story.getCoverPath().isEmpty()) {
|
||||||
// Note: ImageService would be injected here to delete file
|
|
||||||
story.setCoverPath(null);
|
story.setCoverPath(null);
|
||||||
storyRepository.save(story);
|
Story savedStory = storyRepository.save(story);
|
||||||
|
searchServiceAdapter.updateStory(savedStory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,13 +486,17 @@ public class StoryService {
|
|||||||
public Story setCover(UUID id, String coverPath) {
|
public Story setCover(UUID id, String coverPath) {
|
||||||
Story story = findById(id);
|
Story story = findById(id);
|
||||||
story.setCoverPath(coverPath);
|
story.setCoverPath(coverPath);
|
||||||
return storyRepository.save(story);
|
Story savedStory = storyRepository.save(story);
|
||||||
|
searchServiceAdapter.updateStory(savedStory);
|
||||||
|
return savedStory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Story removeCover(UUID id) {
|
public Story removeCover(UUID id) {
|
||||||
Story story = findById(id);
|
Story story = findById(id);
|
||||||
story.setCoverPath(null);
|
story.setCoverPath(null);
|
||||||
return storyRepository.save(story);
|
Story savedStory = storyRepository.save(story);
|
||||||
|
searchServiceAdapter.updateStory(savedStory);
|
||||||
|
return savedStory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Story addToSeries(UUID storyId, UUID seriesId, Double volume) {
|
public Story addToSeries(UUID storyId, UUID seriesId, Double volume) {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ services:
|
|||||||
- STORYCOVE_CORS_ALLOWED_ORIGINS=${STORYCOVE_CORS_ALLOWED_ORIGINS:-http://localhost:3000,http://localhost:6925}
|
- STORYCOVE_CORS_ALLOWED_ORIGINS=${STORYCOVE_CORS_ALLOWED_ORIGINS:-http://localhost:3000,http://localhost:6925}
|
||||||
- AUDIOCOVE_URL=${AUDIOCOVE_URL:-}
|
- AUDIOCOVE_URL=${AUDIOCOVE_URL:-}
|
||||||
- AUDIOCOVE_API_KEY=${AUDIOCOVE_API_KEY:-}
|
- AUDIOCOVE_API_KEY=${AUDIOCOVE_API_KEY:-}
|
||||||
|
- STORYCOVE_PUBLIC_URL=${STORYCOVE_PUBLIC_URL:-http://localhost:6925}
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_DIR:-/volume1/docker/storycove}/images:/app/images
|
- ${DATA_DIR:-/volume1/docker/storycove}/images:/app/images
|
||||||
- ${DATA_DIR:-/volume1/docker/storycove}/config:/app/config
|
- ${DATA_DIR:-/volume1/docker/storycove}/config:/app/config
|
||||||
|
|||||||
Reference in New Issue
Block a user