- September 1, 2008
- 21,577
- 8,224
- Home Country
- New Zealand
For this part:
...I would recommend to simplify the code like this:
There's no need to check "g_Player._mediaInfo != null" twice, and IMHO the WTV support/handling should be limited to ("encapsulated in") the MediaInfoWrapper class (using the MediaInfoNotloaded property should be enough).
Code:
if (g_Player._mediaInfo != null && (g_Player._mediaInfo != null && !g_Player._mediaInfo.hasVideo &&
(extension.ToLowerInvariant() != ".wtv" && g_Player._mediaInfo.MediaInfoNotloaded)))
...I would recommend to simplify the code like this:
Code:
if (g_Player._mediaInfo != null && !g_Player._mediaInfo.MediaInfoNotloaded && !g_Player._mediaInfo.hasVideo)
There's no need to check "g_Player._mediaInfo != null" twice, and IMHO the WTV support/handling should be limited to ("encapsulated in") the MediaInfoWrapper class (using the MediaInfoNotloaded property should be enough).