feyris-tan ef86554f9a Import
2025-05-12 22:09:16 +02:00

41 lines
1.5 KiB
C#

using MySqlConnector;
using skyscraper5.Skyscraper.Scraper.Storage.Split;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace skyscraper5.Data.MySql
{
public partial class MySqlDataStorage : DataStorage
{
public void DataCarouselModuleMarkComplete(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleModuleId, byte moduleModuleVersion)
{
}
public bool IsDsmCcModuleBlacklisted(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleId, byte moduleVersion)
{
using (MySqlConnection connection = new MySqlConnection(_mcsb.ToString()))
{
connection.Open();
MySqlCommand command = connection.CreateCommand();
command.CommandText =
"SELECT dateadded FROM dsmcc_blacklist WHERE network_id = @network_id AND transport_stream_id = @transport_stream_id AND pid = @pid AND module_id = @module_id " +
"AND module_version = @module_version";
command.Parameters.AddWithValue("@network_id", currentNetworkId);
command.Parameters.AddWithValue("@transport_stream_id", currentTransportStreamId);
command.Parameters.AddWithValue("@pid", elementaryPid);
command.Parameters.AddWithValue("@module_id", moduleId);
command.Parameters.AddWithValue("@module_version", moduleVersion);
MySqlDataReader dataReader = command.ExecuteReader();
bool result = dataReader.Read();
dataReader.Close();
connection.Close();
return result;
}
}
}
}