diff --git a/back/src/org/kar/karideo/api/UserMediaAdvancementResource.java b/back/src/org/kar/karideo/api/UserMediaAdvancementResource.java index 49c5669..a7a20a3 100644 --- a/back/src/org/kar/karideo/api/UserMediaAdvancementResource.java +++ b/back/src/org/kar/karideo/api/UserMediaAdvancementResource.java @@ -77,7 +77,11 @@ public class UserMediaAdvancementResource { UserMediaAdvancement elem = this.getWithId(sc, id); if (elem == null) { // insert element - return this.post(sc, id, new MediaInformations(data.time(), data.percent(), 0)); + if (data.addCount) { + return this.post(sc, id, new MediaInformations(data.time(), data.percent(), 1)); + } else { + return this.post(sc, id, new MediaInformations(data.time(), data.percent(), 0)); + } } elem.time = data.time; elem.percent = data.percent; diff --git a/back/src/org/kar/karideo/migration/Migration20230810.java b/back/src/org/kar/karideo/migration/Migration20230810.java index 482bd25..d67cd7c 100644 --- a/back/src/org/kar/karideo/migration/Migration20230810.java +++ b/back/src/org/kar/karideo/migration/Migration20230810.java @@ -16,7 +16,7 @@ public class Migration20230810 extends MigrationSqlStep { addClass(UserMediaAdvancement.class); addAction(""" - ALTER TABLE `userMediaAdvencement` AUTO_INCREMENT = 1000; + ALTER TABLE `userMediaAdvancement` AUTO_INCREMENT = 1000; """); } diff --git a/front/src/app/component/element-video/element-video.html b/front/src/app/component/element-video/element-video.html index 718c465..b9fac47 100644 --- a/front/src/app/component/element-video/element-video.html +++ b/front/src/app/component/element-video/element-video.html @@ -1,18 +1,24 @@