mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 09:22:21 +00:00
- Updated namespaces across all online modules to include LME prefix (e.g., AnimeON -> LME.AnimeON) - Changed routes from /lite/plugin to /lite/lme.plugin - Prefixed cache keys with lme. (e.g., jacktor: -> lme.jacktor:) - Updated module settings names and init calls to LME.Plugin - Bumped version numbers and updated manifest files with LME-prefixed class names - Replaced OnError calls to use lme.plugin identifiers - Modified log messages to include lme.plugin prefix for consistency
40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.Extensions.Caching.Memory;
|
|
using Shared.Models;
|
|
using Shared.Models.Module;
|
|
using Shared.Models.Module.Interfaces;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace LME.StarLight
|
|
{
|
|
public class OnlineApi : IModuleOnline
|
|
{
|
|
public List<ModuleOnlineItem> Invoke(HttpContext httpContext, RequestModel requestInfo, string host, OnlineEventsModel args)
|
|
{
|
|
long.TryParse(args.id, out long tmdbid);
|
|
return Events(host, tmdbid, args.imdb_id, args.kinopoisk_id, args.title, args.original_title, args.original_language, args.year, args.source, args.serial, args.account_email);
|
|
}
|
|
|
|
private static List<ModuleOnlineItem> 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<ModuleOnlineItem>();
|
|
|
|
if (!string.Equals(original_language, "uk", StringComparison.OrdinalIgnoreCase))
|
|
return online;
|
|
|
|
var init = ModInit.StarLight;
|
|
if (init.enable && !init.rip)
|
|
{
|
|
if (UpdateService.IsDisconnected())
|
|
init.overridehost = null;
|
|
|
|
online.Add(new ModuleOnlineItem(init, "lme.starlight"));
|
|
}
|
|
|
|
return online;
|
|
}
|
|
}
|
|
}
|