NoahFetz / F1AppleTV

F1TV Client for AppleTV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't start Replay of the full race (Quali, Practice)

lexin opened this issue · comments

I have an account at F1 tv and logged in the app. But when I try to open the replay of recent Race it does nothing.
I checked if I try to open it in the native iOS app - it works - the content is already available for me.

p.s. thank you for such a great app.

You can't compare with the native iOS app since it's still using the old api. Can you try it in a browser on a PC please? I just tried it on my AppleTV and it worked.

just tried. And already looked at the code a little. In the file
PageOverviewCollectionViewController.swift, line 253 the If videoType == "meetingSession" works as TRUE, but I try to run Qualifying or Practice. Probably, something wrong with API or Parsing the answer.
Just commented the code and it moves further successfully.

What language is your appletv set to? And without that line you won't get the screen to choose between the different channels and you can only play the main feed

I tried with both - English and my native language Ukrainian.
Yes, I understand that just commenting the code isn't the solution, but just as temporary fix.

By some reason emfAttributes?.videoType contains "meetingSession", but as I understand there should be this value for quali or practice.

Sorry if I posted mistaken thoughts. Just my fast guesses, and they probably wrong.

I debugged furthe. As an aswer to getContentVideo and attemp to parse the response, I catch the 221 line in NetworkRouter.swift

Type 'Int64' mismatch: Expected to decode Int64 but found a string/data instead.
codingPath: [CodingKeys(stringValue: "resultObj", intValue: nil), CodingKeys(stringValue: "containers", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "metadata", intValue: nil), CodingKeys(stringValue: "emfAttributes", intValue: nil), CodingKeys(stringValue: "sessionStartDate", intValue: nil)]

I'll fix that tomorrow.
I suggest you download a program like Postman and take a look at the api. It's a hot mess and very inconsistent and it changes all the time and produces these errors. But thx for debugging :)

I can't reproduce the error you get

I'll try to take a look deeper. Do I understand correctly that this log means that it can't parse sessionStartDate value properly?


Type 'Int64' mismatch: Expected to decode Int64 but found a string/data instead.
codingPath: [CodingKeys(stringValue: "resultObj", intValue: nil), CodingKeys(stringValue: "containers", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "metadata", intValue: nil), CodingKeys(stringValue: "emfAttributes", intValue: nil), CodingKeys(stringValue: "sessionStartDate", intValue: nil)]

I'll try to take a look deeper. Do I understand correctly that this log means that it can't parse sessionStartDate value properly?


Type 'Int64' mismatch: Expected to decode Int64 but found a string/data instead.
codingPath: [CodingKeys(stringValue: "resultObj", intValue: nil), CodingKeys(stringValue: "containers", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "metadata", intValue: nil), CodingKeys(stringValue: "emfAttributes", intValue: nil), CodingKeys(stringValue: "sessionStartDate", intValue: nil)]

Yes but I fixed this a while ago. To me it looks like you don't have the latest version of the code.

Hm,probably yes. will check

yes, You are right. My mistake that I didn't check the version of code. Sorry.

No worries, it happens :)