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

Fix ItemMetaData() crash #1885

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

cewert
Copy link
Member

@cewert cewert commented Jul 31, 2024

It's possible for data.type to be invalid. Remove LCase() function call causing the crash instead of refactoring. Comes from roku.com crash log:

Type Mismatch. (runtime error &h18) in pkg:/source/api/Items.brs(103) 
Backtrace: 
#3  Function itemmetadata(id As String) As Dynami$1 file/line: pkg:/source/api/Items.brs(103) 
#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(63) 
#1  Function loaditems_videoplayer(id As String, mediasourceid As Dynamic, audio_stream_idx As Integer, forcetranscoding As Boolean) As Dynami$1 file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(55) 
#0  Function loaditems() As Voi$1 file/line: pkg:/components/ItemGrid/LoadVideoContentTask.brs(47) 
Local Variables: 
id               roString (2.1 was String) refcnt=4 val:"" 
global           Interface:ifGloba$1 m                roAssociativeArray refcnt=5 count:3 
url              roString (2.1 was String) refcnt=1 val:"Users/a2396207402045d2b18c6db80796d6c6/Items/" 
resp             roUrlTransfer refcnt=1 
data             roAssociativeArray refcnt=1 count:3 
imgparams        roAssociativeArray refcnt=1 count:0 
param            <uninitialized> 
tmp              <uninitialized>

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

else if LCase(data.type) = "recording"

Issues

Ref #1164

@cewert cewert added the bug-fix This fixes a bug. label Jul 31, 2024
@cewert cewert requested a review from a team as a code owner July 31, 2024 12:18
@cewert cewert merged commit b28c08a into jellyfin:2.1.z Jul 31, 2024
13 checks passed
@cewert cewert deleted the fix-itemmetadata-crash branch July 31, 2024 16:52
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
Development

Successfully merging this pull request may close these issues.

2 participants