mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 17:32:20 +00:00
- Add Controller.cs for handling StarLight API endpoints - Add ModInit.cs for module initialization and configuration - Add StarLightModels.cs for data models (SearchResult, ProjectInfo, etc.) - Add OnlineApi.cs for integrating with the online API system - Add StarLight.csproj for project configuration - Add StarLightInvoke.cs for core functionality including search, project retrieval, and stream resolution - Add manifest.json for module metadata and initialization The implementation includes: - Search functionality with caching - Project information retrieval with season and episode handling - Stream resolution with multiple fallback options - Proxy support and error handling - Integration with the existing online module system
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using Shared;
|
|
using Shared.Engine;
|
|
using Shared.Models.Online.Settings;
|
|
using Shared.Models.Module;
|
|
|
|
namespace StarLight
|
|
{
|
|
public class ModInit
|
|
{
|
|
public static OnlinesSettings StarLight;
|
|
|
|
/// <summary>
|
|
/// модуль загружен
|
|
/// </summary>
|
|
public static void loaded(InitspaceModel initspace)
|
|
{
|
|
StarLight = new OnlinesSettings("StarLight", "https://tp-back.starlight.digital", streamproxy: false, useproxy: false)
|
|
{
|
|
displayname = "StarLight",
|
|
displayindex = 0,
|
|
proxy = new Shared.Models.Base.ProxySettings()
|
|
{
|
|
useAuth = true,
|
|
username = "",
|
|
password = "",
|
|
list = new string[] { "socks5://ip:port" }
|
|
}
|
|
};
|
|
StarLight = ModuleInvoke.Conf("StarLight", StarLight).ToObject<OnlinesSettings>();
|
|
|
|
// Виводити "уточнити пошук"
|
|
AppInit.conf.online.with_search.Add("starlight");
|
|
}
|
|
}
|
|
}
|