Skip to content

Commit

Permalink
fix: remove jassub asset check
Browse files Browse the repository at this point in the history
  • Loading branch information
5rahim committed Jun 21, 2024
1 parent b846833 commit c245d4c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions internal/handlers/mediastream.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ func HandleSaveMediastreamSettings(c *RouteCtx) error {
return c.RespondWithError(err)
}

// Check JASSUB
if b.Settings.TranscodeEnabled || b.Settings.PreTranscodeEnabled {
jassubPath := filepath.Join(c.App.Config.Web.AssetDir, "/jassub/jassub-worker.js")
if _, err := os.Stat(jassubPath); os.IsNotExist(err) {
c.App.Logger.Error().Msgf("app: 'Media streaming' cannot be enabled, JASSUB was not located in the asset directory")
b.Settings.TranscodeEnabled = false
b.Settings.PreTranscodeEnabled = false
c.App.WSEventManager.SendEvent(events.ErrorToast, "JASSUB was not located in the asset directory, transcoding has been disabled")
}
}
//// Check JASSUB
//if b.Settings.TranscodeEnabled || b.Settings.PreTranscodeEnabled {
// jassubPath := filepath.Join(c.App.Config.Web.AssetDir, "/jassub/jassub-worker.js")
// if _, err := os.Stat(jassubPath); os.IsNotExist(err) {
// c.App.Logger.Error().Msgf("app: 'Media streaming' cannot be enabled, JASSUB was not located in the asset directory")
// b.Settings.TranscodeEnabled = false
// b.Settings.PreTranscodeEnabled = false
// c.App.WSEventManager.SendEvent(events.ErrorToast, "JASSUB was not located in the asset directory, transcoding has been disabled")
// }
//}

// Check Transcode directory
if b.Settings.TranscodeEnabled {
Expand Down

0 comments on commit c245d4c

Please sign in to comment.