skyscraper8/skyscraper8/yo3explorer/yo3explorerToSkyscraperContextBridge.cs
2025-06-21 20:57:07 +02:00

37 lines
1.1 KiB
C#

using skyscraper5.Skyscraper.Scraper.Storage;
using skyscraper8.DvbI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace skyscraper8.yo3explorer
{
internal class yo3explorerToSkyscraperContextBridge
{
public DateTime CurrentTime { get; internal set; }
public ServiceListEntryPointSource Source { get; internal set; }
public int? OriginalNetworkId { get; internal set; }
public int? TransportStreamId { get; internal set; }
public int PID { get; internal set; }
public IScraperStroage DataStorage { get; internal set; }
public long GetSourceHash()
{
return DvbIUtils.GetSourceHash(Source, (ushort)OriginalNetworkId.Value, (ushort)TransportStreamId.Value, PID);
}
internal string ToHumanReadableSourceString()
{
switch (Source)
{
case ServiceListEntryPointSource.TransportStream:
return String.Format("ONID: {0}, TSID: {1}, PID: {2}", OriginalNetworkId.Value, TransportStreamId.Value, PID);
default:
throw new NotImplementedException(Source.ToString());
}
}
}
}