Compare commits
5 Commits
v0.17.0
...
9ab4f6cf57
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ab4f6cf57 | |||
| d40a4764eb | |||
| 0119830ea7 | |||
| 7ffa927d55 | |||
| 0b80779975 |
@@ -24,6 +24,7 @@
|
||||
"php-tmdb/api": "^4.1",
|
||||
"predis/predis": "^2.4",
|
||||
"runtime/frankenphp-symfony": "^0.2.0",
|
||||
"stof/doctrine-extensions-bundle": "^1.14",
|
||||
"symfony/asset": "7.3.*",
|
||||
"symfony/console": "7.3.*",
|
||||
"symfony/doctrine-messenger": "7.3.*",
|
||||
|
||||
263
composer.lock
generated
263
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "c519733202d45f8fb3a4f5b8e7dfb95b",
|
||||
"content-hash": "55c76ae7fe5ad6e5c7edbb0150987fc7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "1tomany/rich-bundle",
|
||||
@@ -117,6 +117,56 @@
|
||||
},
|
||||
"time": "2025-03-05T09:16:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "behat/transliterator",
|
||||
"version": "v1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Behat/Transliterator.git",
|
||||
"reference": "baac5873bac3749887d28ab68e2f74db3a4408af"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Behat/Transliterator/zipball/baac5873bac3749887d28ab68e2f74db3a4408af",
|
||||
"reference": "baac5873bac3749887d28ab68e2f74db3a4408af",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"chuyskywalker/rolling-curl": "^3.1",
|
||||
"php-yaoi/php-yaoi": "^1.0",
|
||||
"phpunit/phpunit": "^8.5.25 || ^9.5.19"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Behat\\Transliterator\\": "src/Behat/Transliterator"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Artistic-1.0"
|
||||
],
|
||||
"description": "String transliterator",
|
||||
"keywords": [
|
||||
"i18n",
|
||||
"slug",
|
||||
"transliterator"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Behat/Transliterator/issues",
|
||||
"source": "https://github.com/Behat/Transliterator/tree/v1.5.0"
|
||||
},
|
||||
"abandoned": true,
|
||||
"time": "2022-03-30T09:27:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "carbonphp/carbon-doctrine-types",
|
||||
"version": "2.1.0",
|
||||
@@ -1768,6 +1818,136 @@
|
||||
],
|
||||
"time": "2024-10-09T13:47:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "gedmo/doctrine-extensions",
|
||||
"version": "v3.20.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine-extensions/DoctrineExtensions.git",
|
||||
"reference": "ea1d37586b8e4bae2a815feb38b177894b12c44c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/ea1d37586b8e4bae2a815feb38b177894b12c44c",
|
||||
"reference": "ea1d37586b8e4bae2a815feb38b177894b12c44c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"behat/transliterator": "^1.2",
|
||||
"doctrine/collections": "^1.2 || ^2.0",
|
||||
"doctrine/deprecations": "^1.0",
|
||||
"doctrine/event-manager": "^1.2 || ^2.0",
|
||||
"doctrine/persistence": "^2.2 || ^3.0 || ^4.0",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"psr/cache": "^1 || ^2 || ^3",
|
||||
"psr/clock": "^1",
|
||||
"symfony/cache": "^5.4 || ^6.0 || ^7.0"
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/annotations": "<1.13 || >=3.0",
|
||||
"doctrine/common": "<2.13 || >=4.0",
|
||||
"doctrine/dbal": "<3.7 || >=5.0",
|
||||
"doctrine/mongodb-odm": "<2.3 || >=3.0",
|
||||
"doctrine/orm": "<2.20 || >=3.0 <3.3 || >=4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/annotations": "^1.13 || ^2.0",
|
||||
"doctrine/cache": "^1.11 || ^2.0",
|
||||
"doctrine/common": "^2.13 || ^3.0",
|
||||
"doctrine/dbal": "^3.7 || ^4.0",
|
||||
"doctrine/doctrine-bundle": "^2.3",
|
||||
"doctrine/mongodb-odm": "^2.3",
|
||||
"doctrine/orm": "^2.20 || ^3.3",
|
||||
"friendsofphp/php-cs-fixer": "^3.70",
|
||||
"nesbot/carbon": "^2.71 || ^3.0",
|
||||
"phpstan/phpstan": "^2.1.1",
|
||||
"phpstan/phpstan-doctrine": "^2.0.1",
|
||||
"phpstan/phpstan-phpunit": "^2.0.3",
|
||||
"phpunit/phpunit": "^9.6",
|
||||
"rector/rector": "^2.0.6",
|
||||
"symfony/console": "^5.4 || ^6.0 || ^7.0",
|
||||
"symfony/doctrine-bridge": "^5.4 || ^6.0 || ^7.0",
|
||||
"symfony/phpunit-bridge": "^6.0 || ^7.0",
|
||||
"symfony/uid": "^5.4 || ^6.0 || ^7.0",
|
||||
"symfony/yaml": "^5.4 || ^6.0 || ^7.0"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/mongodb-odm": "to use the extensions with the MongoDB ODM",
|
||||
"doctrine/orm": "to use the extensions with the ORM"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Gedmo\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Gediminas Morkevicius",
|
||||
"email": "gediminas.morkevicius@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Gustavo Falco",
|
||||
"email": "comfortablynumb84@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "David Buchmann",
|
||||
"email": "david@liip.ch"
|
||||
}
|
||||
],
|
||||
"description": "Doctrine behavioral extensions",
|
||||
"homepage": "http://gediminasm.org/",
|
||||
"keywords": [
|
||||
"Blameable",
|
||||
"behaviors",
|
||||
"doctrine",
|
||||
"extensions",
|
||||
"gedmo",
|
||||
"loggable",
|
||||
"nestedset",
|
||||
"odm",
|
||||
"orm",
|
||||
"sluggable",
|
||||
"sortable",
|
||||
"timestampable",
|
||||
"translatable",
|
||||
"tree",
|
||||
"uploadable"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/main/doc",
|
||||
"issues": "https://github.com/doctrine-extensions/DoctrineExtensions/issues",
|
||||
"source": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.20.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/l3pp4rd",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/mbabker",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/phansys",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/stof",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-04-04T17:19:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lcobucci/jwt",
|
||||
"version": "5.5.0",
|
||||
@@ -3401,6 +3581,87 @@
|
||||
],
|
||||
"time": "2023-12-12T12:06:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "stof/doctrine-extensions-bundle",
|
||||
"version": "v1.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/stof/StofDoctrineExtensionsBundle.git",
|
||||
"reference": "bdf3eb10baeb497ac5985b8f78a6cf55862c2662"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/stof/StofDoctrineExtensionsBundle/zipball/bdf3eb10baeb497ac5985b8f78a6cf55862c2662",
|
||||
"reference": "bdf3eb10baeb497ac5985b8f78a6cf55862c2662",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"gedmo/doctrine-extensions": "^3.20.0",
|
||||
"php": "^8.1",
|
||||
"symfony/cache": "^6.4 || ^7.0",
|
||||
"symfony/config": "^6.4 || ^7.0",
|
||||
"symfony/dependency-injection": "^6.4 || ^7.0",
|
||||
"symfony/event-dispatcher": "^6.4 || ^7.0",
|
||||
"symfony/http-kernel": "^6.4 || ^7.0",
|
||||
"symfony/translation-contracts": "^2.5 || ^3.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^2.1",
|
||||
"phpstan/phpstan-deprecation-rules": "^2.0",
|
||||
"phpstan/phpstan-phpunit": "^2.0",
|
||||
"phpstan/phpstan-strict-rules": "^2.0",
|
||||
"phpstan/phpstan-symfony": "^2.0",
|
||||
"symfony/mime": "^6.4 || ^7.0",
|
||||
"symfony/phpunit-bridge": "^v6.4.1 || ^7.0.1",
|
||||
"symfony/security-core": "^6.4 || ^7.0"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/doctrine-bundle": "to use the ORM extensions",
|
||||
"doctrine/mongodb-odm-bundle": "to use the MongoDB ODM extensions",
|
||||
"symfony/mime": "To use the Mime component integration for Uploadable"
|
||||
},
|
||||
"type": "symfony-bundle",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Stof\\DoctrineExtensionsBundle\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Christophe Coevoet",
|
||||
"email": "stof@notk.org"
|
||||
}
|
||||
],
|
||||
"description": "Integration of the gedmo/doctrine-extensions with Symfony",
|
||||
"homepage": "https://github.com/stof/StofDoctrineExtensionsBundle",
|
||||
"keywords": [
|
||||
"behaviors",
|
||||
"doctrine2",
|
||||
"extensions",
|
||||
"gedmo",
|
||||
"loggable",
|
||||
"nestedset",
|
||||
"sluggable",
|
||||
"sortable",
|
||||
"timestampable",
|
||||
"translatable",
|
||||
"tree"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/stof/StofDoctrineExtensionsBundle/issues",
|
||||
"source": "https://github.com/stof/StofDoctrineExtensionsBundle/tree/v1.14.0"
|
||||
},
|
||||
"time": "2025-05-01T08:00:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/asset",
|
||||
"version": "v7.3.0",
|
||||
|
||||
@@ -18,4 +18,5 @@ return [
|
||||
Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
|
||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
|
||||
];
|
||||
|
||||
7
config/packages/stof_doctrine_extensions.yaml
Normal file
7
config/packages/stof_doctrine_extensions.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html
|
||||
# See the official DoctrineExtensions documentation for more details: https://github.com/doctrine-extensions/DoctrineExtensions/tree/main/doc
|
||||
stof_doctrine_extensions:
|
||||
default_locale: en_US
|
||||
orm:
|
||||
default:
|
||||
timestampable: true
|
||||
@@ -9,8 +9,4 @@ sleep $SLEEP_TIME
|
||||
php /app/bin/console doctrine:migrations:migrate --no-interaction
|
||||
php /app/bin/console db:seed
|
||||
|
||||
# Start the media cache warming services
|
||||
systemctl --user enable messenger-worker.service
|
||||
systemctl --user start messenger-worker.service
|
||||
|
||||
frankenphp php-server /etc/frankenphp/Caddyfile
|
||||
exec docker-php-entrypoint "$@"
|
||||
|
||||
35
migrations/Version20250610195448.php
Normal file
35
migrations/Version20250610195448.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250610195448 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql(<<<'SQL'
|
||||
ALTER TABLE download ADD created_at DATETIME NULL, ADD updated_at DATETIME NULL
|
||||
SQL);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql(<<<'SQL'
|
||||
ALTER TABLE download DROP created_at, DROP updated_at
|
||||
SQL);
|
||||
}
|
||||
}
|
||||
@@ -12,15 +12,12 @@ use Symfony\Component\Routing\Attribute\Route;
|
||||
final class IndexController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly DownloadRepository $downloadRepository,
|
||||
private readonly Tmdb $tmdb,
|
||||
) {}
|
||||
|
||||
#[Route('/', name: 'app_index')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$request->getSession()->set('mercure_alert_topic', 'alerts_' . uniqid());
|
||||
|
||||
return $this->render('index/index.html.twig', [
|
||||
'active_downloads' => $this->getUser()->getActiveDownloads(),
|
||||
'recent_downloads' => $this->getUser()->getDownloads(),
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
namespace App\Download\Framework\Entity;
|
||||
|
||||
use App\Download\Framework\Repository\DownloadRepository;
|
||||
use App\Torrentio\Result\ResultFactory;
|
||||
use App\Torrentio\Result\TorrentioResult;
|
||||
use App\User\Framework\Entity\User;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Timestampable\Traits\TimestampableEntity;
|
||||
use Nihilarr\PTN;
|
||||
use Symfony\UX\Turbo\Attribute\Broadcast;
|
||||
|
||||
@@ -14,6 +13,8 @@ use Symfony\UX\Turbo\Attribute\Broadcast;
|
||||
#[Broadcast(template: 'broadcast/Download.stream.html.twig')]
|
||||
class Download
|
||||
{
|
||||
use TimestampableEntity;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
|
||||
21
src/User/Framework/EventListener/LoginSuccessListener.php
Normal file
21
src/User/Framework/EventListener/LoginSuccessListener.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\User\Framework\EventListener;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent;
|
||||
|
||||
final class LoginSuccessListener
|
||||
{
|
||||
public function __construct(
|
||||
private readonly RequestStack $requestStack,
|
||||
) {}
|
||||
|
||||
#[AsEventListener(event: 'security.authentication.success')]
|
||||
public function setMercureTopics(AuthenticationSuccessEvent $event): void
|
||||
{
|
||||
// Set the unique Mercure topic name for the User's alerts
|
||||
$this->requestStack->getSession()->set('mercure_alert_topic', 'alerts_' . uniqid());
|
||||
}
|
||||
}
|
||||
12
symfony.lock
12
symfony.lock
@@ -74,6 +74,18 @@
|
||||
"phpstan.dist.neon"
|
||||
]
|
||||
},
|
||||
"stof/doctrine-extensions-bundle": {
|
||||
"version": "1.14",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "1.2",
|
||||
"ref": "e805aba9eff5372e2d149a9ff56566769e22819d"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/stof_doctrine_extensions.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/asset-mapper": {
|
||||
"version": "7.2",
|
||||
"recipe": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<tr{{ attributes }} id="ad_download_{{ download.id }}">
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-stone-800 truncate">
|
||||
<a href="{{ path('app_search_result', {imdbId: download.imdbId, mediaType: download.mediaType}) }}"
|
||||
class="hover:underline mr-1"
|
||||
class="mr-1 hover:underline rounded-md"
|
||||
>
|
||||
{{ download.title }}
|
||||
</a>
|
||||
@@ -34,16 +34,16 @@
|
||||
</td>
|
||||
<td id="action_buttons_{{ download.id }}" class="px-6 py-4 flex flex-row items-center">
|
||||
{% if download.status == 'In Progress' and download.progress < 100 %}
|
||||
<button id="pause_{{ download.id }}" class="text-orange-500 mr-1 self-start" {{ stimulus_action('download_list', 'pauseDownload', 'click', {id: download.id}) }}>
|
||||
<button id="pause_{{ download.id }}" class="text-orange-500 hover:text-orange-600 mr-1 self-start" {{ stimulus_action('download_list', 'pauseDownload', 'click', {id: download.id}) }}>
|
||||
<twig:ux:icon name="icon-park-twotone:pause-one" width="16.75px" height="16.75px" class="rounded-full" />
|
||||
</button>
|
||||
{% elseif download.status == 'Paused' %}
|
||||
<button id="resume_{{ download.id }}" class="text-orange-500 mr-1 self-start" {{ stimulus_action('download_list', 'resumeDownload', 'click', {id: download.id}) }}>
|
||||
<button id="resume_{{ download.id }}" class="text-orange-500 hover:text-orange-600 mr-1 self-start" {{ stimulus_action('download_list', 'resumeDownload', 'click', {id: download.id}) }}>
|
||||
<twig:ux:icon name="icon-park-twotone:play" width="16.75px" height="16.75px" class="rounded-full" />
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
{% set delete_button = component('ux:icon', {name: 'ic:twotone-cancel', height: '17.75px', width: '17.75px', class: 'rounded-full align-middle text-red-600' }) %}
|
||||
{% set delete_button = component('ux:icon', {name: 'ic:twotone-cancel', height: '17.75px', width: '17.75px', class: 'rounded-full align-middle text-red-600 hover:text-red-700' }) %}
|
||||
<twig:Modal heading="But wait!" button_text="{{ delete_button }}" submit_action="{{ stimulus_action('download_list', 'deleteDownload', 'click', {id: download.id}) }}" show_cancel show_submit>
|
||||
Are you sure you want to delete <span class="font-bold">{{ download.filename }}</span>?
|
||||
</twig:Modal>
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
shadow-sm focus:shadow"
|
||||
placeholder="{{ placeholder ?? 'TV Show, Movie...' }}"
|
||||
/>
|
||||
|
||||
<twig:ux:icon name="codex:loader" height="20" width="20" data-loading-icon-target="icon" data-loading="removeClass(hidden)" class="absolute top-2 right-16 text-orange-500 hidden text-end" />
|
||||
|
||||
<button
|
||||
class="absolute top-1 right-1 flex items-center
|
||||
bg-green-600 py-1 px-2 text-center
|
||||
|
||||
@@ -73,8 +73,7 @@
|
||||
{# </label>#}
|
||||
{% endif %}
|
||||
<span {{ stimulus_controller('loading_icon', {total: (results.media.mediaType == "tvshows") ? results.media.episodes[1]|length : 1, count: 0}) }}
|
||||
class="loading-icon"
|
||||
>
|
||||
class="loading-icon">
|
||||
<twig:ux:icon name="codex:loader" height="20" width="20" data-loading-icon-target="icon" class="text-end" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user