mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-02-08 17:45:45 +00:00
Fix downloader bug, use plink and add icon to plugin template
This commit is contained in:
@@ -24,8 +24,10 @@
|
|||||||
},
|
},
|
||||||
"template_project_dependencies": [
|
"template_project_dependencies": [
|
||||||
],
|
],
|
||||||
"type": "template"
|
"type": "template",
|
||||||
|
"template_icon": "icon.png"
|
||||||
},
|
},
|
||||||
"name": "Tesses.YouTubeDownloader.PluginTemplate",
|
"name": "Tesses.YouTubeDownloader.PluginTemplate",
|
||||||
"version": "1.0.0.0-prod"
|
"version": "1.0.0.0-prod",
|
||||||
|
"icon": "icon.png"
|
||||||
}
|
}
|
||||||
BIN
Tesses.YouTubeDownloader.PluginTemplate/res/icon.png
Normal file
BIN
Tesses.YouTubeDownloader.PluginTemplate/res/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -2,16 +2,6 @@ func Components.PersonalListDescription(tytd,name,editing)
|
|||||||
{
|
{
|
||||||
var description = tytd.GetPersonalListDescription(name);
|
var description = tytd.GetPersonalListDescription(name);
|
||||||
var first=true;
|
var first=true;
|
||||||
var description_with_br = "";
|
|
||||||
each(var txt : description.Split("\n"))
|
|
||||||
{
|
|
||||||
if(!first)
|
|
||||||
{
|
|
||||||
description_with_br += <br>;
|
|
||||||
}
|
|
||||||
description_with_br += Net.Http.HtmlEncode(txt);
|
|
||||||
first=false;
|
|
||||||
}
|
|
||||||
<return>
|
<return>
|
||||||
<if(editing)>
|
<if(editing)>
|
||||||
<true>
|
<true>
|
||||||
@@ -32,7 +22,7 @@ func Components.PersonalListDescription(tytd,name,editing)
|
|||||||
<false>
|
<false>
|
||||||
<div class="row" id="description">
|
<div class="row" id="description">
|
||||||
<div class="max">
|
<div class="max">
|
||||||
<p><raw(description_with_br)></p>
|
<plink(description)>
|
||||||
</div>
|
</div>
|
||||||
<div class="min">
|
<div class="min">
|
||||||
<button hx-get={$"./edit-personal-description?name={Net.Http.UrlEncode(name)}"} hx-target="#description" hx-swap="outerHTML"><i>edit</i></button>
|
<button hx-get={$"./edit-personal-description?name={Net.Http.UrlEncode(name)}"} hx-target="#description" hx-swap="outerHTML"><i>edit</i></button>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func Pages.VideoInfo(tytd,ctx)
|
|||||||
<div class="min">
|
<div class="min">
|
||||||
<h4>{vi.title}</h4>
|
<h4>{vi.title}</h4>
|
||||||
<a class="underline" href={$"./channel?id={Net.Http.UrlEncode(vi.channelId)}"}>{vi.author}</a>
|
<a class="underline" href={$"./channel?id={Net.Http.UrlEncode(vi.channelId)}"}>{vi.author}</a>
|
||||||
<p>{vi.shortDescription}</p>
|
<plink(vi.shortDescription)>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>;
|
</div>;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class TYTD.AOVideoDownload : IVideoDownload {
|
|||||||
var req = this.tytd.ManifestRequest(id).playerResponse;
|
var req = this.tytd.ManifestRequest(id).playerResponse;
|
||||||
this.info.Title = req.videoDetails.title;
|
this.info.Title = req.videoDetails.title;
|
||||||
tytd.LOG($"Downloading: {this.info.Title} with id: {id} Highest Audio");
|
tytd.LOG($"Downloading: {this.info.Title} with id: {id} Highest Audio");
|
||||||
|
Console.WriteLine($"Downloading: {this.info.Title} with id: {id} Highest Audio");
|
||||||
this.info.Channel = req.videoDetails.author;
|
this.info.Channel = req.videoDetails.author;
|
||||||
this.info.ChannelId = req.videoDetails.channelId;
|
this.info.ChannelId = req.videoDetails.channelId;
|
||||||
|
|
||||||
@@ -66,6 +67,7 @@ class TYTD.AOVideoDownload : IVideoDownload {
|
|||||||
}
|
}
|
||||||
public Start()
|
public Start()
|
||||||
{
|
{
|
||||||
|
if(this.done) return;
|
||||||
for(var i = 0; i < 5; i++)
|
for(var i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
var req = {
|
var req = {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class TYTD.NoConvertVideoDownload : IVideoDownload {
|
|||||||
|
|
||||||
private done=false;
|
private done=false;
|
||||||
|
|
||||||
|
|
||||||
public NoConvertVideoDownload(id)
|
public NoConvertVideoDownload(id)
|
||||||
{
|
{
|
||||||
this.info = {
|
this.info = {
|
||||||
@@ -36,6 +37,7 @@ class TYTD.NoConvertVideoDownload : IVideoDownload {
|
|||||||
|
|
||||||
this.info.Title = req.videoDetails.title;
|
this.info.Title = req.videoDetails.title;
|
||||||
tytd.LOG($"Downloading: {this.info.Title} with id: {id} Highest Video/Audio");
|
tytd.LOG($"Downloading: {this.info.Title} with id: {id} Highest Video/Audio");
|
||||||
|
Console.WriteLine($"Downloading: {this.info.Title} with id: {id} Highest Video/Audio");
|
||||||
this.info.Channel = req.videoDetails.author;
|
this.info.Channel = req.videoDetails.author;
|
||||||
this.info.ChannelId = req.videoDetails.channelId;
|
this.info.ChannelId = req.videoDetails.channelId;
|
||||||
|
|
||||||
@@ -220,5 +222,7 @@ class TYTD.NoConvertVideoDownload : IVideoDownload {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.progress(1.0);
|
this.progress(1.0);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,6 +28,7 @@ class TYTD.SDVideoDownload : IVideoDownload {
|
|||||||
var req = this.tytd.ManifestRequest(id).playerResponse;
|
var req = this.tytd.ManifestRequest(id).playerResponse;
|
||||||
this.info.Title = req.videoDetails.title;
|
this.info.Title = req.videoDetails.title;
|
||||||
tytd.LOG($"Downloading: {this.info.Title} with id: {id} LowVideo");
|
tytd.LOG($"Downloading: {this.info.Title} with id: {id} LowVideo");
|
||||||
|
Console.WriteLine($"Downloading: {this.info.Title} with id: {id} LowVideo");
|
||||||
this.info.Channel = req.videoDetails.author;
|
this.info.Channel = req.videoDetails.author;
|
||||||
this.info.ChannelId = req.videoDetails.channelId;
|
this.info.ChannelId = req.videoDetails.channelId;
|
||||||
|
|
||||||
@@ -48,6 +49,7 @@ class TYTD.SDVideoDownload : IVideoDownload {
|
|||||||
}
|
}
|
||||||
public Start()
|
public Start()
|
||||||
{
|
{
|
||||||
|
if(this.done) return;
|
||||||
for(var i = 0; i < 5; i++)
|
for(var i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
var req = {
|
var req = {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ class TYTD.TranscodeAudio : IVideoDownload {
|
|||||||
private ncv;
|
private ncv;
|
||||||
private tytd;
|
private tytd;
|
||||||
private ext;
|
private ext;
|
||||||
|
private done;
|
||||||
|
|
||||||
public TranscodeAudio(id,ext)
|
public TranscodeAudio(id,ext)
|
||||||
{
|
{
|
||||||
@@ -30,7 +31,7 @@ class TYTD.TranscodeAudio : IVideoDownload {
|
|||||||
public Start()
|
public Start()
|
||||||
{
|
{
|
||||||
var id = this.id;
|
var id = this.id;
|
||||||
this.ncv.Start();
|
if(!this.ncv.Start()) return;
|
||||||
|
|
||||||
var p = new Process();
|
var p = new Process();
|
||||||
p.FileName = Env.GetRealExecutablePath("ffmpeg").ToString();
|
p.FileName = Env.GetRealExecutablePath("ffmpeg").ToString();
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class TYTD.TranscodeVideo : IVideoDownload {
|
|||||||
public Start()
|
public Start()
|
||||||
{
|
{
|
||||||
var id = this.id;
|
var id = this.id;
|
||||||
this.ncv.Start();
|
this.mcv.Start();
|
||||||
|
|
||||||
var p = new Process();
|
var p = new Process();
|
||||||
p.FileName = Env.GetRealExecutablePath("ffmpeg").ToString();
|
p.FileName = Env.GetRealExecutablePath("ffmpeg").ToString();
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ class TYTD.VOVideoDownload : IVideoDownload {
|
|||||||
this.info.Channel = req.videoDetails.author;
|
this.info.Channel = req.videoDetails.author;
|
||||||
this.info.ChannelId = req.videoDetails.channelId;
|
this.info.ChannelId = req.videoDetails.channelId;
|
||||||
tytd.LOG($"Downloading: {this.info.Title} with id: {id} Highest Video");
|
tytd.LOG($"Downloading: {this.info.Title} with id: {id} Highest Video");
|
||||||
|
Console.WriteLine($"Downloading: {this.info.Title} with id: {id} Highest Video");
|
||||||
|
|
||||||
this.tytd.PutVideoInfo(req.videoDetails);
|
this.tytd.PutVideoInfo(req.videoDetails);
|
||||||
|
|
||||||
var width = 0;
|
var width = 0;
|
||||||
@@ -63,6 +65,7 @@ class TYTD.VOVideoDownload : IVideoDownload {
|
|||||||
}
|
}
|
||||||
public Start()
|
public Start()
|
||||||
{
|
{
|
||||||
|
if(this.done) return;
|
||||||
var req = {
|
var req = {
|
||||||
FollowRedirects = true,
|
FollowRedirects = true,
|
||||||
RequestHeaders = [
|
RequestHeaders = [
|
||||||
|
|||||||
Reference in New Issue
Block a user