mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 17:32:20 +00:00
feat(starlight): add new online module for StarLight streaming service
- 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
This commit is contained in:
parent
1a4f1b0be1
commit
5bda0da6fb
136
StarLight/Controller.cs
Normal file
136
StarLight/Controller.cs
Normal file
@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Shared;
|
||||
using Shared.Engine;
|
||||
using Shared.Models.Online.Settings;
|
||||
using Shared.Models.Templates;
|
||||
using StarLight.Models;
|
||||
|
||||
namespace StarLight.Controllers
|
||||
{
|
||||
public class Controller : BaseOnlineController
|
||||
{
|
||||
ProxyManager proxyManager;
|
||||
|
||||
public Controller()
|
||||
{
|
||||
proxyManager = new ProxyManager(ModInit.StarLight);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("starlight")]
|
||||
async public Task<ActionResult> Index(long id, string imdb_id, long kinopoisk_id, string title, string original_title, string original_language, int year, string source, int serial, string account_email, int s = -1, bool rjson = false, string href = null)
|
||||
{
|
||||
var init = await loadKit(ModInit.StarLight);
|
||||
if (!init.enable)
|
||||
return Forbid();
|
||||
|
||||
var invoke = new StarLightInvoke(init, hybridCache, OnLog, proxyManager);
|
||||
|
||||
string itemUrl = href;
|
||||
if (string.IsNullOrEmpty(itemUrl))
|
||||
{
|
||||
var searchResults = await invoke.Search(title, original_title);
|
||||
if (searchResults == null || searchResults.Count == 0)
|
||||
return OnError("starlight", proxyManager);
|
||||
|
||||
if (searchResults.Count > 1)
|
||||
{
|
||||
var similar_tpl = new SimilarTpl(searchResults.Count);
|
||||
foreach (var res in searchResults)
|
||||
{
|
||||
string link = $"{host}/starlight?imdb_id={imdb_id}&kinopoisk_id={kinopoisk_id}&title={HttpUtility.UrlEncode(title)}&original_title={HttpUtility.UrlEncode(original_title)}&year={year}&serial={serial}&href={HttpUtility.UrlEncode(res.Href)}";
|
||||
similar_tpl.Append(res.Title, string.Empty, string.Empty, link, string.Empty);
|
||||
}
|
||||
|
||||
return rjson ? Content(similar_tpl.ToJson(), "application/json; charset=utf-8") : Content(similar_tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
}
|
||||
|
||||
itemUrl = searchResults[0].Href;
|
||||
}
|
||||
|
||||
var project = await invoke.GetProject(itemUrl);
|
||||
if (project == null)
|
||||
return OnError("starlight", proxyManager);
|
||||
|
||||
if (serial == 1 && project.Seasons.Count > 0)
|
||||
{
|
||||
if (s == -1)
|
||||
{
|
||||
var season_tpl = new SeasonTpl(project.Seasons.Count);
|
||||
for (int i = 0; i < project.Seasons.Count; i++)
|
||||
{
|
||||
var season = project.Seasons[i];
|
||||
string seasonName = string.IsNullOrEmpty(season.Title) ? $"Сезон {i + 1}" : season.Title;
|
||||
string link = $"{host}/starlight?imdb_id={imdb_id}&kinopoisk_id={kinopoisk_id}&title={HttpUtility.UrlEncode(title)}&original_title={HttpUtility.UrlEncode(original_title)}&year={year}&serial=1&s={i}&href={HttpUtility.UrlEncode(itemUrl)}";
|
||||
season_tpl.Append(seasonName, link, i.ToString());
|
||||
}
|
||||
|
||||
return rjson ? Content(season_tpl.ToJson(), "application/json; charset=utf-8") : Content(season_tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
}
|
||||
|
||||
if (s < 0 || s >= project.Seasons.Count)
|
||||
return OnError("starlight", proxyManager);
|
||||
|
||||
string seasonSlug = project.Seasons[s].Slug;
|
||||
var episodes = invoke.GetEpisodes(project, seasonSlug);
|
||||
if (episodes == null || episodes.Count == 0)
|
||||
return OnError("starlight", proxyManager);
|
||||
|
||||
var episode_tpl = new EpisodeTpl();
|
||||
int index = 1;
|
||||
foreach (var ep in episodes)
|
||||
{
|
||||
if (string.IsNullOrEmpty(ep.Hash))
|
||||
continue;
|
||||
|
||||
string episodeName = string.IsNullOrEmpty(ep.Title) ? $"Епізод {index}" : ep.Title;
|
||||
string callUrl = $"{host}/starlight/play?hash={HttpUtility.UrlEncode(ep.Hash)}&title={HttpUtility.UrlEncode(title ?? original_title)}";
|
||||
episode_tpl.Append(episodeName, title ?? original_title, (s + 1).ToString(), index.ToString("D2"), accsArgs(callUrl), "call");
|
||||
index++;
|
||||
}
|
||||
|
||||
return rjson ? Content(episode_tpl.ToJson(), "application/json; charset=utf-8") : Content(episode_tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
}
|
||||
else
|
||||
{
|
||||
string hash = project.Hash;
|
||||
if (string.IsNullOrEmpty(hash) && project.Episodes.Count > 0)
|
||||
hash = project.Episodes.FirstOrDefault(e => !string.IsNullOrEmpty(e.Hash))?.Hash;
|
||||
|
||||
if (string.IsNullOrEmpty(hash))
|
||||
return OnError("starlight", proxyManager);
|
||||
|
||||
string callUrl = $"{host}/starlight/play?hash={HttpUtility.UrlEncode(hash)}&title={HttpUtility.UrlEncode(title ?? original_title)}";
|
||||
var movie_tpl = new MovieTpl(title, original_title, 1);
|
||||
movie_tpl.Append(string.IsNullOrEmpty(title) ? "StarLight" : title, accsArgs(callUrl), "call");
|
||||
|
||||
return rjson ? Content(movie_tpl.ToJson(), "application/json; charset=utf-8") : Content(movie_tpl.ToHtml(), "text/html; charset=utf-8");
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("starlight/play")]
|
||||
async public Task<ActionResult> Play(string hash, string title)
|
||||
{
|
||||
if (string.IsNullOrEmpty(hash))
|
||||
return OnError("starlight", proxyManager);
|
||||
|
||||
var init = await loadKit(ModInit.StarLight);
|
||||
if (!init.enable)
|
||||
return Forbid();
|
||||
|
||||
var invoke = new StarLightInvoke(init, hybridCache, OnLog, proxyManager);
|
||||
var result = await invoke.ResolveStream(hash);
|
||||
if (result == null || string.IsNullOrEmpty(result.Stream))
|
||||
return OnError("starlight", proxyManager);
|
||||
|
||||
string streamUrl = HostStreamProxy(init, accsArgs(result.Stream), proxy: proxyManager.Get());
|
||||
string jsonResult = $"{{\"method\":\"play\",\"url\":\"{streamUrl}\",\"title\":\"{title ?? result.Name ?? ""}\"}}";
|
||||
return Content(jsonResult, "application/json; charset=utf-8");
|
||||
}
|
||||
}
|
||||
}
|
||||
35
StarLight/ModInit.cs
Normal file
35
StarLight/ModInit.cs
Normal file
@ -0,0 +1,35 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
47
StarLight/Models/StarLightModels.cs
Normal file
47
StarLight/Models/StarLightModels.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StarLight.Models
|
||||
{
|
||||
public class SearchResult
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string Href { get; set; }
|
||||
public string Channel { get; set; }
|
||||
public string Project { get; set; }
|
||||
}
|
||||
|
||||
public class SeasonInfo
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Slug { get; set; }
|
||||
}
|
||||
|
||||
public class EpisodeInfo
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Hash { get; set; }
|
||||
public string VideoSlug { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string SeasonSlug { get; set; }
|
||||
}
|
||||
|
||||
public class ProjectInfo
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Poster { get; set; }
|
||||
public string Hash { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string Channel { get; set; }
|
||||
public List<SeasonInfo> Seasons { get; set; } = new();
|
||||
public List<EpisodeInfo> Episodes { get; set; } = new();
|
||||
}
|
||||
|
||||
public class StreamResult
|
||||
{
|
||||
public string Stream { get; set; }
|
||||
public string Poster { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
25
StarLight/OnlineApi.cs
Normal file
25
StarLight/OnlineApi.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using Shared.Models.Base;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StarLight
|
||||
{
|
||||
public class OnlineApi
|
||||
{
|
||||
public static List<(string name, string url, string plugin, int index)> Events(string host, long id, string imdb_id, long kinopoisk_id, string title, string original_title, string original_language, int year, string source, int serial, string account_email)
|
||||
{
|
||||
var online = new List<(string name, string url, string plugin, int index)>();
|
||||
|
||||
var init = ModInit.StarLight;
|
||||
if (init.enable && !init.rip)
|
||||
{
|
||||
string url = init.overridehost;
|
||||
if (string.IsNullOrEmpty(url))
|
||||
url = $"{host}/starlight";
|
||||
|
||||
online.Add((init.displayname, url, "starlight", init.displayindex));
|
||||
}
|
||||
|
||||
return online;
|
||||
}
|
||||
}
|
||||
}
|
||||
15
StarLight/StarLight.csproj
Normal file
15
StarLight/StarLight.csproj
Normal file
@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<OutputType>library</OutputType>
|
||||
<IsPackable>true</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Shared">
|
||||
<HintPath>..\..\Shared.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
255
StarLight/StarLightInvoke.cs
Normal file
255
StarLight/StarLightInvoke.cs
Normal file
@ -0,0 +1,255 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Shared;
|
||||
using Shared.Engine;
|
||||
using Shared.Models;
|
||||
using Shared.Models.Online.Settings;
|
||||
using StarLight.Models;
|
||||
|
||||
namespace StarLight
|
||||
{
|
||||
public class StarLightInvoke
|
||||
{
|
||||
private const string PlayerApi = "https://vcms-api2.starlight.digital/player-api";
|
||||
private const string PlayerReferer = "https://teleportal.ua/";
|
||||
private const string Language = "ua";
|
||||
private readonly OnlinesSettings _init;
|
||||
private readonly HybridCache _hybridCache;
|
||||
private readonly Action<string> _onLog;
|
||||
private readonly ProxyManager _proxyManager;
|
||||
|
||||
public StarLightInvoke(OnlinesSettings init, HybridCache hybridCache, Action<string> onLog, ProxyManager proxyManager)
|
||||
{
|
||||
_init = init;
|
||||
_hybridCache = hybridCache;
|
||||
_onLog = onLog;
|
||||
_proxyManager = proxyManager;
|
||||
}
|
||||
|
||||
public async Task<List<SearchResult>> Search(string title, string original_title)
|
||||
{
|
||||
string query = !string.IsNullOrEmpty(title) ? title : original_title;
|
||||
if (string.IsNullOrEmpty(query))
|
||||
return null;
|
||||
|
||||
string memKey = $"StarLight:search:{query}";
|
||||
if (_hybridCache.TryGetValue(memKey, out List<SearchResult> cached))
|
||||
return cached;
|
||||
|
||||
string url = $"{_init.host}/{Language}/live-search?q={HttpUtility.UrlEncode(query)}";
|
||||
var headers = new List<HeadersModel>()
|
||||
{
|
||||
new HeadersModel("User-Agent", "Mozilla/5.0"),
|
||||
new HeadersModel("Referer", _init.host)
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
_onLog?.Invoke($"StarLight search: {url}");
|
||||
string payload = await Http.Get(url, headers: headers, proxy: _proxyManager.Get());
|
||||
if (string.IsNullOrEmpty(payload))
|
||||
return null;
|
||||
|
||||
var results = new List<SearchResult>();
|
||||
using var document = JsonDocument.Parse(payload);
|
||||
if (document.RootElement.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
foreach (var item in document.RootElement.EnumerateArray())
|
||||
{
|
||||
string typeSlug = item.TryGetProperty("typeSlug", out var typeProp) ? typeProp.GetString() : null;
|
||||
string channelSlug = item.TryGetProperty("channelSlug", out var channelProp) ? channelProp.GetString() : null;
|
||||
string projectSlug = item.TryGetProperty("projectSlug", out var projectProp) ? projectProp.GetString() : null;
|
||||
if (string.IsNullOrEmpty(typeSlug) || string.IsNullOrEmpty(channelSlug) || string.IsNullOrEmpty(projectSlug))
|
||||
continue;
|
||||
|
||||
string href = $"{_init.host}/{Language}/{typeSlug}/{channelSlug}/{projectSlug}";
|
||||
results.Add(new SearchResult
|
||||
{
|
||||
Title = item.TryGetProperty("title", out var titleProp) ? titleProp.GetString() : null,
|
||||
Type = typeSlug,
|
||||
Href = href,
|
||||
Channel = channelSlug,
|
||||
Project = projectSlug
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (results.Count > 0)
|
||||
_hybridCache.Set(memKey, results, cacheTime(15, init: _init));
|
||||
|
||||
return results;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_onLog?.Invoke($"StarLight search error: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ProjectInfo> GetProject(string href)
|
||||
{
|
||||
if (string.IsNullOrEmpty(href))
|
||||
return null;
|
||||
|
||||
string memKey = $"StarLight:project:{href}";
|
||||
if (_hybridCache.TryGetValue(memKey, out ProjectInfo cached))
|
||||
return cached;
|
||||
|
||||
var headers = new List<HeadersModel>()
|
||||
{
|
||||
new HeadersModel("User-Agent", "Mozilla/5.0"),
|
||||
new HeadersModel("Referer", _init.host)
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
_onLog?.Invoke($"StarLight project: {href}");
|
||||
string payload = await Http.Get(href, headers: headers, proxy: _proxyManager.Get());
|
||||
if (string.IsNullOrEmpty(payload))
|
||||
return null;
|
||||
|
||||
using var document = JsonDocument.Parse(payload);
|
||||
var root = document.RootElement;
|
||||
|
||||
var project = new ProjectInfo
|
||||
{
|
||||
Title = root.TryGetProperty("title", out var titleProp) ? titleProp.GetString() : null,
|
||||
Description = root.TryGetProperty("description", out var descProp) ? descProp.GetString() : null,
|
||||
Poster = NormalizeImage(root.TryGetProperty("image", out var imageProp) ? imageProp.GetString() : null),
|
||||
Hash = root.TryGetProperty("hash", out var hashProp) ? hashProp.GetString() : null,
|
||||
Type = root.TryGetProperty("typeSlug", out var typeProp) ? typeProp.GetString() : null,
|
||||
Channel = root.TryGetProperty("channelTitle", out var channelProp) ? channelProp.GetString() : null
|
||||
};
|
||||
|
||||
if (root.TryGetProperty("seasonsGallery", out var seasonsProp) && seasonsProp.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
foreach (var season in seasonsProp.EnumerateArray())
|
||||
{
|
||||
string seasonTitle = season.TryGetProperty("title", out var sTitle) ? sTitle.GetString() : null;
|
||||
string seasonSlug = season.TryGetProperty("seasonSlug", out var sSlug) ? sSlug.GetString() : null;
|
||||
project.Seasons.Add(new SeasonInfo { Title = seasonTitle, Slug = seasonSlug });
|
||||
|
||||
if (season.TryGetProperty("items", out var itemsProp) && itemsProp.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
foreach (var item in itemsProp.EnumerateArray())
|
||||
{
|
||||
project.Episodes.Add(new EpisodeInfo
|
||||
{
|
||||
Title = item.TryGetProperty("title", out var eTitle) ? eTitle.GetString() : null,
|
||||
Hash = item.TryGetProperty("hash", out var eHash) ? eHash.GetString() : null,
|
||||
VideoSlug = item.TryGetProperty("videoSlug", out var eSlug) ? eSlug.GetString() : null,
|
||||
Date = item.TryGetProperty("dateOfBroadcast", out var eDate) ? eDate.GetString() : (item.TryGetProperty("timeUploadVideo", out var eDate2) ? eDate2.GetString() : null),
|
||||
SeasonSlug = seasonSlug
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_hybridCache.Set(memKey, project, cacheTime(10, init: _init));
|
||||
return project;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_onLog?.Invoke($"StarLight project error: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public List<EpisodeInfo> GetEpisodes(ProjectInfo project, string seasonSlug)
|
||||
{
|
||||
if (project == null || project.Seasons.Count == 0)
|
||||
return new List<EpisodeInfo>();
|
||||
|
||||
if (string.IsNullOrEmpty(seasonSlug))
|
||||
return project.Episodes;
|
||||
|
||||
return project.Episodes.Where(e => e.SeasonSlug == seasonSlug).ToList();
|
||||
}
|
||||
|
||||
public async Task<StreamResult> ResolveStream(string hash)
|
||||
{
|
||||
if (string.IsNullOrEmpty(hash))
|
||||
return null;
|
||||
|
||||
string url = $"{PlayerApi}/{hash}?referer={HttpUtility.UrlEncode(PlayerReferer)}&lang={Language}";
|
||||
var headers = new List<HeadersModel>()
|
||||
{
|
||||
new HeadersModel("User-Agent", "Mozilla/5.0"),
|
||||
new HeadersModel("Referer", PlayerReferer)
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
_onLog?.Invoke($"StarLight stream: {url}");
|
||||
string payload = await Http.Get(url, headers: headers, proxy: _proxyManager.Get());
|
||||
if (string.IsNullOrEmpty(payload))
|
||||
return null;
|
||||
|
||||
using var document = JsonDocument.Parse(payload);
|
||||
var root = document.RootElement;
|
||||
|
||||
string stream = null;
|
||||
if (root.TryGetProperty("video", out var videoProp) && videoProp.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
var video = videoProp.EnumerateArray().FirstOrDefault();
|
||||
if (video.ValueKind != JsonValueKind.Undefined)
|
||||
{
|
||||
if (video.TryGetProperty("mediaHlsNoAdv", out var hlsNoAdv))
|
||||
stream = hlsNoAdv.GetString();
|
||||
if (string.IsNullOrEmpty(stream) && video.TryGetProperty("mediaHls", out var hls))
|
||||
stream = hls.GetString();
|
||||
if (string.IsNullOrEmpty(stream) && video.TryGetProperty("media", out var mediaProp) && mediaProp.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
var media = mediaProp.EnumerateArray().FirstOrDefault();
|
||||
if (media.TryGetProperty("url", out var mediaUrl))
|
||||
stream = mediaUrl.GetString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(stream))
|
||||
return null;
|
||||
|
||||
return new StreamResult
|
||||
{
|
||||
Stream = stream,
|
||||
Poster = root.TryGetProperty("poster", out var posterProp) ? posterProp.GetString() : null,
|
||||
Name = root.TryGetProperty("name", out var nameProp) ? nameProp.GetString() : null
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_onLog?.Invoke($"StarLight stream error: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private string NormalizeImage(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
return string.Empty;
|
||||
|
||||
if (path.StartsWith("http", StringComparison.OrdinalIgnoreCase))
|
||||
return path;
|
||||
|
||||
return $"{_init.host}{path}";
|
||||
}
|
||||
|
||||
public static TimeSpan cacheTime(int multiaccess, int home = 5, int mikrotik = 2, OnlinesSettings init = null, int rhub = -1)
|
||||
{
|
||||
if (init != null && init.rhub && rhub != -1)
|
||||
return TimeSpan.FromMinutes(rhub);
|
||||
|
||||
int ctime = AppInit.conf.mikrotik ? mikrotik : AppInit.conf.multiaccess ? init != null && init.cache_time > 0 ? init.cache_time : multiaccess : home;
|
||||
if (ctime > multiaccess)
|
||||
ctime = multiaccess;
|
||||
|
||||
return TimeSpan.FromMinutes(ctime);
|
||||
}
|
||||
}
|
||||
}
|
||||
6
StarLight/manifest.json
Normal file
6
StarLight/manifest.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"enable": true,
|
||||
"version": 2,
|
||||
"initspace": "StarLight.ModInit",
|
||||
"online": "StarLight.OnlineApi"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user