Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent crash when video path is invalid #1959

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

cewert
Copy link
Member

@cewert cewert commented Oct 2, 2024

Don't send invalid to isLocalHost()

Comes from roku.com crash log:

   file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(190) 
m                roAssociativeArray refcnt=6 count:3 
#2  Function loaditems_addvideocontent(video As Object, mediasourceid As Dynamic, audio_stream_idx As Integer, forcetranscoding As Boolean) As Voi$1 file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(322) 
#3  Function addvideocontenturl(video As Dynamic, mediasourceid As Dynamic, audio_stream_idx As Dynamic, fully_external As Dynamic) As Voi$1 file/line: pkg:/source/utils/misc.brs(389) 
#4  Function islocalhost(url As String) As Boolea$1 Backtrace: 
Type Mismatch. Unable to cast "Invalid" to "String". (runtime error &h18) in pkg:/source/utils/misc.brs(387) 
   file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(54) 
   file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(46) 
Local Variables: 
#0  Function loaditems() As Voi$1 global           Interface:ifGloba$1 url              Invalid

which points to this line after running build-prod on 2.1.4:

function isLocalhost(url as string) as boolean

Issues

Ref #1164

@cewert cewert added the bug-fix This fixes a bug. label Oct 2, 2024
@cewert cewert requested a review from a team as a code owner October 2, 2024 00:10
@cewert cewert merged commit c53d374 into jellyfin:2.1.z Oct 4, 2024
13 checks passed
@cewert cewert deleted the fix-islocalhost-crash branch October 4, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix This fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants