pauli2406 / xtream_code_client

MIT License
3 stars 3 forks source link

fix: Cast Error #8

Closed mikailkse closed 2 months ago

mikailkse commented 2 months ago

try { await XtreamCode.initialize( url: url ?? "", port: port ?? "", username: username ?? "", password: password ?? "", ); final client = XtreamCode.instance.client;

  var serverInfo = await client.serverInformation();

  var seriesCategories = await client.seriesCategories();
  var seriesItems =
      await client.seriesItems(category: seriesCategories.first);
  var seriesInfo = await client.seriesInfo(seriesItems.first);
  // await navigateToHomeView(context);
} catch (e) {
  print(e);
} finally {
  setLoading(false);
}

Firstly, I can access categories but when I come to the 2nd step, namely seriesItems and seriesInfo, I cannot access other models I get a cast error "type 'String' is not a subtype of type 'num?' in type cast"

pauli2406 commented 2 months ago

Should be fixed by https://github.com/pauli2406/xtream_code_client/pull/10

mikailkse commented 2 months ago

Brother, how can I reach you, I want to talk more about Xtream. Linkedin => https://www.linkedin.com/in/mikailkse/ Twitter => https://twitter.com/mikailkse0