diff --git a/.github/workflows/deploy-server.yml b/.github/workflows/deploy-server.yml index 8e6a67241..65704f2ff 100644 --- a/.github/workflows/deploy-server.yml +++ b/.github/workflows/deploy-server.yml @@ -6,6 +6,9 @@ on: tags: - '*' +permissions: + packages: write + jobs: build: runs-on: ubuntu-latest @@ -16,7 +19,7 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/joschahenningsen/tum-live/tum-live + images: ghcr.io/tum-dev/gocast/tum-live tags: | type=ref,event=branch type=ref,event=pr diff --git a/.github/workflows/deploy-workers.yml b/.github/workflows/deploy-workers.yml index 15907c3b3..378b1970b 100644 --- a/.github/workflows/deploy-workers.yml +++ b/.github/workflows/deploy-workers.yml @@ -6,6 +6,9 @@ on: tags: - '*' +permissions: + packages: write + jobs: build: runs-on: ubuntu-latest @@ -24,7 +27,7 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/joschahenningsen/tum-live/${{ env.containername }} + images: ghcr.io/tum-dev/gocast/${{ env.containername }} tags: | type=sha flavor: | diff --git a/.github/workflows/ts-deploy.yml b/.github/workflows/ts-deploy.yml index 51b564585..e9e924f41 100644 --- a/.github/workflows/ts-deploy.yml +++ b/.github/workflows/ts-deploy.yml @@ -5,6 +5,9 @@ on: # The branches below must be a subset of the branches above branches: [ dev ] +permissions: + packages: write + jobs: build: runs-on: ubuntu-latest @@ -20,7 +23,7 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/joschahenningsen/tum-live/test-server + images: ghcr.io/tum-dev/gocast/test-server tags: | type=sha flavor: | @@ -46,7 +49,7 @@ jobs: id: metaWorker uses: docker/metadata-action@v4 with: - images: ghcr.io/joschahenningsen/tum-live/test-worker + images: ghcr.io/tum-dev/gocast/test-worker tags: | type=sha flavor: | diff --git a/.idea/runConfigurations/TUM_Live__frontend__worker.xml b/.idea/runConfigurations/TUM_Live__frontend__worker.xml index af915ef9e..3596e70d4 100644 --- a/.idea/runConfigurations/TUM_Live__frontend__worker.xml +++ b/.idea/runConfigurations/TUM_Live__frontend__worker.xml @@ -1,6 +1,6 @@ - + diff --git a/.idea/runConfigurations/run_tumlive_go.xml b/.idea/runConfigurations/run_tumlive_go.xml index fa9c94ae6..58690651b 100644 --- a/.idea/runConfigurations/run_tumlive_go.xml +++ b/.idea/runConfigurations/run_tumlive_go.xml @@ -3,7 +3,7 @@ - + diff --git a/api/audit.go b/api/audit.go index d85483392..61dec7725 100644 --- a/api/audit.go +++ b/api/audit.go @@ -3,9 +3,9 @@ package api import ( "errors" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" "gorm.io/gorm" "net/http" ) diff --git a/api/audit_test.go b/api/audit_test.go index 1b554aa5e..186c71546 100644 --- a/api/audit_test.go +++ b/api/audit_test.go @@ -3,11 +3,11 @@ package api import ( "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "net/http" "testing" diff --git a/api/bookmarks.go b/api/bookmarks.go index 5e45f8dd6..353709961 100644 --- a/api/bookmarks.go +++ b/api/bookmarks.go @@ -3,9 +3,9 @@ package api import ( "errors" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" "gorm.io/gorm" "net/http" "strconv" diff --git a/api/bookmarks_test.go b/api/bookmarks_test.go index 9cba23510..fa4aee13f 100644 --- a/api/bookmarks_test.go +++ b/api/bookmarks_test.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "gorm.io/gorm" "net/http" diff --git a/api/chat.go b/api/chat.go index 715f62518..bc6b575ab 100644 --- a/api/chat.go +++ b/api/chat.go @@ -12,10 +12,10 @@ import ( "gorm.io/gorm" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/realtime" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/realtime" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" diff --git a/api/chat_test.go b/api/chat_test.go index 2037e561f..e9986d22a 100644 --- a/api/chat_test.go +++ b/api/chat_test.go @@ -7,11 +7,11 @@ import ( "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "gorm.io/gorm" ) diff --git a/api/courseimport.go b/api/courseimport.go index 287554888..77e81a55d 100644 --- a/api/courseimport.go +++ b/api/courseimport.go @@ -8,9 +8,9 @@ import ( campusonline "github.com/RBG-TUM/CAMPUSOnline" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/tum" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/tum" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" "html/template" diff --git a/api/courses.go b/api/courses.go index f286e3469..2ae7e1ef7 100644 --- a/api/courses.go +++ b/api/courses.go @@ -8,10 +8,10 @@ import ( "github.com/RBG-TUM/commons" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/tum" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/tum" "github.com/meilisearch/meilisearch-go" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" diff --git a/api/courses_test.go b/api/courses_test.go index 270691467..dcc979f8e 100644 --- a/api/courses_test.go +++ b/api/courses_test.go @@ -7,11 +7,11 @@ import ( "github.com/dgraph-io/ristretto" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "github.com/u2takey/go-utils/uuid" "gorm.io/gorm" diff --git a/api/download.go b/api/download.go index 846015233..47f2ddf51 100644 --- a/api/download.go +++ b/api/download.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "net/http" "os" diff --git a/api/download_ics.go b/api/download_ics.go index 63bb29581..3217eb5f8 100644 --- a/api/download_ics.go +++ b/api/download_ics.go @@ -2,9 +2,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "html/template" "net/http" diff --git a/api/download_ics_test.go b/api/download_ics_test.go index 68f532c29..aa478a5bd 100644 --- a/api/download_ics_test.go +++ b/api/download_ics_test.go @@ -6,11 +6,11 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "html/template" "net/http" diff --git a/api/download_test.go b/api/download_test.go index 8718f8621..d613f7588 100644 --- a/api/download_test.go +++ b/api/download_test.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "log" "net/http" diff --git a/api/info-pages.go b/api/info-pages.go index 1f16416f7..4991e21bf 100644 --- a/api/info-pages.go +++ b/api/info-pages.go @@ -2,9 +2,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" "net/http" "strconv" ) diff --git a/api/info-pages_test.go b/api/info-pages_test.go index aa62b708d..29804c4f3 100644 --- a/api/info-pages_test.go +++ b/api/info-pages_test.go @@ -6,11 +6,11 @@ import ( "github.com/Masterminds/sprig/v3" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "html/template" "net/http" diff --git a/api/lecture_halls.go b/api/lecture_halls.go index 9f3b84583..725669ed3 100644 --- a/api/lecture_halls.go +++ b/api/lecture_halls.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "net/http" "strconv" diff --git a/api/lecture_halls_test.go b/api/lecture_halls_test.go index c108d9f04..e259112b9 100644 --- a/api/lecture_halls_test.go +++ b/api/lecture_halls_test.go @@ -7,11 +7,11 @@ import ( campusonline "github.com/RBG-TUM/CAMPUSOnline" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "html/template" "net/http" diff --git a/api/live_update.go b/api/live_update.go index bc44cea24..443126c3c 100644 --- a/api/live_update.go +++ b/api/live_update.go @@ -6,11 +6,11 @@ import ( "github.com/RBG-TUM/commons" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/realtime" - "github.com/joschahenningsen/TUM-Live/tools/tum" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/realtime" + "github.com/TUM-Dev/gocast/tools/tum" log "github.com/sirupsen/logrus" "sync" ) diff --git a/api/maintenance.go b/api/maintenance.go index 0f55e4cdc..0a321e510 100644 --- a/api/maintenance.go +++ b/api/maintenance.go @@ -2,9 +2,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "net/http" "strconv" diff --git a/api/notifications.go b/api/notifications.go index 1864fc493..2d51c5802 100644 --- a/api/notifications.go +++ b/api/notifications.go @@ -2,9 +2,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "net/http" "strconv" diff --git a/api/notifications_test.go b/api/notifications_test.go index 4ebcaa84f..1ad35ec98 100644 --- a/api/notifications_test.go +++ b/api/notifications_test.go @@ -6,11 +6,11 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "net/http" "testing" diff --git a/api/progress.go b/api/progress.go index 45382b894..5af7b4986 100644 --- a/api/progress.go +++ b/api/progress.go @@ -2,10 +2,9 @@ package api import ( "errors" - "github.com/getsentry/sentry-go" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" "gorm.io/gorm" "net/http" "strconv" @@ -204,25 +203,26 @@ func (r progressRoutes) getProgressBatch(c *gin.Context) { ids = append(ids, uint(id)) } - streamProgresses := make([]model.StreamProgress, len(ids)) + progressResults := make([]model.StreamProgress, len(ids)) + streamProgresses, err := r.LoadProgress(tumLiveContext.User.ID, ids) + if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) { + _ = c.Error(tools.RequestError{ + Status: http.StatusInternalServerError, + CustomMessage: "can not load progress", + Err: err, + }) + return + } for i, id := range ids { - p, err := r.LoadProgress(tumLiveContext.User.ID, id) - if err != nil { - if errors.Is(err, gorm.ErrRecordNotFound) { - streamProgresses[i] = model.StreamProgress{StreamID: id} - } else { - sentry.CaptureException(err) - _ = c.Error(tools.RequestError{ - Err: err, - Status: http.StatusInternalServerError, - CustomMessage: "can't retrieve streamProgresses for user", - }) - return + progressResults[i] = model.StreamProgress{StreamID: id} + for _, progress := range streamProgresses { + if progress.StreamID == id { + progressResults[i].Progress = progress.Progress + progressResults[i].Watched = progress.Watched + break } - } else { - streamProgresses[i] = p } } - c.JSON(http.StatusOK, streamProgresses) + c.JSON(http.StatusOK, progressResults) } diff --git a/api/progress_test.go b/api/progress_test.go index bea9a103b..ede63b0a8 100644 --- a/api/progress_test.go +++ b/api/progress_test.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "gorm.io/gorm" "net/http" @@ -157,7 +157,7 @@ func TestUserProgress(t *testing.T) { progressMock. EXPECT(). LoadProgress(testutils.TUMLiveContextStudent.User.ID, gomock.Any()). - Return(model.StreamProgress{}, errors.New("")) + Return([]model.StreamProgress{}, errors.New("")) return progressMock }(), } @@ -175,7 +175,7 @@ func TestUserProgress(t *testing.T) { progressMock. EXPECT(). LoadProgress(testutils.TUMLiveContextStudent.User.ID, gomock.Any()). - Return(model.StreamProgress{}, gorm.ErrRecordNotFound) + Return([]model.StreamProgress{}, gorm.ErrRecordNotFound) return progressMock }(), } @@ -194,7 +194,7 @@ func TestUserProgress(t *testing.T) { progressMock. EXPECT(). LoadProgress(testutils.TUMLiveContextStudent.User.ID, gomock.Any()). - Return(model.StreamProgress{StreamID: 16, Watched: true, Progress: 0.5}, nil). + Return([]model.StreamProgress{{StreamID: 16, Watched: true, Progress: 0.5}}, nil). AnyTimes() return progressMock }(), @@ -214,7 +214,7 @@ func TestUserProgress(t *testing.T) { progressMock. EXPECT(). LoadProgress(testutils.TUMLiveContextStudent.User.ID, gomock.Any()). - Return(model.StreamProgress{StreamID: 16, Watched: true, Progress: 0.5}, nil) + Return([]model.StreamProgress{{StreamID: 16, Watched: true, Progress: 0.5}}, nil) return progressMock }(), } diff --git a/api/realtime.go b/api/realtime.go index 543b7a74f..0d8f5779e 100644 --- a/api/realtime.go +++ b/api/realtime.go @@ -2,9 +2,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/tools/realtime" - "github.com/joschahenningsen/TUM-Live/tools/realtime/connector" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/tools/realtime" + "github.com/TUM-Dev/gocast/tools/realtime/connector" log "github.com/sirupsen/logrus" ) diff --git a/api/router.go b/api/router.go index abd5f0ece..1b03a7eec 100755 --- a/api/router.go +++ b/api/router.go @@ -2,8 +2,8 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/tools" ) // ConfigChatRouter configure gin router for chat (without gzip) diff --git a/api/search.go b/api/search.go index 1bdc11758..791e654f3 100644 --- a/api/search.go +++ b/api/search.go @@ -2,8 +2,8 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/tools" "net/http" ) diff --git a/api/seek_stats.go b/api/seek_stats.go index 22dcf0039..90e8b0f3f 100644 --- a/api/seek_stats.go +++ b/api/seek_stats.go @@ -2,7 +2,7 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" + "github.com/TUM-Dev/gocast/dao" log "github.com/sirupsen/logrus" "net/http" ) diff --git a/api/seek_stats_test.go b/api/seek_stats_test.go index c9aa85bb0..dd6b5cfa6 100644 --- a/api/seek_stats_test.go +++ b/api/seek_stats_test.go @@ -8,10 +8,10 @@ import ( "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" ) diff --git a/api/semesters.go b/api/semesters.go index fe523ebb2..244e50633 100644 --- a/api/semesters.go +++ b/api/semesters.go @@ -3,8 +3,8 @@ package api import ( "context" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/tools/tum" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/tools/tum" "net/http" ) diff --git a/api/server-notifications.go b/api/server-notifications.go index 502b06aa1..17bf6e97e 100644 --- a/api/server-notifications.go +++ b/api/server-notifications.go @@ -2,9 +2,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" "log" "net/http" "time" diff --git a/api/statistics.go b/api/statistics.go index 0f46ef69e..ae3373d58 100644 --- a/api/statistics.go +++ b/api/statistics.go @@ -3,9 +3,9 @@ package api import ( "encoding/json" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "net/http" "strconv" diff --git a/api/statistics_test.go b/api/statistics_test.go index 4038c62d1..238cfb48c 100644 --- a/api/statistics_test.go +++ b/api/statistics_test.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "gorm.io/gorm" "net/http" diff --git a/api/stream.go b/api/stream.go index 74c2a43f9..b50174cad 100644 --- a/api/stream.go +++ b/api/stream.go @@ -4,7 +4,7 @@ import ( "context" "errors" "fmt" - "github.com/joschahenningsen/TUM-Live/tools/pathprovider" + "github.com/TUM-Dev/gocast/tools/pathprovider" "net/http" "os" "path/filepath" @@ -14,11 +14,11 @@ import ( "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/bot" - "github.com/joschahenningsen/TUM-Live/voice-service/pb" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/bot" + "github.com/TUM-Dev/gocast/voice-service/pb" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" "gorm.io/gorm" diff --git a/api/stream_test.go b/api/stream_test.go index db1b59da2..f186e38d2 100644 --- a/api/stream_test.go +++ b/api/stream_test.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "gorm.io/gorm" "net/http" diff --git a/api/token.go b/api/token.go index f54c0ed6f..41fc9a368 100644 --- a/api/token.go +++ b/api/token.go @@ -3,9 +3,9 @@ package api import ( "database/sql" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" "net/http" diff --git a/api/token_test.go b/api/token_test.go index a29822baa..d69f356fa 100644 --- a/api/token_test.go +++ b/api/token_test.go @@ -4,11 +4,11 @@ import ( "errors" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "net/http" "testing" diff --git a/api/users.go b/api/users.go index 374024f80..e96921e63 100644 --- a/api/users.go +++ b/api/users.go @@ -13,9 +13,9 @@ import ( "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "gorm.io/gorm" ) diff --git a/api/users_test.go b/api/users_test.go index cc284f2a2..511536a87 100644 --- a/api/users_test.go +++ b/api/users_test.go @@ -6,11 +6,11 @@ import ( "errors" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "gorm.io/gorm" "net/http" diff --git a/api/voice_service_grpc.go b/api/voice_service_grpc.go index 5497654ab..b2da029b7 100644 --- a/api/voice_service_grpc.go +++ b/api/voice_service_grpc.go @@ -5,10 +5,10 @@ package api import ( "context" "fmt" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/voice-service/pb" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/voice-service/pb" log "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" diff --git a/api/worker.go b/api/worker.go index 70460f6e2..aac2413cd 100644 --- a/api/worker.go +++ b/api/worker.go @@ -2,8 +2,8 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "net/http" ) diff --git a/api/worker_grpc.go b/api/worker_grpc.go index cd6415403..0aa754f9e 100644 --- a/api/worker_grpc.go +++ b/api/worker_grpc.go @@ -3,10 +3,11 @@ package api // worker_grpc.go handles communication with workers via grpc import ( "context" + "database/sql" "encoding/json" "errors" "fmt" - "github.com/joschahenningsen/TUM-Live/tools/pathprovider" + "github.com/TUM-Dev/gocast/tools/pathprovider" "io" "net" "net/http" @@ -19,11 +20,11 @@ import ( go_anel_pwrctrl "github.com/RBG-TUM/go-anel-pwrctrl" "github.com/getsentry/sentry-go" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/camera" - "github.com/joschahenningsen/TUM-Live/worker/pb" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/camera" + "github.com/TUM-Dev/gocast/worker/pb" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" "google.golang.org/grpc" @@ -387,7 +388,7 @@ func (s server) NotifyTranscodingFinished(ctx context.Context, request *pb.Trans } if request.Duration != 0 { - stream.Duration = request.Duration + stream.Duration = sql.NullInt32{Int32: int32(request.Duration)} } err = s.DaoWrapper.StreamsDao.SaveStream(&stream) if err != nil { diff --git a/api/worker_test.go b/api/worker_test.go index 3dcae9192..1df793a91 100644 --- a/api/worker_test.go +++ b/api/worker_test.go @@ -5,10 +5,10 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/testutils" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/testutils" "github.com/matthiasreumann/gomino" "net/http" "testing" diff --git a/api/wsHub.go b/api/wsHub.go index 9ef2ce4c0..d2876263f 100644 --- a/api/wsHub.go +++ b/api/wsHub.go @@ -7,9 +7,9 @@ import ( "fmt" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/realtime" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/realtime" log "github.com/sirupsen/logrus" "strconv" "strings" diff --git a/cmd/modelGen/daoTemplate.tmpl b/cmd/modelGen/daoTemplate.tmpl index 04b2cd9b6..40aa37b85 100644 --- a/cmd/modelGen/daoTemplate.tmpl +++ b/cmd/modelGen/daoTemplate.tmpl @@ -2,7 +2,7 @@ package dao import ( "context" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/cmd/tumlive/tumlive.go b/cmd/tumlive/tumlive.go index 906a70445..9fa949cc0 100755 --- a/cmd/tumlive/tumlive.go +++ b/cmd/tumlive/tumlive.go @@ -7,12 +7,12 @@ import ( sentrygin "github.com/getsentry/sentry-go/gin" "github.com/gin-contrib/gzip" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/api" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/tum" - "github.com/joschahenningsen/TUM-Live/web" + "github.com/TUM-Dev/gocast/api" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/tum" + "github.com/TUM-Dev/gocast/web" "github.com/pkg/profile" log "github.com/sirupsen/logrus" "gorm.io/driver/mysql" diff --git a/dao/audit.go b/dao/audit.go index 72243147a..2bdcad78b 100644 --- a/dao/audit.go +++ b/dao/audit.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/bookmark.go b/dao/bookmark.go index 9635cf58e..659a87c87 100644 --- a/dao/bookmark.go +++ b/dao/bookmark.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/camera-preset.go b/dao/camera-preset.go index 1a628bf3f..aadbff654 100644 --- a/dao/camera-preset.go +++ b/dao/camera-preset.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/chat.go b/dao/chat.go index e2b43d4a1..a8f93e01c 100644 --- a/dao/chat.go +++ b/dao/chat.go @@ -3,7 +3,7 @@ package dao import ( "errors" "github.com/go-sql-driver/mysql" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/courses.go b/dao/courses.go index 1191d8504..23978d086 100644 --- a/dao/courses.go +++ b/dao/courses.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "github.com/RBG-TUM/commons" "github.com/getsentry/sentry-go" diff --git a/dao/email.go b/dao/email.go index 75ab7c654..64632a743 100644 --- a/dao/email.go +++ b/dao/email.go @@ -2,7 +2,7 @@ package dao import ( "context" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" "time" ) diff --git a/dao/file.go b/dao/file.go index f51e7f3ef..4f31790a5 100644 --- a/dao/file.go +++ b/dao/file.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/info-page.go b/dao/info-page.go index 25af81bb4..3636afc48 100644 --- a/dao/info-page.go +++ b/dao/info-page.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/ingest_server.go b/dao/ingest_server.go index daf180c62..a21fdcb27 100644 --- a/dao/ingest_server.go +++ b/dao/ingest_server.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" "time" ) diff --git a/dao/lecture_halls.go b/dao/lecture_halls.go index b23fca4c3..9e7e82558 100644 --- a/dao/lecture_halls.go +++ b/dao/lecture_halls.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" "gorm.io/gorm/clause" "time" diff --git a/dao/migrations/202201280.go b/dao/migrations/202201280.go index d984a1d7b..3a76179ac 100644 --- a/dao/migrations/202201280.go +++ b/dao/migrations/202201280.go @@ -2,7 +2,7 @@ package migrations import ( "github.com/go-gormigrate/gormigrate/v2" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/migrations/202207240.go b/dao/migrations/202207240.go index aed521d4c..33859c108 100644 --- a/dao/migrations/202207240.go +++ b/dao/migrations/202207240.go @@ -2,7 +2,7 @@ package migrations import ( "github.com/go-gormigrate/gormigrate/v2" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/migrations/202208100.go b/dao/migrations/202208100.go index e0f147dd1..bfe15e8c5 100644 --- a/dao/migrations/202208100.go +++ b/dao/migrations/202208100.go @@ -2,7 +2,7 @@ package migrations import ( "github.com/go-gormigrate/gormigrate/v2" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/migrations/202208110.go b/dao/migrations/202208110.go index 46429d37f..accb92e22 100644 --- a/dao/migrations/202208110.go +++ b/dao/migrations/202208110.go @@ -2,7 +2,7 @@ package migrations import ( "github.com/go-gormigrate/gormigrate/v2" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/migrations/202210270.go b/dao/migrations/202210270.go index 9412d8673..9bc60de9c 100644 --- a/dao/migrations/202210270.go +++ b/dao/migrations/202210270.go @@ -2,7 +2,7 @@ package migrations import ( "github.com/go-gormigrate/gormigrate/v2" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/migrations/202212010.go b/dao/migrations/202212010.go index ea3f1ead1..93362726c 100644 --- a/dao/migrations/202212010.go +++ b/dao/migrations/202212010.go @@ -2,7 +2,7 @@ package migrations import ( "github.com/go-gormigrate/gormigrate/v2" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/migrator.go b/dao/migrator.go index 8cb9ae74f..acdc28944 100644 --- a/dao/migrator.go +++ b/dao/migrator.go @@ -2,7 +2,7 @@ package dao import ( "github.com/go-gormigrate/gormigrate/v2" - "github.com/joschahenningsen/TUM-Live/dao/migrations" + "github.com/TUM-Dev/gocast/dao/migrations" "gorm.io/gorm" ) diff --git a/dao/notifications.go b/dao/notifications.go index a8e2677d4..6e7b94ff4 100644 --- a/dao/notifications.go +++ b/dao/notifications.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/progress.go b/dao/progress.go index 2898b7587..6a73c07b6 100644 --- a/dao/progress.go +++ b/dao/progress.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" "gorm.io/gorm/clause" ) @@ -13,7 +13,7 @@ var Progress = NewProgressDao() type ProgressDao interface { SaveProgresses(progresses []model.StreamProgress) error GetProgressesForUser(userID uint) ([]model.StreamProgress, error) - LoadProgress(userID uint, streamID uint) (streamProgress model.StreamProgress, err error) + LoadProgress(userID uint, streamIDs []uint) (streamProgress []model.StreamProgress, err error) SaveWatchedState(progress *model.StreamProgress) error } @@ -47,7 +47,7 @@ func (d progressDao) SaveWatchedState(progress *model.StreamProgress) error { } // LoadProgress retrieves the current StreamProgress from the database for a given user and stream. -func (d progressDao) LoadProgress(userID uint, streamID uint) (streamProgress model.StreamProgress, err error) { - err = DB.First(&streamProgress, "user_id = ? AND stream_id = ?", userID, streamID).Error +func (d progressDao) LoadProgress(userID uint, streamIDs []uint) (streamProgress []model.StreamProgress, err error) { + err = DB.Find(&streamProgress, "user_id = ? AND stream_id IN ?", userID, streamIDs).Error return streamProgress, err } diff --git a/dao/server-notification.go b/dao/server-notification.go index 823aebd60..6b61e5453 100644 --- a/dao/server-notification.go +++ b/dao/server-notification.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" "time" ) diff --git a/dao/statistics.go b/dao/statistics.go index 8452131e6..931e0a7ba 100644 --- a/dao/statistics.go +++ b/dao/statistics.go @@ -2,8 +2,8 @@ package dao import ( "fmt" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools/timing" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools/timing" "gorm.io/gorm" ) diff --git a/dao/streams.go b/dao/streams.go index e82365501..b6da68ba5 100755 --- a/dao/streams.go +++ b/dao/streams.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/subtitles.go b/dao/subtitles.go index a2e5a1057..cc04ad91f 100644 --- a/dao/subtitles.go +++ b/dao/subtitles.go @@ -3,7 +3,7 @@ package dao import ( "context" "errors" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/token.go b/dao/token.go index 2499dfddb..213ee13e5 100644 --- a/dao/token.go +++ b/dao/token.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" "time" ) diff --git a/dao/transcoding-failure.go b/dao/transcoding-failure.go index d44049c26..88682c694 100644 --- a/dao/transcoding-failure.go +++ b/dao/transcoding-failure.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/upload_key.go b/dao/upload_key.go index a8487a35f..f2606584c 100644 --- a/dao/upload_key.go +++ b/dao/upload_key.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/users.go b/dao/users.go index ea369219c..aabbea98b 100644 --- a/dao/users.go +++ b/dao/users.go @@ -4,7 +4,7 @@ import ( "context" "errors" "fmt" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" uuid "github.com/satori/go.uuid" "gorm.io/gorm" "gorm.io/gorm/clause" diff --git a/dao/video-section.go b/dao/video-section.go index f8838f76b..6116b923b 100644 --- a/dao/video-section.go +++ b/dao/video-section.go @@ -1,7 +1,7 @@ package dao import ( - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/dao/video-seek.go b/dao/video-seek.go index 46a8e9f3e..4cc7200ed 100644 --- a/dao/video-seek.go +++ b/dao/video-seek.go @@ -2,7 +2,7 @@ package dao import ( "errors" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" log "github.com/sirupsen/logrus" "gorm.io/gorm" "gorm.io/gorm/clause" @@ -31,12 +31,12 @@ func (d videoSeekDao) Add(streamID string, pos float64) error { return err } - if (pos / float64(stream.Duration)) > 1 { + if (pos / float64(stream.Duration.Int32)) > 1 { log.Error("position is bigger than stream duration") return errors.New("position is bigger than stream duration") } - chunkTimeRange := float64(stream.Duration) / maxChunksPerVideo + chunkTimeRange := float64(stream.Duration.Int32) / maxChunksPerVideo chunk := uint(pos / chunkTimeRange) return DB.Clauses(clause.OnConflict{ diff --git a/dao/worker.go b/dao/worker.go index fd49ac9a9..3c30316e3 100644 --- a/dao/worker.go +++ b/dao/worker.go @@ -2,7 +2,7 @@ package dao import ( "context" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "gorm.io/gorm" ) diff --git a/go.mod b/go.mod index d9a38ae68..dd030c58c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/joschahenningsen/TUM-Live +module github.com/TUM-Dev/gocast go 1.18 @@ -40,13 +40,13 @@ require ( github.com/crewjam/saml v0.4.13 github.com/golang/mock v1.6.0 github.com/icholy/digest v0.1.22 - github.com/joschahenningsen/TUM-Live/worker v0.0.0-20230813170152-4b40e4b3a301 github.com/stretchr/testify v1.8.4 github.com/u2takey/go-utils v0.3.1 ) require ( github.com/TUM-Dev/CampusProxy/client v0.0.0-20230226120508-3e8bb2411921 + github.com/TUM-Dev/gocast/worker v0.0.0-20230824080536-8d3e387e4f8d github.com/asticode/go-astisub v0.26.0 github.com/matthiasreumann/gomino v0.0.2 github.com/meilisearch/meilisearch-go v0.25.0 diff --git a/go.sum b/go.sum index f4b1d30ab..1b9e9cfab 100644 --- a/go.sum +++ b/go.sum @@ -55,6 +55,8 @@ github.com/RBG-TUM/go-anel-pwrctrl v1.0.0 h1:8V7MV6oyg+sQzSRWhEfgg9FcOaQMGBreOh3 github.com/RBG-TUM/go-anel-pwrctrl v1.0.0/go.mod h1:6c2j1rcryE6BWphhJtGb+yXFIGRzmIXi+31TjE9Cft4= github.com/TUM-Dev/CampusProxy/client v0.0.0-20230226120508-3e8bb2411921 h1:c4RdbLP4UftJQOV2Q6XrXC2ScWSEqN/ojBD9ava5LR8= github.com/TUM-Dev/CampusProxy/client v0.0.0-20230226120508-3e8bb2411921/go.mod h1:UuXuuqgljQbgtLAw5NY+VcThXAwO6UISn6U3s4TJx8k= +github.com/TUM-Dev/gocast/worker v0.0.0-20230824080536-8d3e387e4f8d h1:jiYEexXXaW17n9lPFxwvJbJgzle97VKT39uSTROuCnY= +github.com/TUM-Dev/gocast/worker v0.0.0-20230824080536-8d3e387e4f8d/go.mod h1:+ddm5cnR0+RC/+TARNV5wSo15yOcd+jooxZofwzd9wc= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 h1:Kk6a4nehpJ3UuJRqlA3JxYxBZEqCeOmATOvrbT4p9RA= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= @@ -279,8 +281,6 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= -github.com/joschahenningsen/TUM-Live/worker v0.0.0-20230813170152-4b40e4b3a301 h1:lqbhUuaWE5GETZI5bRWAcl8/JBNU54Rcoow5yyX1zbw= -github.com/joschahenningsen/TUM-Live/worker v0.0.0-20230813170152-4b40e4b3a301/go.mod h1:o/rM0tvFWj9+9TGOGZa+H7xmumcljkRWvrbuvysiLYE= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= diff --git a/go.work.sum b/go.work.sum index 121a21a59..20e0d67ff 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,19 +1,156 @@ +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/RBG-TUM/CAMPUSOnline v0.0.0-20230412070523-8db58ed5c0b4/go.mod h1:pcWaw3hQOKmvRfldxtPlYBGAFbWQXUU44+KcDYwqduc= +github.com/RBG-TUM/commons v0.0.0-20220406105618-030c095f6a1b/go.mod h1:Nw30dUekEb8ZrJwoGck0lILeVDCIX9dqJsEAPSOxBs0= +github.com/RBG-TUM/go-anel-pwrctrl v1.0.0/go.mod h1:6c2j1rcryE6BWphhJtGb+yXFIGRzmIXi+31TjE9Cft4= +github.com/TUM-Dev/CampusProxy/client v0.0.0-20230226120508-3e8bb2411921/go.mod h1:UuXuuqgljQbgtLAw5NY+VcThXAwO6UISn6U3s4TJx8k= +github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= +github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antchfx/xmlquery v1.3.17/go.mod h1:Afkq4JIeXut75taLSuI31ISJ/zeq+3jG7TunF7noreA= +github.com/antchfx/xpath v1.2.4/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= +github.com/asticode/go-astikit v0.20.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0= +github.com/asticode/go-astikit v0.30.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0= +github.com/asticode/go-astikit v0.40.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0= +github.com/asticode/go-astisub v0.26.0/go.mod h1:WTkuSzFB+Bp7wezuSf2Oxulj5A8zu2zLRVFf6bIFQK8= +github.com/asticode/go-astits v1.8.0/go.mod h1:DkOWmBNQpnr9mv24KfZjq4JawCFX1FCqjLVGvO0DygQ= +github.com/asticode/go-astits v1.13.0/go.mod h1:QSHmknZ51pf6KJdHKZHJTLlMegIrhega3LPWz3ND/iI= +github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= +github.com/beevik/etree v1.2.0/go.mod h1:aiPf89g/1k3AShMVAzriilpcE4R/Vuor90y83zVZWFc= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.0/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4= +github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA= +github.com/dchest/uniuri v1.2.0/go.mod h1:fSzm4SLHzNZvWLvWJew423PhAzkpNQYq+uNLq4kxhkY= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/gabstv/melody v1.0.2/go.mod h1:fvJW9enOHGIN1E4nCuBZ3lIZxHiPbnMIIYEXcSKQq9o= +github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-asn1-ber/asn1-ber v1.5.4/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-gormigrate/gormigrate/v2 v2.1.0/go.mod h1:gpA97koYGyjqaiLDTmLE5W7nyYTmI26AYIf2a/earuo= +github.com/go-ldap/ldap/v3 v3.4.5/go.mod h1:bMGIq3AGbytbaMwf8wdv5Phdxz0FWHTIYMSzyrYgnQs= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.15.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/icholy/digest v0.1.22/go.mod h1:uLAeDdWKIWNFMH0wqbwchbTQOmJWhzSnL7zmqSPqEEc= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= +github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattermost/xml-roundtrip-validator v0.1.0/go.mod h1:qccnGMcpgwcNaBnxqpJpWWUiPNr5H3O8eDgGV9gT5To= +github.com/matthiasreumann/gomino v0.0.2/go.mod h1:bmKxa4ZOGY6RSFH4NnfYf7hk7FbMu2nkSpoAF5TD6fY= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/meilisearch/meilisearch-go v0.25.0/go.mod h1:SxuSqDcPBIykjWz1PX+KzsYzArNLSCadQodWs8extS0= +github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/olahol/melody v0.0.0-20180227134253-7bd65910e5ab/go.mod h1:3lo03f1jM3KFUG/rsujuLB1rBmlvIzVM3SCqbuHqsBU= github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pkg/profile v1.4.0/go.mod h1:NWz/XGvpEW1FyYQ7fCx4dqYBLlfTcE+A9FLAkNKqjFE= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/russellhaering/goxmldsig v1.2.0/go.mod h1:gM4MDENBQf7M+V824SGfyIUVFWydB7n0KkEubVJl+Tw= +github.com/russellhaering/goxmldsig v1.4.0/go.mod h1:gM4MDENBQf7M+V824SGfyIUVFWydB7n0KkEubVJl+Tw= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= +github.com/valyala/fasthttp v1.48.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +github.com/zenazn/goji v1.0.1/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +gorm.io/driver/mysql v1.5.1/go.mod h1:Jo3Xu7mMhCyj8dlrb3WoCaRd1FhsVh+yMXb1jUInf5o= gorm.io/gorm v1.25.1 h1:nsSALe5Pr+cM3V1qwwQ7rOkw+6UeLrX5O4v3llhHa64= gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -mvdan.cc/xurls/v2 v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8= +gorm.io/gorm v1.25.3/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= mvdan.cc/xurls/v2 v2.5.0/go.mod h1:yQgaGQ1rFtJUzkmKiHYSSfuQxqfYmd//X6PxvholpeE= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/mock_dao/audit.go b/mock_dao/audit.go index 0f9e828e8..122c2c0bf 100644 --- a/mock_dao/audit.go +++ b/mock_dao/audit.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockAuditDao is a mock of AuditDao interface. diff --git a/mock_dao/bookmark.go b/mock_dao/bookmark.go index 79b09ccf0..4a77d8138 100644 --- a/mock_dao/bookmark.go +++ b/mock_dao/bookmark.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockBookmarkDao is a mock of BookmarkDao interface. diff --git a/mock_dao/camera-preset.go b/mock_dao/camera-preset.go index 29af98d45..c05ffa639 100644 --- a/mock_dao/camera-preset.go +++ b/mock_dao/camera-preset.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockCameraPresetDao is a mock of CameraPresetDao interface. diff --git a/mock_dao/chat.go b/mock_dao/chat.go index 6b61ac8fe..dc92f62a5 100644 --- a/mock_dao/chat.go +++ b/mock_dao/chat.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockChatDao is a mock of ChatDao interface. diff --git a/mock_dao/courses.go b/mock_dao/courses.go index f32a05dbe..7a508b40b 100644 --- a/mock_dao/courses.go +++ b/mock_dao/courses.go @@ -9,8 +9,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - dao "github.com/joschahenningsen/TUM-Live/dao" - model "github.com/joschahenningsen/TUM-Live/model" + dao "github.com/TUM-Dev/gocast/dao" + model "github.com/TUM-Dev/gocast/model" ) // MockCoursesDao is a mock of CoursesDao interface. diff --git a/mock_dao/email.go b/mock_dao/email.go index 0f9ed4ddb..e27a77d22 100644 --- a/mock_dao/email.go +++ b/mock_dao/email.go @@ -9,7 +9,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockEmailDao is a mock of EmailDao interface. diff --git a/mock_dao/file.go b/mock_dao/file.go index 185dcb25a..90a782392 100644 --- a/mock_dao/file.go +++ b/mock_dao/file.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockFileDao is a mock of FileDao interface. diff --git a/mock_dao/info-page.go b/mock_dao/info-page.go index 6780598d0..3ce7bf621 100644 --- a/mock_dao/info-page.go +++ b/mock_dao/info-page.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockInfoPageDao is a mock of InfoPageDao interface. diff --git a/mock_dao/ingest_server.go b/mock_dao/ingest_server.go index 115b69985..7d38fc8bc 100644 --- a/mock_dao/ingest_server.go +++ b/mock_dao/ingest_server.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockIngestServerDao is a mock of IngestServerDao interface. diff --git a/mock_dao/lecture_halls.go b/mock_dao/lecture_halls.go index d56231c13..2cec5abff 100644 --- a/mock_dao/lecture_halls.go +++ b/mock_dao/lecture_halls.go @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - dao "github.com/joschahenningsen/TUM-Live/dao" - model "github.com/joschahenningsen/TUM-Live/model" + dao "github.com/TUM-Dev/gocast/dao" + model "github.com/TUM-Dev/gocast/model" ) // MockLectureHallsDao is a mock of LectureHallsDao interface. diff --git a/mock_dao/notifications.go b/mock_dao/notifications.go index 492637d4f..b9b94b5f7 100644 --- a/mock_dao/notifications.go +++ b/mock_dao/notifications.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockNotificationsDao is a mock of NotificationsDao interface. diff --git a/mock_dao/progress.go b/mock_dao/progress.go index 053f06bb1..e0a4c7843 100644 --- a/mock_dao/progress.go +++ b/mock_dao/progress.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockProgressDao is a mock of ProgressDao interface. @@ -50,18 +50,18 @@ func (mr *MockProgressDaoMockRecorder) GetProgressesForUser(userID interface{}) } // LoadProgress mocks base method. -func (m *MockProgressDao) LoadProgress(userID, streamID uint) (model.StreamProgress, error) { +func (m *MockProgressDao) LoadProgress(userID uint, streamIDs []uint) ([]model.StreamProgress, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LoadProgress", userID, streamID) - ret0, _ := ret[0].(model.StreamProgress) + ret := m.ctrl.Call(m, "LoadProgress", userID, streamIDs) + ret0, _ := ret[0].([]model.StreamProgress) ret1, _ := ret[1].(error) return ret0, ret1 } // LoadProgress indicates an expected call of LoadProgress. -func (mr *MockProgressDaoMockRecorder) LoadProgress(userID, streamID interface{}) *gomock.Call { +func (mr *MockProgressDaoMockRecorder) LoadProgress(userID, streamIDs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadProgress", reflect.TypeOf((*MockProgressDao)(nil).LoadProgress), userID, streamID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadProgress", reflect.TypeOf((*MockProgressDao)(nil).LoadProgress), userID, streamIDs) } // SaveProgresses mocks base method. diff --git a/mock_dao/server-notification.go b/mock_dao/server-notification.go index e08e4f203..c5a8d4131 100644 --- a/mock_dao/server-notification.go +++ b/mock_dao/server-notification.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockServerNotificationDao is a mock of ServerNotificationDao interface. diff --git a/mock_dao/statistics.go b/mock_dao/statistics.go index bd270c77f..6370ebe3a 100644 --- a/mock_dao/statistics.go +++ b/mock_dao/statistics.go @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - dao "github.com/joschahenningsen/TUM-Live/dao" - model "github.com/joschahenningsen/TUM-Live/model" + dao "github.com/TUM-Dev/gocast/dao" + model "github.com/TUM-Dev/gocast/model" ) // MockStatisticsDao is a mock of StatisticsDao interface. diff --git a/mock_dao/streams.go b/mock_dao/streams.go index 6fe7cf423..f5b32c272 100644 --- a/mock_dao/streams.go +++ b/mock_dao/streams.go @@ -10,8 +10,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - dao "github.com/joschahenningsen/TUM-Live/dao" - model "github.com/joschahenningsen/TUM-Live/model" + dao "github.com/TUM-Dev/gocast/dao" + model "github.com/TUM-Dev/gocast/model" ) // MockStreamsDao is a mock of StreamsDao interface. diff --git a/mock_dao/subtitles.go b/mock_dao/subtitles.go index f26c65cec..f8a0249de 100644 --- a/mock_dao/subtitles.go +++ b/mock_dao/subtitles.go @@ -9,7 +9,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockSubtitlesDao is a mock of SubtitlesDao interface. diff --git a/mock_dao/token.go b/mock_dao/token.go index fa429eb2b..1a3266432 100644 --- a/mock_dao/token.go +++ b/mock_dao/token.go @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - dao "github.com/joschahenningsen/TUM-Live/dao" - model "github.com/joschahenningsen/TUM-Live/model" + dao "github.com/TUM-Dev/gocast/dao" + model "github.com/TUM-Dev/gocast/model" ) // MockTokenDao is a mock of TokenDao interface. diff --git a/mock_dao/transcoding-failure.go b/mock_dao/transcoding-failure.go index 16c70bbaa..c222c7fc8 100644 --- a/mock_dao/transcoding-failure.go +++ b/mock_dao/transcoding-failure.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockTranscodingFailureDao is a mock of TranscodingFailureDao interface. diff --git a/mock_dao/upload_key.go b/mock_dao/upload_key.go index 87bde0f4b..c3b92c9e4 100644 --- a/mock_dao/upload_key.go +++ b/mock_dao/upload_key.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockUploadKeyDao is a mock of UploadKeyDao interface. diff --git a/mock_dao/users.go b/mock_dao/users.go index 876fda273..fb97525b3 100644 --- a/mock_dao/users.go +++ b/mock_dao/users.go @@ -9,7 +9,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockUsersDao is a mock of UsersDao interface. diff --git a/mock_dao/video-section.go b/mock_dao/video-section.go index 536f56272..83619ed2d 100644 --- a/mock_dao/video-section.go +++ b/mock_dao/video-section.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockVideoSectionDao is a mock of VideoSectionDao interface. diff --git a/mock_dao/video-seek.go b/mock_dao/video-seek.go index 487b15071..47bfba104 100644 --- a/mock_dao/video-seek.go +++ b/mock_dao/video-seek.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockVideoSeekDao is a mock of VideoSeekDao interface. diff --git a/mock_dao/worker.go b/mock_dao/worker.go index 22d07fce3..1095c0e71 100644 --- a/mock_dao/worker.go +++ b/mock_dao/worker.go @@ -9,7 +9,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockWorkerDao is a mock of WorkerDao interface. diff --git a/mock_tools/mock_camera/camera.go b/mock_tools/mock_camera/camera.go index 6c029215e..2e2c42486 100644 --- a/mock_tools/mock_camera/camera.go +++ b/mock_tools/mock_camera/camera.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" + model "github.com/TUM-Dev/gocast/model" ) // MockCam is a mock of Cam interface. diff --git a/mock_tools/presets.go b/mock_tools/presets.go index 129099e80..4a2c05abe 100644 --- a/mock_tools/presets.go +++ b/mock_tools/presets.go @@ -9,8 +9,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - model "github.com/joschahenningsen/TUM-Live/model" - camera "github.com/joschahenningsen/TUM-Live/tools/camera" + model "github.com/TUM-Dev/gocast/model" + camera "github.com/TUM-Dev/gocast/tools/camera" ) // MockPresetUtility is a mock of PresetUtility interface. diff --git a/model/chat.go b/model/chat.go index a62fd6a8f..05bc35721 100644 --- a/model/chat.go +++ b/model/chat.go @@ -3,14 +3,15 @@ package model import ( "database/sql" "errors" - "github.com/microcosm-cc/bluemonday" - "github.com/russross/blackfriday/v2" - "gorm.io/gorm" "html" - "mvdan.cc/xurls/v2" "strconv" "strings" "time" + + "github.com/microcosm-cc/bluemonday" + "github.com/russross/blackfriday/v2" + "gorm.io/gorm" + "mvdan.cc/xurls/v2" ) var ( @@ -36,7 +37,7 @@ var ( ) const ( - maxMessageLength = 250 + maxMessageLength = 1000 coolDown = time.Minute * 2 coolDownMessages = 5 // 5 messages -> 5 messages per 2 minutes max ) @@ -88,15 +89,17 @@ func (c *Chat) BeforeCreate(tx *gorm.DB) (err error) { if len(c.Message) == 0 { return ErrMessageNoText } - var recentMessages int64 - err = tx.Model(&Chat{}). - Where("created_at > ? AND user_id = ?", time.Now().Add(-coolDown), c.UserID). - Count(&recentMessages).Error - if err != nil { - return err - } - if recentMessages >= coolDownMessages { - return ErrCooledDown + if !c.Admin { + var recentMessages int64 + err = tx.Model(&Chat{}). + Where("created_at > ? AND user_id = ?", time.Now().Add(-coolDown), c.UserID). + Count(&recentMessages).Error + if err != nil { + return err + } + if recentMessages >= coolDownMessages { + return ErrCooledDown + } } // set chat color: diff --git a/model/stream.go b/model/stream.go index 855c13990..6fac079af 100755 --- a/model/stream.go +++ b/model/stream.go @@ -1,6 +1,7 @@ package model import ( + "database/sql" "encoding/json" "fmt" "github.com/gin-gonic/gin" @@ -47,7 +48,7 @@ type Stream struct { Files []File `gorm:"foreignKey:StreamID"` ThumbInterval uint32 `gorm:"default:null"` StreamName string - Duration uint32 `gorm:"default:null"` + Duration sql.NullInt32 `gorm:"default:null"` StreamWorkers []Worker `gorm:"many2many:stream_workers;"` StreamProgresses []StreamProgress `gorm:"foreignKey:StreamID"` VideoSections []VideoSection @@ -369,6 +370,7 @@ type StreamDTO struct { Downloads []DownloadableVod Start time.Time End time.Time + Duration int32 } func (s Stream) ToDTO() StreamDTO { @@ -376,6 +378,10 @@ func (s Stream) ToDTO() StreamDTO { if s.IsDownloadable() { downloads = s.GetVodFiles() } + duration := int32(s.End.Sub(s.Start).Seconds()) + if s.Duration.Valid { + duration = s.Duration.Int32 + } return StreamDTO{ ID: s.ID, Name: s.Name, @@ -387,5 +393,6 @@ func (s Stream) ToDTO() StreamDTO { HLSUrl: s.HLSUrl(), Start: s.Start, End: s.End, + Duration: duration, } } diff --git a/renovate.json b/renovate.json index 04351d92b..55aff20a5 100644 --- a/renovate.json +++ b/renovate.json @@ -4,5 +4,5 @@ "config:base", "group:allNonMajor" ], - "ignoreDeps": ["github.com/joschahenningsen/TUM-Live/worker"] + "ignoreDeps": ["github.com/TUM-Dev/gocast/worker"] } diff --git a/tools/bot/bot.go b/tools/bot/bot.go index 4fff3cda8..572e448e8 100644 --- a/tools/bot/bot.go +++ b/tools/bot/bot.go @@ -2,8 +2,8 @@ package bot import ( "github.com/getsentry/sentry-go" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" "github.com/microcosm-cc/bluemonday" log "github.com/sirupsen/logrus" "strings" diff --git a/tools/bot/matrix.go b/tools/bot/matrix.go index e2a18823d..0bd8e8e2d 100644 --- a/tools/bot/matrix.go +++ b/tools/bot/matrix.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" "github.com/getsentry/sentry-go" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "io" "math/rand" diff --git a/tools/camera/axis.go b/tools/camera/axis.go index 0f7c4694b..8e887ec5b 100644 --- a/tools/camera/axis.go +++ b/tools/camera/axis.go @@ -3,7 +3,7 @@ package camera import ( "errors" "fmt" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" uuid "github.com/satori/go.uuid" "strconv" "strings" diff --git a/tools/camera/camera.go b/tools/camera/camera.go index 419ae330b..27d2554fa 100644 --- a/tools/camera/camera.go +++ b/tools/camera/camera.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" "github.com/icholy/digest" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "io" "net/http" "os" diff --git a/tools/camera/panasonic.go b/tools/camera/panasonic.go index 67bcd1536..65864c6d7 100644 --- a/tools/camera/panasonic.go +++ b/tools/camera/panasonic.go @@ -2,7 +2,7 @@ package camera import ( "fmt" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" ) diff --git a/tools/email.go b/tools/email.go index 5406651d7..02700d7e9 100644 --- a/tools/email.go +++ b/tools/email.go @@ -4,7 +4,7 @@ import ( "bytes" "context" "fmt" - "github.com/joschahenningsen/TUM-Live/dao" + "github.com/TUM-Dev/gocast/dao" "log" "net/smtp" "os/exec" diff --git a/tools/functions.go b/tools/functions.go index 59c0fd347..6053e14ae 100644 --- a/tools/functions.go +++ b/tools/functions.go @@ -2,7 +2,7 @@ package tools import ( "errors" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "log" "os/exec" "regexp" diff --git a/tools/meiliExporter.go b/tools/meiliExporter.go index 4404394fd..2fbd595e6 100644 --- a/tools/meiliExporter.go +++ b/tools/meiliExporter.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" "github.com/asticode/go-astisub" - "github.com/joschahenningsen/TUM-Live/dao" + "github.com/TUM-Dev/gocast/dao" "github.com/meilisearch/meilisearch-go" log "github.com/sirupsen/logrus" "strings" diff --git a/tools/middlewares.go b/tools/middlewares.go index ecfa2d3a3..b523ba213 100644 --- a/tools/middlewares.go +++ b/tools/middlewares.go @@ -5,9 +5,9 @@ import ( "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" "github.com/golang-jwt/jwt/v4" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools/realtime" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools/realtime" log "github.com/sirupsen/logrus" "net/http" "net/url" diff --git a/tools/presets.go b/tools/presets.go index c5b755301..317725ec0 100644 --- a/tools/presets.go +++ b/tools/presets.go @@ -4,9 +4,9 @@ import ( "context" "errors" "github.com/getsentry/sentry-go" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools/camera" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools/camera" log "github.com/sirupsen/logrus" "time" ) diff --git a/tools/realtime/connector/melody.go b/tools/realtime/connector/melody.go index 5bfcad054..83573d087 100644 --- a/tools/realtime/connector/melody.go +++ b/tools/realtime/connector/melody.go @@ -2,7 +2,7 @@ package connector import ( "github.com/gabstv/melody" - "github.com/joschahenningsen/TUM-Live/tools/realtime" + "github.com/TUM-Dev/gocast/tools/realtime" "net/http" ) diff --git a/tools/stats_export.dart.go b/tools/stats_export.dart.go index c3b300c78..73ec0a911 100644 --- a/tools/stats_export.dart.go +++ b/tools/stats_export.dart.go @@ -2,7 +2,7 @@ package tools import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" + "github.com/TUM-Dev/gocast/dao" "strconv" "strings" ) diff --git a/tools/stream-signing.go b/tools/stream-signing.go index 8c787421b..60ff1af01 100644 --- a/tools/stream-signing.go +++ b/tools/stream-signing.go @@ -3,7 +3,7 @@ package tools import ( "fmt" "github.com/golang-jwt/jwt/v4" - "github.com/joschahenningsen/TUM-Live/model" + "github.com/TUM-Dev/gocast/model" "strings" "time" ) diff --git a/tools/testutils/testdata.go b/tools/testutils/testdata.go index b63498e92..fed7833b3 100644 --- a/tools/testutils/testdata.go +++ b/tools/testutils/testdata.go @@ -8,11 +8,11 @@ import ( "time" "github.com/golang/mock/gomock" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/mock_dao" - "github.com/joschahenningsen/TUM-Live/mock_tools" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/mock_dao" + "github.com/TUM-Dev/gocast/mock_tools" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" "gorm.io/gorm" ) diff --git a/tools/testutils/testutils.go b/tools/testutils/testutils.go index b86a94158..296149332 100644 --- a/tools/testutils/testutils.go +++ b/tools/testutils/testutils.go @@ -2,7 +2,7 @@ package testutils import ( "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/tools" "github.com/stretchr/testify/assert" "testing" ) diff --git a/tools/tum/campus-online-base.go b/tools/tum/campus-online-base.go index 8e42c83e6..b990327e0 100644 --- a/tools/tum/campus-online-base.go +++ b/tools/tum/campus-online-base.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" "github.com/antchfx/xmlquery" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" ) diff --git a/tools/tum/courses.go b/tools/tum/courses.go index 9184cabef..9d0b731e5 100644 --- a/tools/tum/courses.go +++ b/tools/tum/courses.go @@ -4,9 +4,9 @@ import ( "context" "fmt" "github.com/TUM-Dev/CampusProxy/client" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model/search" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model/search" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "strconv" "strings" diff --git a/tools/tum/events.go b/tools/tum/events.go index d8314f91d..f56b83f3b 100644 --- a/tools/tum/events.go +++ b/tools/tum/events.go @@ -5,9 +5,9 @@ import ( "errors" "fmt" "github.com/antchfx/xmlquery" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" uuid "github.com/satori/go.uuid" log "github.com/sirupsen/logrus" "strconv" diff --git a/tools/tum/ldap.go b/tools/tum/ldap.go index b1eb93cf8..809d6a0f9 100644 --- a/tools/tum/ldap.go +++ b/tools/tum/ldap.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/getsentry/sentry-go" "github.com/go-ldap/ldap/v3" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" "time" ) diff --git a/tools/tum/students.go b/tools/tum/students.go index ff94f66f2..127cb3bf9 100644 --- a/tools/tum/students.go +++ b/tools/tum/students.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" "github.com/antchfx/xmlquery" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" ) diff --git a/vod-service/cmd/vod-service/main.go b/vod-service/cmd/vod-service/main.go index a44319c28..1d722b6e7 100644 --- a/vod-service/cmd/vod-service/main.go +++ b/vod-service/cmd/vod-service/main.go @@ -1,6 +1,6 @@ package main -import "github.com/joschahenningsen/TUM-Live/vod-service/internal" +import "github.com/TUM-Dev/gocast/vod-service/internal" func main() { app := internal.NewApp() diff --git a/vod-service/go.mod b/vod-service/go.mod index 135f4a1c3..c81cc2985 100644 --- a/vod-service/go.mod +++ b/vod-service/go.mod @@ -1,3 +1,3 @@ -module github.com/joschahenningsen/TUM-Live/vod-service +module github.com/TUM-Dev/gocast/vod-service go 1.19 diff --git a/web/admin.go b/web/admin.go index 7e99b9064..9a7b992f7 100755 --- a/web/admin.go +++ b/web/admin.go @@ -7,10 +7,10 @@ import ( "fmt" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/tum" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/tum" log "github.com/sirupsen/logrus" "gorm.io/gorm" "net/http" diff --git a/web/course.go b/web/course.go index 522ee8857..d6c076790 100644 --- a/web/course.go +++ b/web/course.go @@ -6,8 +6,8 @@ import ( "html/template" "net/http" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" "github.com/getsentry/sentry-go" diff --git a/web/index.go b/web/index.go index 34ec7a764..fbb2f692e 100644 --- a/web/index.go +++ b/web/index.go @@ -6,10 +6,10 @@ import ( "github.com/RBG-TUM/commons" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" - "github.com/joschahenningsen/TUM-Live/tools/tum" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" + "github.com/TUM-Dev/gocast/tools/tum" log "github.com/sirupsen/logrus" "gorm.io/gorm" "html/template" diff --git a/web/package.json b/web/package.json index 384f40d24..797083551 100755 --- a/web/package.json +++ b/web/package.json @@ -4,7 +4,7 @@ "description": "Backend of TUMs live streaming service", "repository": { "type": "git", - "url": "git+https://github.com/joschahenningsen/TUM-Live.git" + "url": "git+https://github.com/TUM-Dev/gocast.git" }, "scripts": { "postinstall": "npm run build && npm run tailwind-compile", @@ -19,9 +19,9 @@ "author": "Joscha Henningsen", "license": "MIT", "bugs": { - "url": "https://github.com/joschahenningsen/TUM-Live/issues" + "url": "https://github.com/TUM-Dev/gocast/issues" }, - "homepage": "https://github.com/joschahenningsen/TUM-Live#readme", + "homepage": "https://github.com/TUM-Dev/gocast#readme", "dependencies": { "@alpinejs/focus": "^3.12.3", "@alpinejs/persist": "^3.12.3", diff --git a/web/popup.go b/web/popup.go index 2a96c197d..d4c1a8eac 100644 --- a/web/popup.go +++ b/web/popup.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/tools" "log" "net/http" ) diff --git a/web/router.go b/web/router.go index 455726a51..90d2faea0 100755 --- a/web/router.go +++ b/web/router.go @@ -12,8 +12,8 @@ import ( "github.com/Masterminds/sprig/v3" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/tools" ) var templateExecutor tools.TemplateExecutor diff --git a/web/saml.go b/web/saml.go index 51ec65759..b38426f05 100644 --- a/web/saml.go +++ b/web/saml.go @@ -12,9 +12,9 @@ import ( "github.com/crewjam/saml" "github.com/crewjam/saml/samlsp" "github.com/gin-gonic/gin" - "github.com/joschahenningsen/TUM-Live/dao" - "github.com/joschahenningsen/TUM-Live/model" - "github.com/joschahenningsen/TUM-Live/tools" + "github.com/TUM-Dev/gocast/dao" + "github.com/TUM-Dev/gocast/model" + "github.com/TUM-Dev/gocast/tools" log "github.com/sirupsen/logrus" ) diff --git a/web/template/admin/admin.gohtml b/web/template/admin/admin.gohtml index af6bd554d..8e7549b56 100755 --- a/web/template/admin/admin.gohtml +++ b/web/template/admin/admin.gohtml @@ -15,7 +15,7 @@ {{$page := .Page}} {{$indexData := .IndexData}} {{template "header" .IndexData.TUMLiveContext}} -{{- /*gotype: github.com/joschahenningsen/TUM-Live/web.AdminPageData*/ -}} +{{- /*gotype: github.com/TUM-Dev/gocast/web.AdminPageData*/ -}}
-
+
@@ -516,4 +516,4 @@
-{{end}} \ No newline at end of file +{{end}} diff --git a/web/template/course-card.gohtml b/web/template/course-card.gohtml index a88da1205..c0a1f6f03 100644 --- a/web/template/course-card.gohtml +++ b/web/template/course-card.gohtml @@ -1,4 +1,4 @@ -{{define "course-card"}}{{- /*gotype: github.com/joschahenningsen/TUM-Live/model.Course*/ -}} +{{define "course-card"}}{{- /*gotype: github.com/TUM-Dev/gocast/model.Course*/ -}} {{$args := .}} {{$user := get $args "user"}} {{$course := get $args "course"}} diff --git a/web/template/course-overview.gohtml b/web/template/course-overview.gohtml index 86456a476..6014878a9 100644 --- a/web/template/course-overview.gohtml +++ b/web/template/course-overview.gohtml @@ -1,4 +1,4 @@ -{{- /*gotype: github.com/joschahenningsen/TUM-Live/web.CoursePageData*/ -}} +{{- /*gotype: github.com/TUM-Dev/gocast/web.CoursePageData*/ -}} {{$course := .IndexData.TUMLiveContext.Course}} diff --git a/web/template/course_list.gohtml b/web/template/course_list.gohtml index 75a2650e0..da5b20ea2 100644 --- a/web/template/course_list.gohtml +++ b/web/template/course_list.gohtml @@ -1,5 +1,5 @@ {{define "course_list"}} - {{- /*gotype: github.com/joschahenningsen/TUM-Live/tools.TUMLiveContext*/ -}} + {{- /*gotype: github.com/TUM-Dev/gocast/tools.TUMLiveContext*/ -}} {{$course := .Course}} {{$lastMonth := -1}} diff --git a/web/template/edit-course-by-token.gohtml b/web/template/edit-course-by-token.gohtml index d45c38c21..c7090156a 100644 --- a/web/template/edit-course-by-token.gohtml +++ b/web/template/edit-course-by-token.gohtml @@ -3,7 +3,7 @@ {{.IndexData.Branding.Title}} | Edit Course - {{- /*gotype: github.com/joschahenningsen/TUM-Live/web.editCourseByTokenPageData*/ -}} + {{- /*gotype: github.com/TUM-Dev/gocast/web.editCourseByTokenPageData*/ -}} {{template "headImports" .IndexData.VersionTag}} diff --git a/web/template/error.gohtml b/web/template/error.gohtml index 3890227f8..2069c1197 100644 --- a/web/template/error.gohtml +++ b/web/template/error.gohtml @@ -30,7 +30,7 @@ -{{- /*gotype: github.com/joschahenningsen/TUM-Live/tools.ErrorPageData*/ -}} +{{- /*gotype: github.com/TUM-Dev/gocast/tools.ErrorPageData*/ -}} {{template "header"}}
diff --git a/web/template/header.gohtml b/web/template/header.gohtml index 60d1b46a0..3ff1b363f 100644 --- a/web/template/header.gohtml +++ b/web/template/header.gohtml @@ -1,4 +1,4 @@ -{{define "header"}} {{- /*gotype: github.com/joschahenningsen/TUM-Live/tools.TUMLiveContext*/ -}} +{{define "header"}} {{- /*gotype: github.com/TUM-Dev/gocast/tools.TUMLiveContext*/ -}}