Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fireshare",
"version": "1.6.8",
"version": "1.6.9",
"private": true,
"dependencies": {
"@emotion/react": "^11.9.0",
Expand Down
1 change: 1 addition & 0 deletions app/client/src/components/player/VideoJSPlayer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, useRef, useState, useMemo } from 'react'
import '@videojs/react/video/skin.css'
import './videoSkinOverrides.css'
import { createPlayer, useMedia, Poster } from '@videojs/react'
import { Video, videoFeatures } from '@videojs/react/video'
import CustomVideoSkin from './CustomVideoSkin'
Expand Down
4 changes: 4 additions & 0 deletions app/client/src/components/player/videoSkinOverrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* Constrain the controls scrim to the bottom ~25% of the video instead of the full frame */
.media-default-skin .media-overlay {
background-image: linear-gradient(to top, oklch(0 0 0 / 0.55) 0px, oklch(0 0 0 / 0.35) 40px, oklch(0 0 0 / 0) 80px);
}
5 changes: 0 additions & 5 deletions app/client/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,3 @@ code {
color: rgba(0, 219, 255, 1);
}
}

/* Remove the gradient/scrim overlay that darkens the video when controls appear */
/* .media-default-skin .media-overlay {
display: none;
} */
6 changes: 4 additions & 2 deletions app/server/fireshare/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,10 @@ def scan_videos(root):
folder = parts[0]
if folder in folder_rules:
game_id = folder_rules[folder]
link = VideoGameLink(video_id=nv.video_id, game_id=game_id, created_at=datetime.utcnow())
db.session.add(link)
existing = VideoGameLink.query.filter_by(video_id=nv.video_id, game_id=game_id).first()
if not existing:
link = VideoGameLink(video_id=nv.video_id, game_id=game_id, created_at=datetime.utcnow())
db.session.add(link)
auto_tagged.add(nv.video_id)
logger.info(f"[Folder Rule] Auto-tagged {nv.video_id} to game {game_id} (folder: {folder})")
if auto_tagged:
Expand Down
1 change: 1 addition & 0 deletions app/server/fireshare/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def __repr__(self):

class VideoGameLink(db.Model):
__tablename__ = "video_game_link"
__table_args__ = (db.UniqueConstraint("video_id", "game_id"),)

id = db.Column(db.Integer, primary_key=True)
video_id = db.Column(db.String(32), db.ForeignKey("video.video_id"), nullable=False)
Expand Down
43 changes: 43 additions & 0 deletions migrations/versions/n9i0j1k2l3m4_unique_video_game_link.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"""add unique constraint to video_game_link and remove existing duplicates

Revision ID: n9i0j1k2l3m4
Revises: m8h9i0j1k2l3
Create Date: 2026-05-01 00:00:00.000000

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy import text

revision = 'n9i0j1k2l3m4'
down_revision = 'm8h9i0j1k2l3'
branch_labels = None
depends_on = None


def upgrade():
conn = op.get_bind()

# Remove duplicate rows, keeping the lowest id for each (video_id, game_id) pair
conn.execute(text("""
DELETE FROM video_game_link
WHERE id NOT IN (
SELECT MIN(id)
FROM video_game_link
GROUP BY video_id, game_id
)
"""))

with op.batch_alter_table('video_game_link', schema=None) as batch_op:
batch_op.create_unique_constraint(
'uq_video_game_link_video_id_game_id',
['video_id', 'game_id']
)


def downgrade():
with op.batch_alter_table('video_game_link', schema=None) as batch_op:
batch_op.drop_constraint(
'uq_video_game_link_video_id_game_id',
type_='unique'
)
Loading