Skip to content

Commit

Permalink
#4 - bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Jul 14, 2022
1 parent bbb536c commit 5574089
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: scala
scala:
- 2.12.4
- 2.13.8
jdk:
- oraclejdk11
- oraclejdk17

after_success:
- sbt clean
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ if [[ $ARCH == 'arm64' ]]; then
--platform linux/amd64,linux/arm64 \
-t mbari/vampire-squid:${VCS_REF} \
-t mbari/vampire-squid:latest \
--push .
--push . && \
docker pull mbari/vampire-squid:${VCS_REF}
else
docker build --build-arg BUILD_DATE=$BUILD_DATE \
--build-arg VCS_REF=$VCS_REF \
Expand Down
28 changes: 0 additions & 28 deletions build_m1.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ class MediaController(val daoFactory: JPADAOFactory) extends BaseController {

val video = vDao.findByName(videoName) match {
// if a duration if provided, make sure it matches the existing duration
case Some(v) if (duration.map(d => d.toMillis().equals(v.duration.toMillis())).getOrElse(true))=>
case Some(v) if (
duration.map(d => d.toMillis().equals(v.duration.toMillis())).getOrElse(true) &&
start.equals(v.start))=>
v.addVideoReference(vr)
v
case None =>
Expand All @@ -134,7 +136,7 @@ class MediaController(val daoFactory: JPADAOFactory) extends BaseController {
case _ =>
throw new IllegalArgumentException(
s"A video with name $videoName " +
s"exists, but it has a different duration than the one you provided"
s"exists, but it has a different duration and/or start time than the one you provided."
)
}

Expand Down

0 comments on commit 5574089

Please sign in to comment.