mirror of
https://github.com/Alvin-Zilverstand/Twitter-X-Media-Batch-Downloader.git
synced 2026-12-01 02:27:54 +01:00
v4.4
This commit is contained in:
1 parent
8cbf7c979b
commit
4794fac099
80 files changed
+7500
-10133
No files matched your search
Vendored
+70
@@ -0,0 +1,70 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {main} from '../models';
|
||||
import {backend} from '../models';
|
||||
|
||||
export function CheckFolderExists(arg1:string,arg2:string):Promise<boolean>;
|
||||
|
||||
export function CheckGifsFolderExists(arg1:string,arg2:string):Promise<boolean>;
|
||||
|
||||
export function CheckGifsFolderHasMP4(arg1:string,arg2:string):Promise<boolean>;
|
||||
|
||||
export function CleanupExtractorProcesses():Promise<void>;
|
||||
|
||||
export function ClearAllAccountsFromDB():Promise<void>;
|
||||
|
||||
export function ConvertGIFs(arg1:main.ConvertGIFsRequest):Promise<main.ConvertGIFsResponse>;
|
||||
|
||||
export function DeleteAccountFromDB(arg1:number):Promise<void>;
|
||||
|
||||
export function DownloadExifTool():Promise<void>;
|
||||
|
||||
export function DownloadExtractor():Promise<void>;
|
||||
|
||||
export function DownloadFFmpeg():Promise<void>;
|
||||
|
||||
export function DownloadMedia(arg1:main.DownloadMediaRequest):Promise<main.DownloadMediaResponse>;
|
||||
|
||||
export function DownloadMediaWithMetadata(arg1:main.DownloadMediaWithMetadataRequest):Promise<main.DownloadMediaResponse>;
|
||||
|
||||
export function ExportAccountJSON(arg1:number,arg2:string):Promise<string>;
|
||||
|
||||
export function ExportAccountsTXT(arg1:Array<number>,arg2:string):Promise<string>;
|
||||
|
||||
export function ExtractDateRange(arg1:main.DateRangeRequest):Promise<string>;
|
||||
|
||||
export function ExtractTimeline(arg1:main.TimelineRequest):Promise<string>;
|
||||
|
||||
export function GetAccountFromDB(arg1:number):Promise<string>;
|
||||
|
||||
export function GetAllAccountsFromDB():Promise<Array<backend.AccountListItem>>;
|
||||
|
||||
export function GetAllGroups():Promise<Array<Record<string, string>>>;
|
||||
|
||||
export function GetDefaults():Promise<Record<string, string>>;
|
||||
|
||||
export function GetFolderPath(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function GetGifsFolderPath(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function ImportAccountFromJSON():Promise<main.ImportAccountResponse>;
|
||||
|
||||
export function IsExifToolInstalled():Promise<boolean>;
|
||||
|
||||
export function IsExtractorInstalled():Promise<boolean>;
|
||||
|
||||
export function IsFFmpegInstalled():Promise<boolean>;
|
||||
|
||||
export function OpenFolder(arg1:string):Promise<void>;
|
||||
|
||||
export function Quit():Promise<void>;
|
||||
|
||||
export function SaveAccountToDB(arg1:string,arg2:string,arg3:string,arg4:number,arg5:string,arg6:string):Promise<void>;
|
||||
|
||||
export function SaveAccountToDBWithStatus(arg1:string,arg2:string,arg3:string,arg4:number,arg5:string,arg6:string,arg7:string,arg8:boolean):Promise<void>;
|
||||
|
||||
export function SelectFolder(arg1:string):Promise<string>;
|
||||
|
||||
export function StopDownload():Promise<boolean>;
|
||||
|
||||
export function UpdateAccountGroup(arg1:number,arg2:string,arg3:string):Promise<void>;
|
||||
@@ -0,0 +1,135 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function CheckFolderExists(arg1, arg2) {
|
||||
return window['go']['main']['App']['CheckFolderExists'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function CheckGifsFolderExists(arg1, arg2) {
|
||||
return window['go']['main']['App']['CheckGifsFolderExists'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function CheckGifsFolderHasMP4(arg1, arg2) {
|
||||
return window['go']['main']['App']['CheckGifsFolderHasMP4'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function CleanupExtractorProcesses() {
|
||||
return window['go']['main']['App']['CleanupExtractorProcesses']();
|
||||
}
|
||||
|
||||
export function ClearAllAccountsFromDB() {
|
||||
return window['go']['main']['App']['ClearAllAccountsFromDB']();
|
||||
}
|
||||
|
||||
export function ConvertGIFs(arg1) {
|
||||
return window['go']['main']['App']['ConvertGIFs'](arg1);
|
||||
}
|
||||
|
||||
export function DeleteAccountFromDB(arg1) {
|
||||
return window['go']['main']['App']['DeleteAccountFromDB'](arg1);
|
||||
}
|
||||
|
||||
export function DownloadExifTool() {
|
||||
return window['go']['main']['App']['DownloadExifTool']();
|
||||
}
|
||||
|
||||
export function DownloadExtractor() {
|
||||
return window['go']['main']['App']['DownloadExtractor']();
|
||||
}
|
||||
|
||||
export function DownloadFFmpeg() {
|
||||
return window['go']['main']['App']['DownloadFFmpeg']();
|
||||
}
|
||||
|
||||
export function DownloadMedia(arg1) {
|
||||
return window['go']['main']['App']['DownloadMedia'](arg1);
|
||||
}
|
||||
|
||||
export function DownloadMediaWithMetadata(arg1) {
|
||||
return window['go']['main']['App']['DownloadMediaWithMetadata'](arg1);
|
||||
}
|
||||
|
||||
export function ExportAccountJSON(arg1, arg2) {
|
||||
return window['go']['main']['App']['ExportAccountJSON'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function ExportAccountsTXT(arg1, arg2) {
|
||||
return window['go']['main']['App']['ExportAccountsTXT'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function ExtractDateRange(arg1) {
|
||||
return window['go']['main']['App']['ExtractDateRange'](arg1);
|
||||
}
|
||||
|
||||
export function ExtractTimeline(arg1) {
|
||||
return window['go']['main']['App']['ExtractTimeline'](arg1);
|
||||
}
|
||||
|
||||
export function GetAccountFromDB(arg1) {
|
||||
return window['go']['main']['App']['GetAccountFromDB'](arg1);
|
||||
}
|
||||
|
||||
export function GetAllAccountsFromDB() {
|
||||
return window['go']['main']['App']['GetAllAccountsFromDB']();
|
||||
}
|
||||
|
||||
export function GetAllGroups() {
|
||||
return window['go']['main']['App']['GetAllGroups']();
|
||||
}
|
||||
|
||||
export function GetDefaults() {
|
||||
return window['go']['main']['App']['GetDefaults']();
|
||||
}
|
||||
|
||||
export function GetFolderPath(arg1, arg2) {
|
||||
return window['go']['main']['App']['GetFolderPath'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function GetGifsFolderPath(arg1, arg2) {
|
||||
return window['go']['main']['App']['GetGifsFolderPath'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function ImportAccountFromJSON() {
|
||||
return window['go']['main']['App']['ImportAccountFromJSON']();
|
||||
}
|
||||
|
||||
export function IsExifToolInstalled() {
|
||||
return window['go']['main']['App']['IsExifToolInstalled']();
|
||||
}
|
||||
|
||||
export function IsExtractorInstalled() {
|
||||
return window['go']['main']['App']['IsExtractorInstalled']();
|
||||
}
|
||||
|
||||
export function IsFFmpegInstalled() {
|
||||
return window['go']['main']['App']['IsFFmpegInstalled']();
|
||||
}
|
||||
|
||||
export function OpenFolder(arg1) {
|
||||
return window['go']['main']['App']['OpenFolder'](arg1);
|
||||
}
|
||||
|
||||
export function Quit() {
|
||||
return window['go']['main']['App']['Quit']();
|
||||
}
|
||||
|
||||
export function SaveAccountToDB(arg1, arg2, arg3, arg4, arg5, arg6) {
|
||||
return window['go']['main']['App']['SaveAccountToDB'](arg1, arg2, arg3, arg4, arg5, arg6);
|
||||
}
|
||||
|
||||
export function SaveAccountToDBWithStatus(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
||||
return window['go']['main']['App']['SaveAccountToDBWithStatus'](arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
|
||||
}
|
||||
|
||||
export function SelectFolder(arg1) {
|
||||
return window['go']['main']['App']['SelectFolder'](arg1);
|
||||
}
|
||||
|
||||
export function StopDownload() {
|
||||
return window['go']['main']['App']['StopDownload']();
|
||||
}
|
||||
|
||||
export function UpdateAccountGroup(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['UpdateAccountGroup'](arg1, arg2, arg3);
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
export namespace backend {
|
||||
|
||||
export class AccountListItem {
|
||||
id: number;
|
||||
username: string;
|
||||
name: string;
|
||||
profile_image: string;
|
||||
total_media: number;
|
||||
last_fetched: string;
|
||||
group_name: string;
|
||||
group_color: string;
|
||||
media_type: string;
|
||||
cursor: string;
|
||||
completed: boolean;
|
||||
followers_count: number;
|
||||
statuses_count: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AccountListItem(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.username = source["username"];
|
||||
this.name = source["name"];
|
||||
this.profile_image = source["profile_image"];
|
||||
this.total_media = source["total_media"];
|
||||
this.last_fetched = source["last_fetched"];
|
||||
this.group_name = source["group_name"];
|
||||
this.group_color = source["group_color"];
|
||||
this.media_type = source["media_type"];
|
||||
this.cursor = source["cursor"];
|
||||
this.completed = source["completed"];
|
||||
this.followers_count = source["followers_count"];
|
||||
this.statuses_count = source["statuses_count"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace main {
|
||||
|
||||
export class ConvertGIFsRequest {
|
||||
folder_path: string;
|
||||
quality: string;
|
||||
resolution: string;
|
||||
delete_original: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ConvertGIFsRequest(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.folder_path = source["folder_path"];
|
||||
this.quality = source["quality"];
|
||||
this.resolution = source["resolution"];
|
||||
this.delete_original = source["delete_original"];
|
||||
}
|
||||
}
|
||||
export class ConvertGIFsResponse {
|
||||
success: boolean;
|
||||
converted: number;
|
||||
failed: number;
|
||||
message: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ConvertGIFsResponse(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.success = source["success"];
|
||||
this.converted = source["converted"];
|
||||
this.failed = source["failed"];
|
||||
this.message = source["message"];
|
||||
}
|
||||
}
|
||||
export class DateRangeRequest {
|
||||
username: string;
|
||||
auth_token: string;
|
||||
start_date: string;
|
||||
end_date: string;
|
||||
media_filter: string;
|
||||
retweets: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new DateRangeRequest(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.username = source["username"];
|
||||
this.auth_token = source["auth_token"];
|
||||
this.start_date = source["start_date"];
|
||||
this.end_date = source["end_date"];
|
||||
this.media_filter = source["media_filter"];
|
||||
this.retweets = source["retweets"];
|
||||
}
|
||||
}
|
||||
export class DownloadMediaRequest {
|
||||
urls: string[];
|
||||
output_dir: string;
|
||||
username: string;
|
||||
proxy?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new DownloadMediaRequest(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.urls = source["urls"];
|
||||
this.output_dir = source["output_dir"];
|
||||
this.username = source["username"];
|
||||
this.proxy = source["proxy"];
|
||||
}
|
||||
}
|
||||
export class DownloadMediaResponse {
|
||||
success: boolean;
|
||||
downloaded: number;
|
||||
skipped: number;
|
||||
failed: number;
|
||||
message: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new DownloadMediaResponse(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.success = source["success"];
|
||||
this.downloaded = source["downloaded"];
|
||||
this.skipped = source["skipped"];
|
||||
this.failed = source["failed"];
|
||||
this.message = source["message"];
|
||||
}
|
||||
}
|
||||
export class MediaItemRequest {
|
||||
url: string;
|
||||
date: string;
|
||||
tweet_id: number;
|
||||
type: string;
|
||||
content?: string;
|
||||
original_filename?: string;
|
||||
author_username?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new MediaItemRequest(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.url = source["url"];
|
||||
this.date = source["date"];
|
||||
this.tweet_id = source["tweet_id"];
|
||||
this.type = source["type"];
|
||||
this.content = source["content"];
|
||||
this.original_filename = source["original_filename"];
|
||||
this.author_username = source["author_username"];
|
||||
}
|
||||
}
|
||||
export class DownloadMediaWithMetadataRequest {
|
||||
items: MediaItemRequest[];
|
||||
output_dir: string;
|
||||
username: string;
|
||||
proxy?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new DownloadMediaWithMetadataRequest(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.items = this.convertValues(source["items"], MediaItemRequest);
|
||||
this.output_dir = source["output_dir"];
|
||||
this.username = source["username"];
|
||||
this.proxy = source["proxy"];
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
if (!a) {
|
||||
return a;
|
||||
}
|
||||
if (a.slice && a.map) {
|
||||
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
||||
} else if ("object" === typeof a) {
|
||||
if (asMap) {
|
||||
for (const key of Object.keys(a)) {
|
||||
a[key] = new classs(a[key]);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
return new classs(a);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export class ImportAccountResponse {
|
||||
success: boolean;
|
||||
username: string;
|
||||
message: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new ImportAccountResponse(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.success = source["success"];
|
||||
this.username = source["username"];
|
||||
this.message = source["message"];
|
||||
}
|
||||
}
|
||||
|
||||
export class TimelineRequest {
|
||||
username: string;
|
||||
auth_token: string;
|
||||
timeline_type: string;
|
||||
batch_size: number;
|
||||
page: number;
|
||||
media_type: string;
|
||||
retweets: boolean;
|
||||
cursor?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new TimelineRequest(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.username = source["username"];
|
||||
this.auth_token = source["auth_token"];
|
||||
this.timeline_type = source["timeline_type"];
|
||||
this.batch_size = source["batch_size"];
|
||||
this.page = source["page"];
|
||||
this.media_type = source["media_type"];
|
||||
this.retweets = source["retweets"];
|
||||
this.cursor = source["cursor"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user