Skip to content

Commit

Permalink
revert adding fields to getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
5rahim committed May 25, 2024
1 parent 16670e8 commit 26700ea
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 32 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ All notable changes to this project will be documented in this file.

- ⚡️ Reduced memory usage
- ⚡️ Automatic Transcoding cache cleanup on server startup
- ⚡️ Added more fields to getting started screen
- 🚀 Added Docker image for Linux arm64 #63
- 🚑️ Fixed occasional runtime error caused by internal module
- 💄 UI: Improved stream page layouts
Expand Down
36 changes: 18 additions & 18 deletions internal/handlers/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,24 @@ func HandleGettingStarted(c *RouteCtx) error {
return c.RespondWithError(err)
}

go func() {
if b.EnableTranscode {
stt := c.App.SecondarySettings.Mediastream
stt.TranscodeEnabled = true
_, err = c.App.Database.UpsertMediastreamSettings(stt)
if err != nil {
c.App.Logger.Error().Err(err).Msg("app: Failed to update mediastream settings")
}
}
if b.EnableTorrentStreaming {
stt := c.App.SecondarySettings.Torrentstream
stt.Enabled = true
_, err = c.App.Database.UpsertTorrentstreamSettings(stt)
if err != nil {
c.App.Logger.Error().Err(err).Msg("app: Failed to update mediastream settings")
}
}
}()
//go func() {
// if b.EnableTranscode {
// stt := c.App.SecondarySettings.Mediastream
// stt.TranscodeEnabled = true
// _, err = c.App.Database.UpsertMediastreamSettings(stt)
// if err != nil {
// c.App.Logger.Error().Err(err).Msg("app: Failed to update mediastream settings")
// }
// }
// if b.EnableTorrentStreaming {
// stt := c.App.SecondarySettings.Torrentstream
// stt.Enabled = true
// _, err = c.App.Database.UpsertTorrentstreamSettings(stt)
// if err != nil {
// c.App.Logger.Error().Err(err).Msg("app: Failed to update mediastream settings")
// }
// }
//}()

c.App.WSEventManager.SendEvent("settings", settings)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Status } from "@/api/generated/types"
import { useGettingStarted } from "@/api/hooks/settings.hooks"
import { useSetServerStatus } from "@/app/(main)/_hooks/use-server-status"
import { BetaBadge } from "@/components/shared/beta-badge"
import { LoadingOverlayWithLogo } from "@/components/shared/loading-overlay-with-logo"
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"
import { AppLayoutStack } from "@/components/ui/app-layout"
Expand Down Expand Up @@ -386,19 +385,19 @@ export function GettingStartedPage({ status }: { status: Status }) {
/>


<Field.Checkbox
name="enableTorrentStreaming"
label={<span>Torrent streaming <BetaBadge /></span>}
help="Stream torrents directly to your media player without having to wait for the download to complete."
size="lg"
/>
{/*<Field.Checkbox*/}
{/* name="enableTorrentStreaming"*/}
{/* label={<span>Torrent streaming <BetaBadge /></span>}*/}
{/* help="Stream torrents directly to your media player without having to wait for the download to complete."*/}
{/* size="lg"*/}
{/*/>*/}

<Field.Checkbox
name="enableTranscode"
label={<span>Media streaming / Transcoding <BetaBadge /></span>}
help="Stream downloaded episodes to other devices. Some additional configuration is required."
size="lg"
/>
{/*<Field.Checkbox*/}
{/* name="enableTranscode"*/}
{/* label={<span>Media streaming / Transcoding <BetaBadge /></span>}*/}
{/* help="Stream downloaded episodes to other devices. Some additional configuration is required."*/}
{/* size="lg"*/}
{/*/>*/}

<Field.Checkbox
name="enableOnlinestream"
Expand Down

0 comments on commit 26700ea

Please sign in to comment.