VicMoore 713 Posted October 2, 2024 Posted October 2, 2024 @LukeIn the VirtualTVExample code, saving the schedule with private ChannelSchedule GetSavedChannelSchedule(TunerHostInfo tuner, string tunerChannelId) within the C# PseudoTVTuner.cs code, returns both the schedule and a DirectoryNotFoundException. exception which causes the function to always return a null; private ChannelSchedule GetSavedChannelSchedule(TunerHostInfo tuner, string tunerChannelId) { var path = this.GetChannelDataPath(tuner.Id, tunerChannelId); try { return this.JsonSerializer.DeserializeFromFile<ChannelSchedule>(path); } catch (DirectoryNotFoundException) { } catch (FileNotFoundException) { } catch (Exception ex) { this.Logger.ErrorException("Error in GetSavedChannelSchedule for {0}", ex, path); } return null; } I think the problem is that the code is asynchronous and does not wait for the promise. Vic
VicMoore 713 Posted October 2, 2024 Author Posted October 2, 2024 This function is now working OK. I am sure it was something stupid that I was doing. Vic 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now