Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
civitas-digitalis
platform
Commits
2f03005c
Commit
2f03005c
authored
Jul 12, 2018
by
Elias Englmeier
Browse files
fixed a bug
parent
3f068ed1
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/ideaService/ideaService-service/bin/ideaService/service/impl/IdeasLocalServiceImpl.class
View file @
2f03005c
No preview for this file type
modules/ideaService/ideaService-service/src/main/java/ideaService/service/avconversion/VideoConverter.java
View file @
2f03005c
...
...
@@ -121,14 +121,6 @@ public class VideoConverter extends BaseBackgroundTaskExecutor {
logger
.
info
(
"CREATED ENTRY: "
+
fileUrl
);
VideosLocalServiceUtil
.
createNewVideoEntry
(
i
.
getPrimaryKey
(),
createdEntry
.
getPrimaryKey
(),
fileUrl
,
convertTo
);
// String newIdeasVideoUrlEntry;
// if(i.getVideoUrl() != null && !i.getVideoUrl().equals("")){
// newIdeasVideoUrlEntry = i.getVideoUrl() + "," + fileUrl;
// }else{
// newIdeasVideoUrlEntry = fileUrl;
// }
// i.setVideoUrl(newIdeasVideoUrlEntry);
// i.persist();
logger
.
info
(
"-------------------------------- Deleting temp files -----------------------------------"
);
tmpSourceFile
.
delete
();
...
...
modules/ideaService/ideaService-service/src/main/java/ideaService/service/impl/IdeasLocalServiceImpl.java
View file @
2f03005c
...
...
@@ -162,10 +162,6 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
public
void
addVideoToExistingIdea
(
long
ideasId
,
long
videoId
,
String
videoRef
,
ThemeDisplay
themedisplay
){
try
{
Ideas
i
=
IdeasUtil
.
findByPrimaryKey
(
ideasId
);
// i.setVideoFileRef(videoId);
// //i.setVideoUrl(videoRef);
// i.persist();
VideosLocalServiceUtil
.
createNewVideoEntry
(
ideasId
,
videoId
,
videoRef
,
VideoExtensions
.
ORIGINAL
.
getVideoExtensionDescription
());
startBackgroundVideoConversion
(
i
,
VideoExtensions
.
WEBM
.
getVideoExtensionDescription
(),
themedisplay
);
...
...
modules/ideaService/ideaService-service/src/main/java/ideaService/service/impl/VideosLocalServiceImpl.java
View file @
2f03005c
...
...
@@ -51,18 +51,21 @@ public class VideosLocalServiceImpl extends VideosLocalServiceBaseImpl {
try
{
Videos
v
=
this
.
getVideoUrlByIdeaRefAndExtension
(
ideasRef
,
extension
);
DLAppLocalServiceUtil
.
deleteFileEntry
(
v
.
getFileRef
());
VideosUtil
.
remove
(
v
.
getPrimaryKey
());
if
(
v
!=
null
){
DLAppLocalServiceUtil
.
deleteFileEntry
(
v
.
getFileRef
());
VideosUtil
.
remove
(
v
.
getPrimaryKey
());
}
}
catch
(
PortalException
e
)
{
e
.
printStackTrace
();
}
int
nextDbId
=
(
int
)
CounterLocalServiceUtil
.
increment
(
Videos
.
class
.
getName
());
Videos
next
Pic
=
VideosLocalServiceUtil
.
createVideos
(
nextDbId
);
next
Pic
.
setIdeasRef
(
ideasRef
);
next
Pic
.
setExtension
(
extension
);
next
Pic
.
setFileRef
(
fileRef
);
next
Pic
.
setVideoUrl
(
videoUrl
);
next
Pic
.
persist
();
return
next
Pic
.
getPrimaryKey
();
Videos
next
Video
=
VideosLocalServiceUtil
.
createVideos
(
nextDbId
);
next
Video
.
setIdeasRef
(
ideasRef
);
next
Video
.
setExtension
(
extension
);
next
Video
.
setFileRef
(
fileRef
);
next
Video
.
setVideoUrl
(
videoUrl
);
next
Video
.
persist
();
return
next
Video
.
getPrimaryKey
();
}
public
List
<
Videos
>
getAllVideosForIdeasRef
(
long
ideasRef
)
throws
NoSuchVideosException
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment