Documentation
¶
Index ¶
- func CheckAndMergeWithFFmpeg(videoFilePath string, audioFilePath string, videoTitle string, ...)
- func GetAboutAppTitle() string
- func GetAppNameTitle() string
- func GetAudioBitrate_Size_Type_DropdownLabel() string
- func GetDownloadButtonLabel() string
- func GetDownloadButtonProcessingLabel() string
- func GetDownloadFinishedMessage(downloadingVideoTitle string) string
- func GetFFmpegMergeSuccessText(outputFileName string) string
- func GetFFmpegNotFoundText(videoFilePath string, audioFilePath string) string
- func GetImportantNotesLimitsLabel() string
- func GetImportantNotesLimitsText() string
- func GetInvalidURLMessage(videoURL string) string
- func GetQuitButtonLabel() string
- func GetQuitInfoLabel() string
- func GetQuitInfoText() string
- func GetRepoLabel() string
- func GetRepoLinkText() string
- func GetStartingDownloadMessage(downloadingVideoTitle string) string
- func GetStatusLabel() string
- func GetStepSizeBytes() float64
- func GetTuiAppLayout() *tview.Application
- func GetUsageInfoLabel() string
- func GetUsageInfoText() string
- func GetVideoIDLink_InputFieldLabel() string
- func GetVideoMetadataFromYouTubei(videoURL string) map[string]interface{}
- func GetVideoQuality_FPS_Size_Type_DropdownLabel() string
- func GetYouTubeVideoTitleLabel() string
- type ClientRequestMapStruct
- type ContextRequestMapStruct
- type RequestBodyStruct
- type ThirdPartyRequestMapStruct
- type YouTubeDetailsStruct
- func (youtubeDetails *YouTubeDetailsStruct) DownloadYouTubeAudioFile(downloadProgressMsgChannel chan string, isDownloadFinished *bool, ...)
- func (youtubeDetails *YouTubeDetailsStruct) DownloadYouTubeVideoFile(downloadProgressMsgChannel chan string, isDownloadFinished *bool, ...)
- func (youtubeDetails *YouTubeDetailsStruct) IsValidYouTubeURL(videoValidityMsgChannel chan string, isValidVideo *bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndMergeWithFFmpeg ¶
func CheckAndMergeWithFFmpeg( videoFilePath string, audioFilePath string, videoTitle string, mergeProgressMsgChannel chan string, )
Checks if the FFmpeg is installed in the system. If installed, then it'll run the commands to merge provided video & audio files to create combined single output file. Otherwise, it'll show status message to get FFmpeg & then manually run the required command.
Reference : https://blog.kowalczyk.info/article/wOYk/advanced-command-execution-in-go-with-osexec.html
func GetAppNameTitle ¶
func GetAppNameTitle() string
Returns the string of application's name for title.
func GetAudioBitrate_Size_Type_DropdownLabel ¶
func GetAudioBitrate_Size_Type_DropdownLabel() string
Return label for audio related dropdown.
func GetDownloadButtonLabel ¶
func GetDownloadButtonLabel() string
Return label for Download button.
func GetDownloadButtonProcessingLabel ¶
func GetDownloadButtonProcessingLabel() string
Return label for Download button when download has been started.
func GetDownloadFinishedMessage ¶
Return status message for Download Finished.
func GetFFmpegMergeSuccessText ¶
Return string text for files successfully merged to output using FFmpeg.
func GetFFmpegNotFoundText ¶
Return string text for FFmpeg not found in system.
func GetImportantNotesLimitsLabel ¶
func GetImportantNotesLimitsLabel() string
Return label for important notes/limitations.
func GetImportantNotesLimitsText ¶
func GetImportantNotesLimitsText() string
Return string text for important notes/limitations.
func GetInvalidURLMessage ¶
Return status message for Invalid Video URL.
func GetStartingDownloadMessage ¶
Return status message for Starting download.
func GetStepSizeBytes ¶
func GetStepSizeBytes() float64
Returns the byte value 83886.08 for Range header in GET request i.e. almost equal to 0.08 MB.
func GetTuiAppLayout ¶
func GetTuiAppLayout() *tview.Application
Construct & return the application instance.
func GetVideoIDLink_InputFieldLabel ¶
func GetVideoIDLink_InputFieldLabel() string
Return label for `Video ID/Link` input field.
func GetVideoMetadataFromYouTubei ¶
Function that sends a POST request to YouTube's internal API endpoint, YouTubei, then returns the fetched metadata map to the caller.
func GetVideoQuality_FPS_Size_Type_DropdownLabel ¶
func GetVideoQuality_FPS_Size_Type_DropdownLabel() string
Return label for video related dropdown.
func GetYouTubeVideoTitleLabel ¶
func GetYouTubeVideoTitleLabel() string
Return label for YouTube video title.
Types ¶
type ClientRequestMapStruct ¶
type ClientRequestMapStruct struct {
Hl string `json:"hl"`
Gl string `json:"gl"`
ClientName string `json:"clientName"`
ClientVersion string `json:"clientVersion"`
ClientScreen string `json:"clientScreen"`
AndroidSdkVersion int `json:"androidSdkVersion"`
}
Structure of client in 'ContextRequestMapStruct'.
type ContextRequestMapStruct ¶
type ContextRequestMapStruct struct {
Client ClientRequestMapStruct `json:"client"`
ThirdParty ThirdPartyRequestMapStruct `json:"thirdParty"`
}
Structure of context in 'RequestBodyStruct'.
type RequestBodyStruct ¶
type RequestBodyStruct struct {
Context ContextRequestMapStruct `json:"context"`
// PlaybackContext PlaybackContextStruct `json:"playbackContext"`
VideoId string `json:"videoId"`
RacyCheckOk bool `json:"racyCheckOk"`
ContentCheckOk bool `json:"contentCheckOk"`
}
Structure of request body needed by YouTube's internal APIs.
type ThirdPartyRequestMapStruct ¶
type ThirdPartyRequestMapStruct struct {
EmbedUrl string `json:"embedUrl"`
}
Structure of embedUrl in 'ContextRequestMapStruct'.
type YouTubeDetailsStruct ¶
type YouTubeDetailsStruct struct {
VideoUrlOrID string // Store the YouTube's video URL or ID
SelectedVideoQuality string // Store the user's selected video quality
SelectedAudioQuality string // Store the user's selected audio quality
VideoMetaData map[string]interface{} // Store the metadata of `VideoUrlOrID` fetched from YouTube
VideoQualitiesMap map[string]string // Store map of displayed video qualities to their download URLs
AudioQualitiesMap map[string]string // Store map of displayed audio qualities to their download URLs
DownloadedVideoFilePath string // Store file path where video is downloaded
DownloadedAudioFilePath string // Store file path where audio is downloaded
}
Structure that holds required details about YouTube Shorts/Video.
func (*YouTubeDetailsStruct) DownloadYouTubeAudioFile ¶
func (youtubeDetails *YouTubeDetailsStruct) DownloadYouTubeAudioFile( downloadProgressMsgChannel chan string, isDownloadFinished *bool, application *tview.Application, )
Function for 'YouTubeDetailsStruct' that downloads the audio file from YouTube.
func (*YouTubeDetailsStruct) DownloadYouTubeVideoFile ¶
func (youtubeDetails *YouTubeDetailsStruct) DownloadYouTubeVideoFile( downloadProgressMsgChannel chan string, isDownloadFinished *bool, application *tview.Application, )
Function for 'YouTubeDetailsStruct' that downloads the video file from YouTube.
func (*YouTubeDetailsStruct) IsValidYouTubeURL ¶
func (youtubeDetails *YouTubeDetailsStruct) IsValidYouTubeURL( videoValidityMsgChannel chan string, isValidVideo *bool, )
Function to validate & return a boolean status of whether the passed URL is right.