-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5b0faaf
Showing
25 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#Sun Oct 22 16:39:19 MSK 2023 | ||
autoOpenTrigger= | ||
autoCloseTrigger=1 | ||
autoIntervalTriggerTime=240000 | ||
masterDefault=dev | ||
autoAmountMaxInSession=8 | ||
autoIntervalTrigger=1 | ||
autoAmountMax=12 |
4 changes: 4 additions & 0 deletions
4
.dn/bundles/develnext.bundle.httpclient.HttpClientBundle.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#Sun Oct 22 16:39:19 MSK 2023 | ||
version=1.0 | ||
name=HTTP Client | ||
env=all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Sun Oct 22 16:39:19 MSK 2023 | ||
env=dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Sun Oct 22 16:39:19 MSK 2023 | ||
env=all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Fri Oct 20 15:20:53 MSK 2023 | ||
snapType=DOTS | ||
blockedNodes= | ||
zoom=100 | ||
snapSizeY=8 | ||
snapSizeX=8 |
2 changes: 2 additions & 0 deletions
2
.dn/ide/editors/ScriptModuleEditor/src/app/modules/AppModule.php.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Sun Oct 22 16:39:19 MSK 2023 | ||
blockedNodes= |
2 changes: 2 additions & 0 deletions
2
.dn/ide/editors/ScriptModuleEditor/src/app/modules/MainModule.php.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Fri Oct 20 00:10:52 MSK 2023 | ||
blockedNodes= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Sun Oct 22 16:39:19 MSK 2023 | ||
useImports= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Sun Oct 22 16:39:19 MSK 2023 | ||
importType=package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#Sun Oct 22 16:39:19 MSK 2023 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Ignore rules for GIT (github.com, bitbucket.com, etc.) | ||
|
||
/.dn/cache | ||
/.dn/ide.lock | ||
/.dn/tmp | ||
/.dn/index.json | ||
/.dn/backup | ||
|
||
/vendor | ||
/src_generated | ||
/src/JPHP-INF | ||
/src/.debug | ||
/build | ||
/build.xml | ||
/build.gradle | ||
/settings.gradle | ||
|
||
*.log | ||
*.pid | ||
*.tmp | ||
*.sourcemap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# jutsu-dl | ||
JutSu video downloader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<project author="zzedo" authorOS="Windows 11" createdAt="1697744159518" ideName="DevelNext" ideVersion="16.7.0" ideVersionHash="2017103112" name="jutsu-dl" packageName="app" template="ide\project\templates\DefaultGuiProjectTemplate" updatedAt="1697981959570"> | ||
<tree> | ||
<expanded> | ||
<path src=""/> | ||
<path src="/src"/> | ||
<path src="/src/.theme"/> | ||
<path src="/src/app"/> | ||
<path src="/src/app/forms"/> | ||
<path src="/src/app/modules"/> | ||
</expanded> | ||
</tree> | ||
<openedFiles> | ||
<file src="jutsu-dl.dnproject"/> | ||
<file selected="1" src="src/app/modules/AppModule.php"/> | ||
</openedFiles> | ||
<files/> | ||
<behaviours> | ||
<behaviour class="ide\project\behaviours\BundleProjectBehaviour"/> | ||
<behaviour class="ide\project\behaviours\PhpProjectBehaviour"/> | ||
<behaviour class="ide\project\behaviours\JavaPlatformBehaviour"/> | ||
<behaviour class="ide\project\behaviours\GuiFrameworkProjectBehaviour"/> | ||
<behaviour class="ide\project\behaviours\RunBuildProjectBehaviour"/> | ||
<behaviour class="ide\project\behaviours\ShareProjectBehaviour"/> | ||
<behaviour class="ide\project\behaviours\BackupProjectBehaviour"/> | ||
<behaviour class="ide\project\behaviours\GradleProjectBehaviour"/> | ||
</behaviours> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# MAIN CONFIGURATION | ||
|
||
app.name = jutsu-dl | ||
app.uuid = 852ff70c-d3fe-4758-977f-299a2f73436d | ||
app.version = 1 | ||
|
||
# APP | ||
app.namespace = app | ||
app.mainForm = | ||
app.showMainForm = 1 | ||
|
||
app.fx.splash.autoHide = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* JavaFX CSS Style with -fx- prefix */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<behaviours/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#Fri Oct 20 13:49:07 MSK 2023 | ||
form.style=DECORATED | ||
modules= | ||
title=MainForm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<?import javafx.scene.*?><?import javafx.collections.*?><?import javafx.scene.layout.*?><?import javafx.scene.control.*?><?import javafx.scene.text.*?><?import javafx.scene.image.*?><?import javafx.scene.shape.*?><?import javafx.scene.paint.*?><?import javafx.scene.web.*?><?import javafx.geometry.*?><?import java.lang.*?><?import org.develnext.jphp.ext.javafx.classes.data.*?><?import org.develnext.jphp.ext.javafx.support.*?><?import org.develnext.jphp.ext.javafx.support.control.*?><?import org.develnext.jphp.ext.game.support.*?><AnchorPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0" focusTraversable="false" id="" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="480" prefWidth="640" styleClass=""> | ||
<children> | ||
<WebView AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0" focusTraversable="true" id="browser" layoutX="0" layoutY="0" prefHeight="480" prefWidth="640"/> | ||
<Data cursor="DEFAULT" enabled="1" id="data-browser" visible="1"/> | ||
</children> | ||
</AnchorPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
namespace app\forms; | ||
|
||
use std, gui, framework, app; | ||
|
||
|
||
class MainForm extends AbstractForm | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<root/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<behaviours/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"props": [], | ||
"components": { | ||
"downloader": { | ||
"type": "bundle\\http\\HttpDownloader", | ||
"x": 496, | ||
"y": 288, | ||
"props": { | ||
"threadCount": "4" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<?php | ||
namespace app\modules; | ||
|
||
use Throwable; | ||
use httpclient; | ||
use std, gui, framework, app; | ||
|
||
|
||
class AppModule extends AbstractModule | ||
{ | ||
$timer; | ||
|
||
/** | ||
* @event action | ||
*/ | ||
function doAction(ScriptEvent $e = null) | ||
{ | ||
if (isset($GLOBALS['argv'][1]) == false) | ||
{ | ||
self::exitWithError('Link not specified'); | ||
return; | ||
} | ||
if (str::contains($GLOBALS['argv'][1],'episode-') == false | ||
and str::contains($GLOBALS['argv'][1],'film-') == false | ||
or str::contains($GLOBALS['argv'][1],'jut.su/') == false) | ||
{ | ||
self::exitWithError('Invalid link'); | ||
return; | ||
} | ||
|
||
app()->form('MainForm')->browser->engine->url = $GLOBALS['argv'][1]; | ||
|
||
Logger::info('Waiting for the player to load to get the video URL'); | ||
$this->timer['timeout'] = Timer::after('25s',function (){self::exitWithError('Timeout');}); | ||
$this->timer['getUrl'] = Timer::every(200,[$this,'getUrl']); | ||
} | ||
|
||
function getUrl() | ||
{ | ||
uiLater(function () | ||
{ | ||
try | ||
{ | ||
$element = app()->form('MainForm')->browser->engine->document->getElementById('my-player_html5_api'); | ||
$url = app()->form('MainForm')->browser->engine->document->getElementById('my-player_html5_api')->getAttribute('src'); | ||
} | ||
catch (Throwable $ex){return;} | ||
|
||
if ($element != null and $url != '1' and $url != null) | ||
{ | ||
$this->timer['timeout']->cancel(); | ||
$this->timer['getUrl']->cancel(); | ||
|
||
$this->download($url); | ||
} | ||
}); | ||
} | ||
|
||
function download($url) | ||
{ | ||
new Thread(function () use ($url) | ||
{ | ||
if ($GLOBALS['argv'][2] != null and fs::isDir($GLOBALS['argv'][2])) | ||
{ | ||
if (File::of($GLOBALS['argv'][2])->canWrite() == false) | ||
self::exitWithError('No rights to write to this directory'); | ||
|
||
$path = $GLOBALS['argv'][2]; | ||
} | ||
elseif ($GLOBALS['argv'][2] == null) | ||
{ | ||
$path = fs::abs('./'); | ||
Logger::warn('The download path is not specified, working directory is used'); | ||
} | ||
elseif (fs::isDir($GLOBALS['argv'][2]) == false) | ||
self::exitWithError('Destination directory not found'); | ||
|
||
Logger::info('Video URL - '.$url); | ||
Logger::info('Path for downloading - '.$path); | ||
|
||
$videoname = str::sub($url,str::lastPos($url,'/'),str::lastPos($url,'.mp4')).'.mp4'; | ||
|
||
if (fs::isFile($path.'/'.$videoname)) | ||
{ | ||
Logger::warn('File already exists, skipping download'); | ||
Logger::info('OK - '.$path.'/'.$videoname); | ||
|
||
System::halt(0); | ||
} | ||
else | ||
{ | ||
$downloader = new HttpDownloader; | ||
$downloader->client()->userAgent = app()->form('MainForm')->browser->engine->userAgent; | ||
$downloader->useTempFile = true; | ||
$downloader->destDirectory = $path; | ||
$downloader->urls = [$url]; | ||
|
||
$downloader->on('successOne',function () use ($path,$videoname) | ||
{ | ||
Logger::info('Downloaded'); | ||
Logger::info('OK - '.$path.'/'.$videoname); | ||
|
||
System::halt(0); | ||
}); | ||
$downloader->on('errorOne',function () | ||
{ | ||
self::exitWithError('Some error was occurred when downloading video'); | ||
}); | ||
|
||
$downloader->start(); | ||
} | ||
})->start(); | ||
} | ||
|
||
static function exitWithError($message) | ||
{ | ||
Logger::error($message); | ||
System::halt(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<root> | ||
<class name="AppModule"/> | ||
</root> |