aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/YoutubeUtils.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2025-05-19 03:06:41 +0300
committerRblSb <msrblsb@gmail.com>2025-05-24 13:59:03 +0300
commit623d85f88bb42834b335801ad5d703f6945d38d2 (patch)
tree857983c5c90f429e4764e4880f95d8f12a0f4595 /src/utils/YoutubeUtils.hx
parent4b48de4f824ce48f1466014a9e9aa24023212181 (diff)
Migrate to yt-dlp
- yt-dlp should be more stable and allows more cool stuff in future - easier to export cookies.txt with yt-dlp utility (cookies.json support removed) - better quality fallback if not enough space - keep progress reports after reconnections
Diffstat (limited to 'src/utils/YoutubeUtils.hx')
-rw-r--r--src/utils/YoutubeUtils.hx60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/utils/YoutubeUtils.hx b/src/utils/YoutubeUtils.hx
index b7cd739..95d3031 100644
--- a/src/utils/YoutubeUtils.hx
+++ b/src/utils/YoutubeUtils.hx
@@ -1,65 +1,5 @@
package utils;
-typedef YoutubeVideoDetails = {
- viewCount:String,
- videoId:String,
- title:String,
- thumbnail:{
- thumbnails:Array<{
- url:String,
- width:Int,
- height:Int,
- }>
- },
- shortDescription:String,
- lengthSeconds:String,
- keywords:Array<String>,
- isUnpluggedCorpus:Bool,
- isPrivate:Bool,
- isOwnerViewing:Bool,
- isLiveContent:Bool,
- isCrawlable:Bool,
- channelId:String,
- author:String,
- allowRatings:Bool
-}
-
-typedef YoutubeVideoFormat = {
- ?signatureCipher:String,
- itag:Int,
- width:Int,
- height:Int,
- url:String,
- qualityLabel:String, // 240p, 1080p, etc
- quality:String,
- projectionType:String,
- mimeType:String,
- lastModified:String,
- bitrate:Int,
- approxDurationMs:String,
- ?initRange:{start:Int, end:Int},
- ?indexRange:{start:Int, end:Int},
- ?audioQuality:String, // AUDIO_QUALITY_LOW
- ?audioSampleRate:Int,
- ?audioChannels:Int,
-
- ?container:String,
- ?videoCodec:String,
- ?audioCodec:String,
- ?hasVideo:Bool,
- ?hasAudio:Bool,
- ?contentLength:String,
-}
-
-typedef YouTubeVideoInfo = {
- public var videoDetails:YoutubeVideoDetails;
- public var ?formats:Array<YoutubeVideoFormat>;
- public var ?adaptiveFormats:Array<YoutubeVideoFormat>;
- public var ?liveData:{
- manifestUrl:String,
- };
-}
-
class YoutubeUtils {
static final matchId = ~/youtube\.com.*v=([A-z0-9_-]+)/;
static final matchShort = ~/youtu\.be\/([A-z0-9_-]+)/;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage