mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-04-13 16:31:54 +00:00
refactor(modules): update all modules to ModuleInterface v2
- Replace registerCrons() → registerCommands(CommandRegistry) in all modules - Add empty install()/uninstall() methods to all modules - Simplify module.json: remove 'dependencies' field (metadata only) - Plex: register PlexCronJob + PlexItemCommand via registerCommands() - Tmdb: register TmdbCronJob + TmdbPopularCronJob via registerCommands() - Watch: register WatchCronJob + WatchItemCommand via registerCommands() - Fingerprint, Magscan, Ministra, TheftDetection: empty registerCommands()
This commit is contained in:
@@ -64,14 +64,13 @@ class FingerprintModule implements ModuleInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Крон-задачи модуля
|
||||
* CLI-команды модуля
|
||||
*
|
||||
* Fingerprint не имеет собственных крон-задач.
|
||||
* Fingerprint не имеет CLI-команд.
|
||||
*
|
||||
* @return array
|
||||
* @param CommandRegistry $registry
|
||||
*/
|
||||
public function registerCrons(): array {
|
||||
return [];
|
||||
public function registerCommands(CommandRegistry $registry): void {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,4 +81,16 @@ class FingerprintModule implements ModuleInterface {
|
||||
public function getEventSubscribers(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function install(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function uninstall(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "fingerprint",
|
||||
"description": "Stream fingerprint overlay module",
|
||||
"version": "1.0.0",
|
||||
"description": "Stream fingerprinting for viewer identification",
|
||||
"requires_core": ">=2.0",
|
||||
"dependencies": []
|
||||
"requires_core": ">=2.0"
|
||||
}
|
||||
@@ -62,14 +62,13 @@ class MagscanModule implements ModuleInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Крон-задачи модуля
|
||||
* CLI-команды модуля
|
||||
*
|
||||
* MAGSCAN не имеет собственных крон-задач.
|
||||
* MAGSCAN не имеет CLI-команд.
|
||||
*
|
||||
* @return array
|
||||
* @param CommandRegistry $registry
|
||||
*/
|
||||
public function registerCrons(): array {
|
||||
return [];
|
||||
public function registerCommands(CommandRegistry $registry): void {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,4 +79,16 @@ class MagscanModule implements ModuleInterface {
|
||||
public function getEventSubscribers(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function install(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function uninstall(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "magscan",
|
||||
"description": "MAG device scanning module",
|
||||
"version": "1.0.0",
|
||||
"description": "MAG device scanning whitelist/blacklist management",
|
||||
"requires_core": ">=2.0",
|
||||
"dependencies": []
|
||||
"requires_core": ">=2.0"
|
||||
}
|
||||
@@ -70,14 +70,13 @@ class MinistraModule implements ModuleInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Крон-задачи модуля
|
||||
* CLI-команды модуля
|
||||
*
|
||||
* Ministra не имеет собственных крон-задач.
|
||||
* Ministra не имеет CLI-команд.
|
||||
*
|
||||
* @return array
|
||||
* @param CommandRegistry $registry
|
||||
*/
|
||||
public function registerCrons(): array {
|
||||
return [];
|
||||
public function registerCommands(CommandRegistry $registry): void {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,4 +87,16 @@ class MinistraModule implements ModuleInterface {
|
||||
public function getEventSubscribers(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function install(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function uninstall(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "ministra",
|
||||
"description": "Ministra portal integration module",
|
||||
"version": "1.0.0",
|
||||
"description": "Ministra (Stalker Portal) for MAG STB devices",
|
||||
"requires_core": ">=2.0",
|
||||
"dependencies": []
|
||||
"requires_core": ">=2.0"
|
||||
}
|
||||
@@ -120,18 +120,13 @@ class PlexModule implements ModuleInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Крон-задачи модуля
|
||||
* CLI-команды модуля
|
||||
*
|
||||
* @return array
|
||||
* @param CommandRegistry $registry
|
||||
*/
|
||||
public function registerCrons(): array {
|
||||
return [
|
||||
[
|
||||
'class' => PlexCron::class,
|
||||
'method' => 'run',
|
||||
'interval' => 60,
|
||||
],
|
||||
];
|
||||
public function registerCommands(CommandRegistry $registry): void {
|
||||
$registry->register(new PlexCronJob());
|
||||
$registry->register(new PlexItemCommand());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,4 +137,16 @@ class PlexModule implements ModuleInterface {
|
||||
public function getEventSubscribers(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function install(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function uninstall(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "plex",
|
||||
"description": "Plex integration module",
|
||||
"version": "1.0.0",
|
||||
"description": "Plex Media Server integration and sync",
|
||||
"requires_core": ">=2.0",
|
||||
"dependencies": []
|
||||
"requires_core": ">=2.0"
|
||||
}
|
||||
@@ -63,16 +63,11 @@ class TheftDetectionModule implements ModuleInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Крон-задачи модуля
|
||||
* CLI-команды модуля
|
||||
*
|
||||
* Кеш theft_detection генерируется крон-задачей ядра
|
||||
* (cache_engine.php → generateTheftDetection()), а не модулем.
|
||||
*
|
||||
* @return array
|
||||
* @param CommandRegistry $registry
|
||||
*/
|
||||
public function registerCrons(): array {
|
||||
// Данные генерируются core cache_engine.php — модуль только отображает
|
||||
return [];
|
||||
public function registerCommands(CommandRegistry $registry): void {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,4 +78,16 @@ class TheftDetectionModule implements ModuleInterface {
|
||||
public function getEventSubscribers(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function install(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function uninstall(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "theft-detection",
|
||||
"description": "Stream theft detection module",
|
||||
"version": "1.0.0",
|
||||
"description": "VOD theft detection and usage monitoring",
|
||||
"requires_core": ">=2.0",
|
||||
"dependencies": []
|
||||
"requires_core": ">=2.0"
|
||||
}
|
||||
@@ -69,23 +69,13 @@ class TmdbModule implements ModuleInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Крон-задачи модуля
|
||||
* CLI-команды модуля
|
||||
*
|
||||
* @return array
|
||||
* @param CommandRegistry $registry
|
||||
*/
|
||||
public function registerCrons(): array {
|
||||
return [
|
||||
[
|
||||
'class' => TmdbCron::class,
|
||||
'method' => 'run',
|
||||
'interval' => 3600,
|
||||
],
|
||||
[
|
||||
'class' => TmdbPopularCron::class,
|
||||
'method' => 'run',
|
||||
'interval' => 86400,
|
||||
],
|
||||
];
|
||||
public function registerCommands(CommandRegistry $registry): void {
|
||||
$registry->register(new TmdbCronJob());
|
||||
$registry->register(new TmdbPopularCronJob());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,4 +86,16 @@ class TmdbModule implements ModuleInterface {
|
||||
public function getEventSubscribers(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function install(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function uninstall(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "tmdb",
|
||||
"description": "TMDB metadata integration module",
|
||||
"version": "1.0.0",
|
||||
"description": "TMDB (The Movie Database) integration for metadata fetching",
|
||||
"requires_core": ">=2.0",
|
||||
"dependencies": []
|
||||
"requires_core": ">=2.0"
|
||||
}
|
||||
@@ -124,18 +124,13 @@ class WatchModule implements ModuleInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Крон-задачи модуля
|
||||
* CLI-команды модуля
|
||||
*
|
||||
* @return array
|
||||
* @param CommandRegistry $registry
|
||||
*/
|
||||
public function registerCrons(): array {
|
||||
return [
|
||||
[
|
||||
'class' => WatchCron::class,
|
||||
'method' => 'run',
|
||||
'interval' => 60,
|
||||
],
|
||||
];
|
||||
public function registerCommands(CommandRegistry $registry): void {
|
||||
$registry->register(new WatchCronJob());
|
||||
$registry->register(new WatchItemCommand());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,4 +141,16 @@ class WatchModule implements ModuleInterface {
|
||||
public function getEventSubscribers(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function install(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function uninstall(): void {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "watch",
|
||||
"description": "Watch activity tracking module",
|
||||
"version": "1.0.0",
|
||||
"description": "Watch Folder / Recording (DVR) module",
|
||||
"requires_core": ">=2.0",
|
||||
"dependencies": []
|
||||
"requires_core": ">=2.0"
|
||||
}
|
||||
Reference in New Issue
Block a user