mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 09:22:21 +00:00
- Updated all HTTP route paths from "lite/lme.module" to "lite/lme_module" across LME.AnimeON, LME.Bamboo, LME.JackTor, LME.KlonFUN, LME.Makhno, LME.Mikai, LME.NMoonAnime, LME.StarLight, LME.UafilmME, LME.Uaflix, and LME.Unimay controllers - Standardized error messages, log prefixes, cache keys, and other string identifiers to use underscores instead of dots for consistency with naming conventions - Applied changes to ModInit.cs, OnlineApi.cs, and invoke classes to maintain uniformity in module references
40 lines
1.5 KiB
C#
40 lines
1.5 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.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace LME.Unimay
|
|
{
|
|
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>();
|
|
|
|
var init = ModInit.Unimay;
|
|
|
|
bool hasLang = !string.IsNullOrEmpty(original_language);
|
|
bool isanime = hasLang && (original_language == "ja" || original_language == "zh");
|
|
|
|
if (init.enable && !init.rip && (serial == -1 || isanime || !hasLang))
|
|
{
|
|
if (UpdateService.IsDisconnected())
|
|
init.overridehost = null;
|
|
|
|
online.Add(new ModuleOnlineItem(init, "lme_unimay"));
|
|
}
|
|
|
|
return online;
|
|
}
|
|
}
|
|
}
|