Skip to content

Commit

Permalink
fix: 🩹 Default Live TV checkbox to enabled to reflect Jellyfin/Emby d…
Browse files Browse the repository at this point in the history
…efault
  • Loading branch information
JamsRepos committed Apr 22, 2024
1 parent 8723d1c commit 1cba8c3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@
"[shellscript]": {
"editor.defaultFormatter": "shakram02.bash-beautify"
},
"conventionalCommits.gitmoji": false,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# CREATED ON VERSION: V4.0.0b7
# MIGRATION: 2024-04-19_18-46-37
# CREATED: Fri Apr 19 2024
#

from peewee import *
from playhouse.migrate import *

from app import db

# Do not change the name of this file,
# migrations are run in order of their filenames date and time


def run():
# Use migrator to perform actions on the database
migrator = SqliteMigrator(db)

# Add new Column to users table called tutorial, its a boolean field with a default value of False
with db.transaction():
# Check if the column exists
cursor = db.cursor()
cursor.execute("PRAGMA table_info(invitations);")
columns = cursor.fetchall()
column_names = [column[1] for column in columns]

if "live_tv" not in column_names:
db.execute_sql("ALTER TABLE invitations ADD COLUMN live_tv INTEGER")
else:
print("Column live_tv already exists")

print("Migration 2024-04-22_19-17-37 complete")
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default defineComponent({
inviteCode: "",
expiration: 1440 as number | null | "custom",
customExpiration: "" as string,
checkboxes: [] as string[],
checkboxes: ["live_tv"] as string[], // Add the checkboxes you want to be checked by default
duration: "unlimited" as number | "unlimited" | "custom",
customDuration: "" as string,
libraries: [] as string[],
Expand Down

0 comments on commit 1cba8c3

Please sign in to comment.