skyscraper8/skyscraper8/yo3explorer/yo3explorerToSkyscraperContextBridge.cs
2025-06-03 22:04:28 +02:00

39 lines
1020 B
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()
{
long result = (int)Source;
switch (Source)
{
case ServiceListEntryPointSource.TransportStream:
result <<= 4;
result += OriginalNetworkId.Value;
result <<= 16;
result += TransportStreamId.Value;
result <<= 16;
result += PID;
return result;
default:
throw new NotImplementedException(Source.ToString());
}
}
}
}