Skip to content

Commit

Permalink
Merge pull request #24 from Vavency/master
Browse files Browse the repository at this point in the history
Bypass file extention check with a convar
  • Loading branch information
Shadowsun™ committed Nov 24, 2023
2 parents 174ae29 + 0d3faff commit 1cd0bd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ local validExtensions = {
}

function SERVICE:Match( url )
return validExtensions[ string.GetExtensionFromFilename( url.path ) ]
return validExtensions[ string.GetExtensionFromFilename( url.path ) ] or GetConVar( "cinema_force_extension_bypass" ):GetBool()
end

if (CLIENT) then
Expand Down Expand Up @@ -162,4 +162,4 @@ function SERVICE:GetVideoInfo( data, onSuccess, onFailure )

end

theater.RegisterService( "file", SERVICE )
theater.RegisterService( "file", SERVICE )
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CreateConVar( "cinema_queue_mode", 1, { FCVAR_ARCHIVE, FCVAR_DONTRECORD, FCVAR_REPLICATED }, "1 = Videos may be voted up or down\n2 = Videos are played in the order they're requested" )
CreateConVar( "cinema_force_extension_bypass", 0, { FCVAR_ARCHIVE, FCVAR_DONTRECORD, FCVAR_REPLICATED }, "Bypass file extension check when using direct file streaming" )

if CLIENT then

Expand Down

0 comments on commit 1cd0bd1

Please sign in to comment.