Move the PlayerJsDecoder class from Shared.Engine to LME.Common.Playerjs
namespace to align with the common library structure. Update global usings
in GlobalUsings.cs and add references to PlayerJsDecoder.cs in module
manifest files to reflect the new namespace location.
Add PlayerJsDecoder class with comprehensive methods for extracting player
payloads from HTML content, handling atob-encoded strings, and parsing JSON
configurations. The implementation includes regex patterns for various
encoding schemes, loose JSON parsing with trailing comma tolerance, and
helper function resolution. Additionally, configure global usings for
Shared.Services, Shared.Services.Hybrid, and Shared.Models.Base to improve
type accessibility across the shared library.
Move PlayerPayload class into PlayerJsDecoder.cs and rename namespace to
Shared.Engine. Remove linked source file references from anime projects
(AnimeON, Mikai, NMoonAnime) to prevent duplicate compilation and ensure
single source of truth through Shared.dll.
Move PlayerJsDecoder and PlayerPayload from LME.Shared to LME.Common.Playerjs
namespace. Replace ProjectReference with direct Compile includes for source files
in AnimeON, Mikai, and NMoonAnime projects. Update all using directives to
reference the new namespace across Invoke files.
Note: Controller.cs contains a typo (Firts instead of First) that requires
correction in a subsequent commit.
Move year extraction and comparison inside conditional to only apply for
non-serial content (serial != 1). Previously, year tolerance was enforced
for all search results, causing serial content to be incorrectly filtered
when year mismatches occurred. Serial content often spans multiple years,
so year matching is less reliable for identification. This change ensures
serials bypass the year check while movies/single episodes still benefit
from year-based filtering. Bump module version to 2.2.
Move player payload extraction and decoding logic from individual modules
(AnimeON, Mikai, NMoonAnime) into a new LME.Shared library. This reduces
code duplication and centralizes the parsing logic for better maintainability.
The new PlayerJsDecoder class handles various player script formats including
atob-encoded payloads, JSON.parse helpers, and different file payload structures.
All consuming modules now reference the shared project and use the common decoder.
Also fix typo in NMoonAnime Controller (Firts -> First).
Move the continue statement outside the conditional block to ensure
correct loop control flow. The previous nesting could cause unintended
skipping or processing of stream iterations based on condition evaluation,
potentially leading to logic errors in stream handling.
Move the foreach loop inside the null/empty check for ashdiStreams to ensure
proper iteration only when streams are available. This improves code readability
and prevents potential issues with iterating over null or empty collections.
## Що зроблено
Цей PR рефакторить спільний повторюваний код у `LME.*` модулях і виносить його в окрему спільну теку `LME.Shared`, яка підключається через `syntaxPaths` у `manifest.json`.
### Основні зміни
1. Додано спільні файли:
- `LME.Shared/GlobalUsings.cs`
- `LME.Shared/Apn/ApnHelper.cs`
- `LME.Shared/Online/OnlineRegistry.cs`
- `LME.Shared/Update/ModuleUpdateService.cs`
2. Оновлено всі `LME.* /manifest.json`:
- додано `syntaxPaths` для підключення спільних `.cs` файлів із `LME.Shared`.
3. Спрощено `ModInit.cs` у всіх `LME.*`:
- прибрано дубльований `RegisterWithSearch(...)` і замінено на `OnlineRegistry.RegisterWithSearch(...)`.
- прибрано дубльований `UpdateService/ConnectResponse` і замінено на wrapper над `ModuleUpdateService`.
4. Видалено дублікати з модулів:
- `LME.*/GlobalUsings.cs`
- `LME.*/ApnHelper.cs` (де були)
5. Виправлено namespace-конфлікт:
- `LME.Shared.Online` -> `LME.Common.Online`
- `LME.Shared.Update` -> `LME.Common.Update`
- оновлено `global using` відповідно.
6. Виправлено збірку `LME.JackTor`:
- додано `using Microsoft.AspNetCore.Mvc;` у `LME.JackTor/ModInit.cs` (для `ActionResult` у `UpdateService.Validate`).
7. Оновлено `README.md`:
- зроблено читабельну структуру.
- додано повноцінні UA + EN секції.
- додано навігацію на початку.
- явно зазначено, що при вибірковому `modules:` у `repository.yaml` потрібно додавати `LME.Shared`.
## Чому це потрібно
- Менше дублювання коду між модулями.
- Простіше супроводжувати й оновлювати спільну логіку.
- Менше ризику розсинхрону поведінки між модулями.
## Важливо для користувачів
При вибірковому встановленні через `repository.yaml` треба включати `LME.Shared`:
```yaml
modules:
- LME.Shared
- LME.AnimeON
- LME.Unimay
```
Інакше модулі з `syntaxPaths` не знайдуть спільні файли під час компіляції.
- 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
- 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
Update all ModInit.cs files to create a defaults object, set enabled=true, and pass it to ModuleInvoke.Init for consistent default behavior across modules. This ensures modules are enabled by default without altering existing configurations.
Integrate a new online streaming source for UafilmME, including API invocation, search, and playback functionality. Adds APN proxy helper for Ashdi streams, module initialization, and related models and controllers to extend the existing online framework.
Refactor season selection logic to use lazy loading instead of full aggregation, improving performance when choosing seasons. Added GetSeasonIndex and GetSeasonEpisodes methods, and SeasonUrls property to PaginationInfo for efficient season URL management.
Introduce a new configuration option `magic_apn` that allows automatic enabling of APN for Ashdi streams when using the inner player. The configuration is an object with an `ashdi` property that specifies the host to use for Ashdi APN.
Changes include:
- Add `TryGetMagicAshdiHost` method to parse `magic_apn` configuration
- Add `NormalizeHost`
BREAKING CHANGE: All module routes changed from /{module} to /lite/{module}
- Implement IModuleLoaded and IModuleOnline interfaces across all modules
- Add HttpHydra support to all Invoke classes for HTTP request handling
- Replace ModuleInvoke.Conf() with ModuleInvoke.Init() in all ModInit classes
- Convert loadKit() from async to synchronous calls in all controllers
- Replace direct AppInit.conf.online.with_search.Add() with reflection-based
RegisterWithSearch() method for decoupled module registration
- Simplify cacheTime() logic by removing mikrotik/multiaccess conditionals
- Add GlobalUsings.cs to all modules for shared namespace imports
- Update OnlineApi to use ModuleOnlineItem instead of value tuples
- Bump all module versions to new major versions
- Replace monolithic extraction with modular methods for better maintainability
- Add support for decoding obfuscated player payloads (atob, XOR encryption)
- Implement robust JSON parsing with loose parsing and trailing comma handling
- Add regex patterns for season/episode number extraction
- Improve handling of nested series structures with multiple seasons
Update ResolveMalId method to accept and process a source parameter, enabling different resolution logic for tmdb and hikka sources. TMDB source now returns null, while HIKKA source uses kinopoiskId when available.
- Add ResolveMalId helper to resolve effective MAL ID from mal_id or kinopoisk_id
- Remove original_title from Search method signature and cache keys
- Simplify BuildSearchUrl to prioritize query parameters (mal_id > imdb_id > title)
Add CollapseNearDuplicates method to filter near-duplicate torrent results based on quality, size, seeders, peers, season, voice, and title. Improve BuildRid to use guid/details as stable identifiers when infohash is unavailable. Add season labels to release display in Controller. Add Guid property to JackettResult model.