示例#1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public NowPlayingTv()
        {
            TvDatabase.Channel current = MpTvServerHelper.GetCurrentTimeShiftingTVChannel();
            if (current != null)
            {
                ChannelId   = current.IdChannel;
                ChannelName = current.DisplayName;

                if (current.CurrentProgram != null)
                {
                    CurrentProgramId          = current.CurrentProgram.IdProgram;
                    CurrentProgramName        = current.CurrentProgram.Title;
                    CurrentProgramDescription = current.CurrentProgram.Description;
                    CurrentProgramBegin       = current.CurrentProgram.StartTime;
                    CurrentProgramEnd         = current.CurrentProgram.EndTime;
                }

                if (current.NextProgram != null)
                {
                    NextProgramId          = current.NextProgram.IdProgram;
                    NextProgramName        = current.NextProgram.Title;
                    NextProgramDescription = current.NextProgram.Description;
                    NextProgramBegin       = current.NextProgram.StartTime;
                    NextProgramEnd         = current.NextProgram.EndTime;
                }
            }
        }
示例#2
0
        /// <summary>
        /// Mediaportal TV playback changed
        /// </summary>
        void g_Player_TVPlayBackChanged()
        {
            TvDatabase.Channel current = MpTvServerHelper.GetCurrentTimeShiftingTVChannel();

            if (socketServer != null && current != null && (LatestChannelId == -1 || LatestChannelId != current.IdChannel))
            {
                LatestChannelId = current.IdChannel;
                LogMessage("TV Playback changed!", LogType.Debug);
                socketServer.SendNowPlayingToAllClients();
            }
        }