RemoteControl.Instance.GetDatabaseConnectionString(out connStr, out provider);
Gentle.Framework.ProviderFactory.SetDefaultProviderConnectionString(connStr);
me = new User();
me.IsAdmin = true;
groups = ChannelGroup.ListAll();
foreach (ChannelGroup group in groups)
Console.WriteLine(group.GroupName);
Recording.ListAll
'or
Return Schedule.ListAll
Public Shared Function RecordProgramById(ByVal programid As Integer, ByVal rectype As Integer) As Boolean
Try
Dim layer As New TvBusinessLayer
Dim program As Program = program.Retrieve(programid)
Dim newSchedule As Schedule = New Schedule(program.IdChannel, program.Title, program.StartTime, program.EndTime)
newSchedule.ScheduleType = rectype
newSchedule.PreRecordInterval = Int32.Parse(layer.GetSetting("preRecordInterval", "5").Value)
newSchedule.PostRecordInterval = Int32.Parse(layer.GetSetting("postRecordInterval", "5").Value)
newSchedule.Quality = 73
newSchedule.MaxAirings = 2147483647
newSchedule.Persist()
RemoteControl.Instance.OnNewSchedule()
Return True
Catch ex As Exception
Return False
End Try
End Function
Public Shared Function DeleteRecordingById(ByVal recordingid As Integer) As Boolean
Try
Dim layer As New TvBusinessLayer
Dim recording As Recording = recording.Retrieve(recordingid)
Dim recFile As String = recording.FileName
If File.Exists(xmlFile) Then
File.Delete(xmlFile)
End If
recording.Delete()
Return True
Catch ex As Exception
Return False
End Try
End Function
couldn't we just use that one?
Great guys!! Finally there is some movement for TV implementation for XBMC. Hope your plugin will work with the newer XBMX svns soon
The current rtsp implementation within XBMC sucks (probably not due to XBMC, but ffmpeg? the internal player of XBMC), therefore you can't stream TV, but the plugin is working correctly.
Nice to see some work on this, would be great to have a smooth reliable way of watching TV from within XBMC.
Since XBMC has just entered feature freeze for the impending 9.04 release, maybe we should make some noise over in the XBMC forums to see if the RTSP issues can be addressed in 9.04's bug bashing phase?
11:46:38 T:2796 M:2561904640 NOTICE: DVDPlayer: Opening: rtsp://192.168.2.129/stream1.0
11:46:38 T:2796 M:2561900544 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
11:46:38 T:3644 M:2561843200 NOTICE: Creating InputStream
11:46:38 T:3644 M:2561843200 NOTICE: Creating Demuxer
11:46:38 T:3644 M:2560020480 ERROR: CDVDPlayer::OpenDemuxStream - Exception thrown when opeing demuxer
11:46:38 T:3644 M:2560020480 NOTICE: CDVDPlayer::OnExit()
11:46:38 T:3644 M:2560020480 NOTICE: CDVDPlayer::OnExit() deleting input stream
11:46:38 T:2796 M:2560143360 ERROR: Can't open the database MyVideos34.db as it is a NEWER version than what we were expecting!
11:46:38 T:2796 M:2560143360 NOTICE: CDVDPlayer::CloseFile()
11:46:38 T:2796 M:2560143360 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
11:46:38 T:2796 M:2560143360 NOTICE: DVDPlayer: waiting for threads to exit
11:46:38 T:2796 M:2560143360 NOTICE: DVDPlayer: finished waiting
13:56:06 T:4488 M:2392580096 DEBUG: CPlayerCoreFactory::GetPlayers(rtsp://192.168.2.129/stream1.0)
13:56:06 T:4488 M:2392580096 DEBUG: CPlayerCoreFactory::GetPlayers - Item is an internet stream, content-type=application/octet-stream
13:56:06 T:4488 M:2392580096 DEBUG: Alloc resources: 0.21ms (0.00 ms skin load, 0.15 ms preload)
13:56:07 T:4488 M:2392563712 NOTICE: DVDPlayer: Opening: rtsp://192.168.2.129/stream1.0
13:56:07 T:4488 M:2392563712 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
13:56:07 T:1020 M:2392535040 DEBUG: thread start, auto delete: 0
13:56:07 T:1020 M:2392530944 NOTICE: Creating InputStream
13:56:07 T:1020 M:2392530944 INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles
13:56:07 T:1020 M:2392530944 DEBUG: CUtil::CacheSubtitles: START
13:56:07 T:1020 M:2392526848 INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles done
13:56:07 T:1020 M:2392526848 NOTICE: Creating Demuxer
13:56:07 T:4964 M:2392436736 DEBUG: thread start, auto delete: 1
13:56:07 T:1020 M:2392420352 DEBUG: CDVDDemuxFFmpeg::Open - av_find_stream_info starting
13:56:07 T:1020 M:2391982080 ERROR: CDVDPlayer::OpenDemuxStream - Exception thrown when opeing demuxer
13:56:07 T:1020 M:2391982080 NOTICE: CDVDPlayer::OnExit()
13:56:07 T:1020 M:2391982080 NOTICE: CDVDPlayer::OnExit() deleting input stream
13:56:07 T:1020 M:2391982080 DEBUG: Playback was stopped