laurencee / Livestream.Monitor

A windows GUI for livestreamer/streamlink
GNU General Public License v2.0
59 stars 8 forks source link

Smashcast top stream & search box error #44

Closed Tharn closed 3 years ago

Tharn commented 6 years ago

Putting a name into the search field when browsing Smashcast top streams (or switching from another streaming service with the search box already filled-in) will often throw this error:

Error getting top streams from 'smashcast'.

ExternalAPIs.HttpRequestWithStatusException: {"success":false,"error":true,"error_msg":"no_media_found"}
   at ExternalAPIs.HttpClientExtensions.<EnsureSuccessStatusCodeAsync>d__4.MoveNext() in H:\Programming\Git\Livestream.Monitor\ExternalAPIs\HttpClientExtensions.cs:line 56
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ExternalAPIs.HttpClientExtensions.<ExecuteRequest>d__3`1.MoveNext() in H:\Programming\Git\Livestream.Monitor\ExternalAPIs\HttpClientExtensions.cs:line 37
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ExternalAPIs.HttpClientExtensions.<ExecuteRequest>d__2`1.MoveNext() in H:\Programming\Git\Livestream.Monitor\ExternalAPIs\HttpClientExtensions.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ExternalAPIs.Smashcast.SmashcastReadonlyClient.<GetTopStreams>d__0.MoveNext() in H:\Programming\Git\Livestream.Monitor\ExternalAPIs\Smashcast\SmashcastReadonlyClient.cs:line 22
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Livestream.Monitor.Model.ApiClients.SmashcastApiClient.<GetTopStreams>d__35.MoveNext() in H:\Programming\Git\Livestream.Monitor\Livestream.Monitor\Model\ApiClients\SmashcastApiClient.cs:line 142
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Livestream.Monitor.ViewModels.TopStreamsViewModel.<EnsureItems>d__51.MoveNext() in H:\Programming\Git\Livestream.Monitor\Livestream.Monitor\ViewModels\TopStreamsViewModel.cs:line 310
laurencee commented 6 years ago

Thanks for the feedback, what appears to be happening is if you put in the name of a game that there are no streams for, the smashcast api returns it as a failure rather than just returning no items.

Looks like I'll have to deal with this special case myself in the smashcast api client code.

Tharn commented 3 years ago

Still (or maybe again?) getting Smashcast errors when selecting "Top Streams".

laurencee commented 3 years ago

I'll check this coming weekend

laurencee commented 3 years ago

Oh Smashcast actually shutdown late Nov last year haha: https://medium.com/streamers-corner/smashcast-shuts-down-why-esports-killed-this-platform-8681fa5038dd

Guess that's another API to remove from the app.