fix cover url export to audiocove
This commit is contained in:
@@ -211,25 +211,21 @@ public class StoryService {
|
||||
@Transactional
|
||||
public Story setCoverImage(UUID id, String imagePath) {
|
||||
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);
|
||||
return storyRepository.save(story);
|
||||
Story savedStory = storyRepository.save(story);
|
||||
searchServiceAdapter.updateStory(savedStory);
|
||||
return savedStory;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
||||
@Transactional
|
||||
public void removeCoverImage(UUID id) {
|
||||
Story story = findById(id);
|
||||
|
||||
|
||||
if (story.getCoverPath() != null && !story.getCoverPath().isEmpty()) {
|
||||
// Note: ImageService would be injected here to delete file
|
||||
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) {
|
||||
Story story = findById(id);
|
||||
story.setCoverPath(coverPath);
|
||||
return storyRepository.save(story);
|
||||
Story savedStory = storyRepository.save(story);
|
||||
searchServiceAdapter.updateStory(savedStory);
|
||||
return savedStory;
|
||||
}
|
||||
|
||||
public Story removeCover(UUID id) {
|
||||
Story story = findById(id);
|
||||
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) {
|
||||
|
||||
@@ -43,6 +43,7 @@ services:
|
||||
- STORYCOVE_CORS_ALLOWED_ORIGINS=${STORYCOVE_CORS_ALLOWED_ORIGINS:-http://localhost:3000,http://localhost:6925}
|
||||
- AUDIOCOVE_URL=${AUDIOCOVE_URL:-}
|
||||
- AUDIOCOVE_API_KEY=${AUDIOCOVE_API_KEY:-}
|
||||
- STORYCOVE_PUBLIC_URL=${STORYCOVE_PUBLIC_URL:-http://localhost:6925}
|
||||
volumes:
|
||||
- ${DATA_DIR:-/volume1/docker/storycove}/images:/app/images
|
||||
- ${DATA_DIR:-/volume1/docker/storycove}/config:/app/config
|
||||
|
||||
Reference in New Issue
Block a user