Documentation
¶
Index ¶
- Variables
- func AddFetchHistoryItem(item FetchHistoryItem, appName string) error
- func AddHistoryItem(item HistoryItem, appName string) error
- func AddToQueue(id, trackName, artistName, albumName, spotifyID string)
- func BuildExpectedFilename(...) string
- func CancelAllQueuedItems()
- func ClearAllDownloads()
- func ClearDownloadQueue()
- func ClearFetchHistory(appName string) error
- func ClearFetchHistoryByType(itemType string, appName string) error
- func ClearHistory(appName string) error
- func CloseHistoryDB()
- func CompleteDownloadItem(id, filePath string, finalSize float64)
- func DeleteFetchHistoryItem(id string, appName string) error
- func DeleteHistoryItem(id string, appName string) error
- func DownloadFFmpeg(progressCallback func(int)) error
- func EmbedCoverArtOnly(filePath string, coverPath string) error
- func EmbedLyricsOnly(filepath string, lyrics string) error
- func EmbedLyricsOnlyMP3(filepath string, lyrics string) error
- func EmbedLyricsOnlyUniversal(filepath string, lyrics string) error
- func EmbedMetadata(filepath string, metadata Metadata, coverPath string) error
- func EmbedMetadataToConvertedFile(filePath string, metadata Metadata, coverPath string) error
- func ExtractCoverArt(filePath string) (string, error)
- func ExtractLyrics(filePath string) (string, error)
- func FailDownloadItem(id, errorMsg string)
- func FilterAlbum(data map[string]interface{}) map[string]interface{}
- func FilterArtist(data map[string]interface{}) map[string]interface{}
- func FilterPlaylist(data map[string]interface{}) map[string]interface{}
- func FilterSearch(data map[string]interface{}) map[string]interface{}
- func FilterTrack(data map[string]interface{}, albumFetchData ...map[string]interface{}) map[string]interface{}
- func GenerateFilename(metadata *AudioMetadata, format string, ext string) string
- func GetAudioDuration(filepath string) (float64, error)
- func GetCurrentItemID() string
- func GetDefaultMusicPath() string
- func GetFFmpegDir() (string, error)
- func GetFFmpegPath() (string, error)
- func GetFFprobePath() (string, error)
- func GetFileSize(filepath string) (int64, error)
- func GetFileSizes(files []string) map[string]int64
- func GetFilteredSpotifyData(ctx context.Context, spotifyURL string, batch bool, delay time.Duration) (interface{}, error)
- func GetFirstArtist(artistString string) string
- func GetOSInfo() (string, error)
- func GetPreviewURL(trackID string) (string, error)
- func GetSpotifyDataWithAPI(ctx context.Context, spotifyURL string, useAPI bool, apiBaseURL string, ...) (interface{}, error)
- func InitHistoryDB(appName string) error
- func IsFFmpegInstalled() (bool, error)
- func IsFFprobeInstalled() (bool, error)
- func NormalizePath(folderPath string) string
- func OpenFolderInExplorer(path string) error
- func ResetSessionIfComplete()
- func SanitizeFilename(name string) string
- func SanitizeFolderPath(folderPath string) string
- func SelectFileDialog(ctx context.Context) (string, error)
- func SelectFolderDialog(ctx context.Context, defaultPath string) (string, error)
- func SelectImageVideoDialog(ctx context.Context) ([]string, error)
- func SelectMultipleFiles(ctx context.Context) ([]string, error)
- func SelectOutputDirectory(ctx context.Context) (string, error)
- func SetDownloadProgress(mbDownloaded float64)
- func SetDownloadSpeed(mbps float64)
- func SetDownloading(downloading bool)
- func SkipDownloadItem(id, filePath string)
- func StartDownloadItem(id string)
- func UpdateItemProgress(id string, progress, speed float64)
- func UploadBytesToSendNow(filename string, data []byte) (string, error)
- func UploadToSendNow(filePath string) (string, error)
- func ValidateExecutable(path string) error
- type AlbumInfoMetadata
- type AlbumResponsePayload
- type AlbumTrackMetadata
- type AmazonDownloader
- func (a *AmazonDownloader) DownloadBySpotifyID(spotifyTrackID, outputDir, quality, filenameFormat, playlistName, ... string, ...) (string, error)
- func (a *AmazonDownloader) DownloadByURL(...) (string, error)
- func (a *AmazonDownloader) DownloadFromAfkarXYZ(amazonURL, outputDir, quality string) (string, error)
- func (a *AmazonDownloader) DownloadFromService(amazonURL, outputDir, quality string) (string, error)
- func (a *AmazonDownloader) GetAmazonURLFromSpotify(spotifyTrackID string) (string, error)
- type AmazonStreamResponse
- type AnalysisResult
- type ArtistDiscographyPayload
- type ArtistInfoMetadata
- type ArtistResponsePayload
- type ArtistSimple
- type AudioFileInfo
- type AudioMetadata
- type AvatarDownloadRequest
- type AvatarDownloadResponse
- type ConvertAudioRequest
- type ConvertAudioResult
- type CoverClient
- func (c *CoverClient) DownloadAvatar(req AvatarDownloadRequest) (*AvatarDownloadResponse, error)
- func (c *CoverClient) DownloadCover(req CoverDownloadRequest) (*CoverDownloadResponse, error)
- func (c *CoverClient) DownloadCoverToPath(coverURL, outputPath string, embedMaxQualityCover bool) error
- func (c *CoverClient) DownloadGalleryImage(req GalleryImageDownloadRequest) (*GalleryImageDownloadResponse, error)
- func (c *CoverClient) DownloadHeader(req HeaderDownloadRequest) (*HeaderDownloadResponse, error)
- type CoverDownloadRequest
- type CoverDownloadResponse
- type DeezerDownloader
- type DiscographyAlbumMetadata
- type DownloadItem
- type DownloadQueueInfo
- type DownloadStatus
- type FetchHistoryItem
- type FileInfo
- type GalleryImageDownloadRequest
- type GalleryImageDownloadResponse
- type HeaderDownloadRequest
- type HeaderDownloadResponse
- type HistoryItem
- type LRCLibResponse
- type LyricsClient
- func (c *LyricsClient) ConvertToLRC(lyrics *LyricsResponse, trackName, artistName string) string
- func (c *LyricsClient) DownloadLyrics(req LyricsDownloadRequest) (*LyricsDownloadResponse, error)
- func (c *LyricsClient) FetchLyricsAllSources(spotifyID, trackName, artistName string, duration int) (*LyricsResponse, string, error)
- func (c *LyricsClient) FetchLyricsFromLRCLibSearch(trackName, artistName string) (*LyricsResponse, error)
- func (c *LyricsClient) FetchLyricsFromSpotifyAPI(spotifyID string) (*LyricsResponse, error)
- func (c *LyricsClient) FetchLyricsWithMetadata(trackName, artistName string, duration int) (*LyricsResponse, error)
- type LyricsDownloadRequest
- type LyricsDownloadResponse
- type LyricsLine
- type LyricsResponse
- type MPD
- type Metadata
- type MusicBrainzRecordingResponse
- type PlaylistInfoMetadata
- type PlaylistResponsePayload
- type ProgressInfo
- type ProgressWriter
- type QobuzDownloader
- func (q *QobuzDownloader) DownloadCoverArt(coverURL, filepath string) error
- func (q *QobuzDownloader) DownloadFile(url, filepath string) error
- func (q *QobuzDownloader) DownloadFromStandard(apiBase string, trackID int64, quality string) (string, error)
- func (q *QobuzDownloader) DownloadTrack(spotifyID, outputDir, quality, filenameFormat string, includeTrackNumber bool, ...) (string, error)
- func (q *QobuzDownloader) DownloadTrackWithISRC(deezerISRC, spotifyID, outputDir, quality, filenameFormat string, ...) (string, error)
- func (q *QobuzDownloader) GetDownloadURL(trackID int64, quality string, allowFallback bool) (string, error)
- type QobuzSearchResponse
- type QobuzStreamResponse
- type QobuzTrack
- type RenamePreview
- type RenameResult
- type SearchResponse
- type SearchResult
- type SegmentTemplate
- type SendNowResponse
- type SongLinkClient
- func (s *SongLinkClient) CheckTrackAvailability(spotifyTrackID string) (*TrackAvailability, error)
- func (s *SongLinkClient) GetAllURLsFromSpotify(spotifyTrackID string, region string) (*SongLinkURLs, error)
- func (s *SongLinkClient) GetDeezerURLFromSpotify(spotifyTrackID string) (string, error)
- func (s *SongLinkClient) GetISRC(spotifyID string) (string, error)
- type SongLinkResponse
- type SongLinkURLs
- type SpectrumData
- type SpotifyClient
- type SpotifyLyricsAPIResponse
- type SpotifyLyricsLine
- type SpotifyMetadataClient
- func (c *SpotifyMetadataClient) GetFilteredData(ctx context.Context, spotifyURL string, batch bool, delay time.Duration) (interface{}, error)
- func (c *SpotifyMetadataClient) Search(ctx context.Context, query string, limit int) (*SearchResponse, error)
- func (c *SpotifyMetadataClient) SearchByType(ctx context.Context, query string, searchType string, limit int, offset int) ([]SearchResult, error)
- type TidalAPIResponse
- type TidalAPIResponseV2
- type TidalBTSManifest
- type TidalDownloader
- func (t *TidalDownloader) Download(spotifyTrackID, outputDir, quality, filenameFormat string, ...) (string, error)
- func (t *TidalDownloader) DownloadByURL(tidalURL, outputDir, quality, filenameFormat string, includeTrackNumber bool, ...) (string, error)
- func (t *TidalDownloader) DownloadByURLWithFallback(tidalURL, outputDir, quality, filenameFormat string, includeTrackNumber bool, ...) (string, error)
- func (t *TidalDownloader) DownloadFile(url, filepath string) error
- func (t *TidalDownloader) DownloadFromManifest(manifestB64, outputPath string) error
- func (t *TidalDownloader) GetAvailableAPIs() ([]string, error)
- func (t *TidalDownloader) GetDownloadURL(trackID int64, quality string) (string, error)
- func (t *TidalDownloader) GetTidalURLFromSpotify(spotifyTrackID string) (string, error)
- func (t *TidalDownloader) GetTrackIDFromURL(tidalURL string) (int64, error)
- type TimeSlice
- type TrackAvailability
- type TrackMetadata
- type TrackResponse
- type YoinkifyRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var AppVersion = "Unknown"
View Source
var SpotifyError = errors.New("spotify error")
Functions ¶
func AddFetchHistoryItem ¶
func AddFetchHistoryItem(item FetchHistoryItem, appName string) error
func AddHistoryItem ¶
func AddHistoryItem(item HistoryItem, appName string) error
func AddToQueue ¶
func AddToQueue(id, trackName, artistName, albumName, spotifyID string)
func BuildExpectedFilename ¶
func CancelAllQueuedItems ¶
func CancelAllQueuedItems()
func ClearAllDownloads ¶
func ClearAllDownloads()
func ClearDownloadQueue ¶
func ClearDownloadQueue()
func ClearFetchHistory ¶
func ClearFetchHistoryByType ¶
func ClearHistory ¶
func CloseHistoryDB ¶
func CloseHistoryDB()
func CompleteDownloadItem ¶
func DeleteFetchHistoryItem ¶
func DeleteHistoryItem ¶
func DownloadFFmpeg ¶
func EmbedCoverArtOnly ¶
func EmbedLyricsOnly ¶
func EmbedLyricsOnlyMP3 ¶
func ExtractCoverArt ¶
func ExtractLyrics ¶
func FailDownloadItem ¶
func FailDownloadItem(id, errorMsg string)
func FilterAlbum ¶
func FilterArtist ¶
func FilterPlaylist ¶
func FilterSearch ¶
func FilterTrack ¶
func GenerateFilename ¶
func GenerateFilename(metadata *AudioMetadata, format string, ext string) string
func GetAudioDuration ¶
func GetCurrentItemID ¶
func GetCurrentItemID() string
func GetDefaultMusicPath ¶
func GetDefaultMusicPath() string
func GetFFmpegDir ¶
func GetFFmpegPath ¶
func GetFFprobePath ¶
func GetFileSize ¶
func GetFileSizes ¶
func GetFilteredSpotifyData ¶
func GetFirstArtist ¶
func GetPreviewURL ¶
func GetSpotifyDataWithAPI ¶
func InitHistoryDB ¶
func IsFFmpegInstalled ¶
func IsFFprobeInstalled ¶
func NormalizePath ¶
func OpenFolderInExplorer ¶
func ResetSessionIfComplete ¶
func ResetSessionIfComplete()
func SanitizeFilename ¶
func SanitizeFolderPath ¶
func SelectFolderDialog ¶
func SetDownloadProgress ¶
func SetDownloadProgress(mbDownloaded float64)
func SetDownloadSpeed ¶
func SetDownloadSpeed(mbps float64)
func SetDownloading ¶
func SetDownloading(downloading bool)
func SkipDownloadItem ¶
func SkipDownloadItem(id, filePath string)
func StartDownloadItem ¶
func StartDownloadItem(id string)
func UpdateItemProgress ¶
func UploadToSendNow ¶
func ValidateExecutable ¶
Types ¶
type AlbumInfoMetadata ¶
type AlbumInfoMetadata struct {
TotalTracks int `json:"total_tracks"`
Name string `json:"name"`
ReleaseDate string `json:"release_date"`
Artists string `json:"artists"`
Images string `json:"images"`
Batch string `json:"batch,omitempty"`
ArtistID string `json:"artist_id,omitempty"`
ArtistURL string `json:"artist_url,omitempty"`
}
type AlbumResponsePayload ¶
type AlbumResponsePayload struct {
AlbumInfo AlbumInfoMetadata `json:"album_info"`
TrackList []AlbumTrackMetadata `json:"track_list"`
}
type AlbumTrackMetadata ¶
type AlbumTrackMetadata struct {
SpotifyID string `json:"spotify_id,omitempty"`
Artists string `json:"artists"`
Name string `json:"name"`
AlbumName string `json:"album_name"`
AlbumArtist string `json:"album_artist,omitempty"`
DurationMS int `json:"duration_ms"`
Images string `json:"images"`
ReleaseDate string `json:"release_date"`
TrackNumber int `json:"track_number"`
TotalTracks int `json:"total_tracks,omitempty"`
DiscNumber int `json:"disc_number,omitempty"`
TotalDiscs int `json:"total_discs,omitempty"`
ExternalURL string `json:"external_urls"`
AlbumType string `json:"album_type,omitempty"`
AlbumID string `json:"album_id,omitempty"`
AlbumURL string `json:"album_url,omitempty"`
ArtistID string `json:"artist_id,omitempty"`
ArtistURL string `json:"artist_url,omitempty"`
ArtistsData []ArtistSimple `json:"artists_data,omitempty"`
Plays string `json:"plays,omitempty"`
Status string `json:"status,omitempty"`
PreviewURL string `json:"preview_url,omitempty"`
IsExplicit bool `json:"is_explicit,omitempty"`
}
type AmazonDownloader ¶
type AmazonDownloader struct {
// contains filtered or unexported fields
}
func NewAmazonDownloader ¶
func NewAmazonDownloader() *AmazonDownloader
func (*AmazonDownloader) DownloadBySpotifyID ¶
func (a *AmazonDownloader) DownloadBySpotifyID(spotifyTrackID, outputDir, quality, filenameFormat, playlistName, playlistOwner string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName, spotifyAlbumArtist, spotifyReleaseDate, spotifyCoverURL string, spotifyTrackNumber, spotifyDiscNumber, spotifyTotalTracks int, embedMaxQualityCover bool, spotifyTotalDiscs int, spotifyCopyright, spotifyPublisher, spotifyURL string, useFirstArtistOnly bool, useSingleGenre bool, embedGenre bool, ) (string, error)
func (*AmazonDownloader) DownloadByURL ¶
func (a *AmazonDownloader) DownloadByURL(amazonURL, outputDir, quality, filenameFormat, playlistName, playlistOwner string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName, spotifyAlbumArtist, spotifyReleaseDate, spotifyCoverURL string, spotifyTrackNumber, spotifyDiscNumber, spotifyTotalTracks int, embedMaxQualityCover bool, spotifyTotalDiscs int, spotifyCopyright, spotifyPublisher, spotifyURL string, useFirstArtistOnly bool, useSingleGenre bool, embedGenre bool) (string, error)
func (*AmazonDownloader) DownloadFromAfkarXYZ ¶
func (a *AmazonDownloader) DownloadFromAfkarXYZ(amazonURL, outputDir, quality string) (string, error)
func (*AmazonDownloader) DownloadFromService ¶
func (a *AmazonDownloader) DownloadFromService(amazonURL, outputDir, quality string) (string, error)
func (*AmazonDownloader) GetAmazonURLFromSpotify ¶
func (a *AmazonDownloader) GetAmazonURLFromSpotify(spotifyTrackID string) (string, error)
type AmazonStreamResponse ¶
type AnalysisResult ¶
type AnalysisResult struct {
FilePath string `json:"file_path"`
FileSize int64 `json:"file_size"`
SampleRate uint32 `json:"sample_rate"`
Channels uint8 `json:"channels"`
BitsPerSample uint8 `json:"bits_per_sample"`
TotalSamples uint64 `json:"total_samples"`
Duration float64 `json:"duration"`
Bitrate int `json:"bit_rate"`
BitDepth string `json:"bit_depth"`
DynamicRange float64 `json:"dynamic_range"`
PeakAmplitude float64 `json:"peak_amplitude"`
RMSLevel float64 `json:"rms_level"`
Spectrum *SpectrumData `json:"spectrum,omitempty"`
}
func AnalyzeTrack ¶
func AnalyzeTrack(filepath string) (*AnalysisResult, error)
func GetMetadataWithFFprobe ¶
func GetMetadataWithFFprobe(filePath string) (*AnalysisResult, error)
func GetTrackMetadata ¶
func GetTrackMetadata(filepath string) (*AnalysisResult, error)
type ArtistDiscographyPayload ¶
type ArtistDiscographyPayload struct {
ArtistInfo ArtistInfoMetadata `json:"artist_info"`
AlbumList []DiscographyAlbumMetadata `json:"album_list"`
TrackList []AlbumTrackMetadata `json:"track_list"`
}
type ArtistInfoMetadata ¶
type ArtistInfoMetadata struct {
Name string `json:"name"`
Followers int `json:"followers"`
Genres []string `json:"genres"`
Images string `json:"images"`
Header string `json:"header,omitempty"`
Gallery []string `json:"gallery,omitempty"`
ExternalURL string `json:"external_urls"`
DiscographyType string `json:"discography_type"`
TotalAlbums int `json:"total_albums"`
Biography string `json:"biography,omitempty"`
Verified bool `json:"verified,omitempty"`
Listeners int `json:"listeners,omitempty"`
Rank int `json:"rank,omitempty"`
Batch string `json:"batch,omitempty"`
}
type ArtistResponsePayload ¶
type ArtistSimple ¶
type AudioFileInfo ¶
type AudioFileInfo struct {
Path string `json:"path"`
Filename string `json:"filename"`
Format string `json:"format"`
Size int64 `json:"size"`
}
func GetAudioFileInfo ¶
func GetAudioFileInfo(filePath string) (*AudioFileInfo, error)
type AudioMetadata ¶
type AudioMetadata struct {
Title string `json:"title"`
Artist string `json:"artist"`
Album string `json:"album"`
AlbumArtist string `json:"album_artist"`
TrackNumber int `json:"track_number"`
DiscNumber int `json:"disc_number"`
Year string `json:"year"`
}
func ReadAudioMetadata ¶
func ReadAudioMetadata(filePath string) (*AudioMetadata, error)
type AvatarDownloadRequest ¶
type AvatarDownloadResponse ¶
type ConvertAudioRequest ¶
type ConvertAudioResult ¶
type ConvertAudioResult struct {
InputFile string `json:"input_file"`
OutputFile string `json:"output_file"`
Success bool `json:"success"`
Error string `json:"error,omitempty"`
}
func ConvertAudio ¶
func ConvertAudio(req ConvertAudioRequest) ([]ConvertAudioResult, error)
type CoverClient ¶
type CoverClient struct {
// contains filtered or unexported fields
}
func NewCoverClient ¶
func NewCoverClient() *CoverClient
func (*CoverClient) DownloadAvatar ¶
func (c *CoverClient) DownloadAvatar(req AvatarDownloadRequest) (*AvatarDownloadResponse, error)
func (*CoverClient) DownloadCover ¶
func (c *CoverClient) DownloadCover(req CoverDownloadRequest) (*CoverDownloadResponse, error)
func (*CoverClient) DownloadCoverToPath ¶
func (c *CoverClient) DownloadCoverToPath(coverURL, outputPath string, embedMaxQualityCover bool) error
func (*CoverClient) DownloadGalleryImage ¶
func (c *CoverClient) DownloadGalleryImage(req GalleryImageDownloadRequest) (*GalleryImageDownloadResponse, error)
func (*CoverClient) DownloadHeader ¶
func (c *CoverClient) DownloadHeader(req HeaderDownloadRequest) (*HeaderDownloadResponse, error)
type CoverDownloadRequest ¶
type CoverDownloadRequest struct {
CoverURL string `json:"cover_url"`
TrackName string `json:"track_name"`
ArtistName string `json:"artist_name"`
AlbumName string `json:"album_name"`
AlbumArtist string `json:"album_artist"`
ReleaseDate string `json:"release_date"`
OutputDir string `json:"output_dir"`
FilenameFormat string `json:"filename_format"`
TrackNumber bool `json:"track_number"`
Position int `json:"position"`
DiscNumber int `json:"disc_number"`
}
type CoverDownloadResponse ¶
type DeezerDownloader ¶
type DeezerDownloader struct {
// contains filtered or unexported fields
}
func NewDeezerDownloader ¶
func NewDeezerDownloader() *DeezerDownloader
func (*DeezerDownloader) Download ¶
func (d *DeezerDownloader) Download(spotifyID, outputDir, filenameFormat, playlistName, playlistOwner string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName, spotifyAlbumArtist, spotifyReleaseDate, spotifyCoverURL string, spotifyTrackNumber, spotifyDiscNumber, spotifyTotalTracks int, embedMaxQualityCover bool, spotifyTotalDiscs int, spotifyCopyright, spotifyPublisher, spotifyURL string, useFirstArtistOnly bool, useSingleGenre bool, embedGenre bool) (string, error)
func (*DeezerDownloader) DownloadFromYoinkify ¶
func (d *DeezerDownloader) DownloadFromYoinkify(spotifyURL, outputDir string) (string, error)
type DiscographyAlbumMetadata ¶
type DiscographyAlbumMetadata struct {
ID string `json:"id"`
Name string `json:"name"`
AlbumType string `json:"album_type"`
ReleaseDate string `json:"release_date"`
TotalTracks int `json:"total_tracks"`
Artists string `json:"artists"`
Images string `json:"images"`
ExternalURL string `json:"external_urls"`
}
type DownloadItem ¶
type DownloadItem struct {
ID string `json:"id"`
TrackName string `json:"track_name"`
ArtistName string `json:"artist_name"`
AlbumName string `json:"album_name"`
SpotifyID string `json:"spotify_id"`
Status DownloadStatus `json:"status"`
Progress float64 `json:"progress"`
TotalSize float64 `json:"total_size"`
Speed float64 `json:"speed"`
StartTime int64 `json:"start_time"`
EndTime int64 `json:"end_time"`
ErrorMessage string `json:"error_message"`
FilePath string `json:"file_path"`
}
type DownloadQueueInfo ¶
type DownloadQueueInfo struct {
IsDownloading bool `json:"is_downloading"`
Queue []DownloadItem `json:"queue"`
CurrentSpeed float64 `json:"current_speed"`
TotalDownloaded float64 `json:"total_downloaded"`
SessionStartTime int64 `json:"session_start_time"`
QueuedCount int `json:"queued_count"`
CompletedCount int `json:"completed_count"`
FailedCount int `json:"failed_count"`
SkippedCount int `json:"skipped_count"`
}
func GetDownloadQueue ¶
func GetDownloadQueue() DownloadQueueInfo
type DownloadStatus ¶
type DownloadStatus string
const ( StatusQueued DownloadStatus = "queued" StatusDownloading DownloadStatus = "downloading" StatusCompleted DownloadStatus = "completed" StatusFailed DownloadStatus = "failed" StatusSkipped DownloadStatus = "skipped" )
type FetchHistoryItem ¶
type FetchHistoryItem struct {
ID string `json:"id"`
URL string `json:"url"`
Type string `json:"type"`
Name string `json:"name"`
Info string `json:"info"`
Image string `json:"image"`
Data string `json:"data"`
Timestamp int64 `json:"timestamp"`
}
func GetFetchHistoryItems ¶
func GetFetchHistoryItems(appName string) ([]FetchHistoryItem, error)
type FileInfo ¶
type FileInfo struct {
Name string `json:"name"`
Path string `json:"path"`
IsDir bool `json:"is_dir"`
Size int64 `json:"size"`
Children []FileInfo `json:"children,omitempty"`
}
func ListAudioFiles ¶
func ListDirectory ¶
type HeaderDownloadRequest ¶
type HeaderDownloadResponse ¶
type HistoryItem ¶
type HistoryItem struct {
ID string `json:"id"`
SpotifyID string `json:"spotify_id"`
Title string `json:"title"`
Artists string `json:"artists"`
Album string `json:"album"`
DurationStr string `json:"duration_str"`
CoverURL string `json:"cover_url"`
Quality string `json:"quality"`
Format string `json:"format"`
Path string `json:"path"`
Timestamp int64 `json:"timestamp"`
}
func GetHistoryItems ¶
func GetHistoryItems(appName string) ([]HistoryItem, error)
type LRCLibResponse ¶
type LRCLibResponse struct {
ID int `json:"id"`
Name string `json:"name"`
TrackName string `json:"trackName"`
ArtistName string `json:"artistName"`
AlbumName string `json:"albumName"`
Duration float64 `json:"duration"`
Instrumental bool `json:"instrumental"`
PlainLyrics string `json:"plainLyrics"`
SyncedLyrics string `json:"syncedLyrics"`
}
type LyricsClient ¶
type LyricsClient struct {
// contains filtered or unexported fields
}
func NewLyricsClient ¶
func NewLyricsClient() *LyricsClient
func (*LyricsClient) ConvertToLRC ¶
func (c *LyricsClient) ConvertToLRC(lyrics *LyricsResponse, trackName, artistName string) string
func (*LyricsClient) DownloadLyrics ¶
func (c *LyricsClient) DownloadLyrics(req LyricsDownloadRequest) (*LyricsDownloadResponse, error)
func (*LyricsClient) FetchLyricsAllSources ¶
func (c *LyricsClient) FetchLyricsAllSources(spotifyID, trackName, artistName string, duration int) (*LyricsResponse, string, error)
func (*LyricsClient) FetchLyricsFromLRCLibSearch ¶
func (c *LyricsClient) FetchLyricsFromLRCLibSearch(trackName, artistName string) (*LyricsResponse, error)
func (*LyricsClient) FetchLyricsFromSpotifyAPI ¶
func (c *LyricsClient) FetchLyricsFromSpotifyAPI(spotifyID string) (*LyricsResponse, error)
func (*LyricsClient) FetchLyricsWithMetadata ¶
func (c *LyricsClient) FetchLyricsWithMetadata(trackName, artistName string, duration int) (*LyricsResponse, error)
type LyricsDownloadRequest ¶
type LyricsDownloadRequest struct {
SpotifyID string `json:"spotify_id"`
TrackName string `json:"track_name"`
ArtistName string `json:"artist_name"`
AlbumName string `json:"album_name"`
AlbumArtist string `json:"album_artist"`
ReleaseDate string `json:"release_date"`
OutputDir string `json:"output_dir"`
FilenameFormat string `json:"filename_format"`
TrackNumber bool `json:"track_number"`
Position int `json:"position"`
UseAlbumTrackNumber bool `json:"use_album_track_number"`
DiscNumber int `json:"disc_number"`
}
type LyricsDownloadResponse ¶
type LyricsLine ¶
type LyricsResponse ¶
type LyricsResponse struct {
Error bool `json:"error"`
SyncType string `json:"syncType"`
Lines []LyricsLine `json:"lines"`
}
type MPD ¶
type MPD struct {
XMLName xml.Name `xml:"MPD"`
Period struct {
AdaptationSets []struct {
MimeType string `xml:"mimeType,attr"`
Codecs string `xml:"codecs,attr"`
Representations []struct {
ID string `xml:"id,attr"`
Codecs string `xml:"codecs,attr"`
Bandwidth int `xml:"bandwidth,attr"`
SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate"`
} `xml:"Representation"`
SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate"`
} `xml:"AdaptationSet"`
} `xml:"Period"`
}
type Metadata ¶
type Metadata struct {
Title string
Artist string
Album string
AlbumArtist string
Date string
ReleaseDate string
TrackNumber int
TotalTracks int
DiscNumber int
TotalDiscs int
URL string
Copyright string
Publisher string
Lyrics string
Description string
ISRC string
Genre string
}
type MusicBrainzRecordingResponse ¶
type MusicBrainzRecordingResponse struct {
Recordings []struct {
ID string `json:"id"`
Title string `json:"title"`
Length int `json:"length"`
Releases []struct {
ID string `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
ReleaseGroup struct {
ID string `json:"id"`
Title string `json:"title"`
PrimaryType string `json:"primary-type"`
} `json:"release-group"`
Date string `json:"date"`
Country string `json:"country"`
Media []struct {
Format string `json:"format"`
} `json:"media"`
LabelInfo []struct {
Label struct {
Name string `json:"name"`
} `json:"label"`
} `json:"label-info"`
} `json:"releases"`
ArtistCredit []struct {
Artist struct {
ID string `json:"id"`
Name string `json:"name"`
} `json:"artist"`
} `json:"artist-credit"`
Tags []struct {
Count int `json:"count"`
Name string `json:"name"`
} `json:"tags"`
} `json:"recordings"`
}
type PlaylistInfoMetadata ¶
type PlaylistInfoMetadata struct {
Tracks struct {
Total int `json:"total"`
} `json:"tracks"`
Followers struct {
Total int `json:"total"`
} `json:"followers"`
Owner struct {
DisplayName string `json:"display_name"`
Name string `json:"name"`
Images string `json:"images"`
} `json:"owner"`
Cover string `json:"cover,omitempty"`
Description string `json:"description,omitempty"`
Batch string `json:"batch,omitempty"`
}
type PlaylistResponsePayload ¶
type PlaylistResponsePayload struct {
PlaylistInfo PlaylistInfoMetadata `json:"playlist_info"`
TrackList []AlbumTrackMetadata `json:"track_list"`
}
type ProgressInfo ¶
type ProgressInfo struct {
IsDownloading bool `json:"is_downloading"`
MBDownloaded float64 `json:"mb_downloaded"`
SpeedMBps float64 `json:"speed_mbps"`
}
func GetDownloadProgress ¶
func GetDownloadProgress() ProgressInfo
type ProgressWriter ¶
type ProgressWriter struct {
// contains filtered or unexported fields
}
func NewProgressWriter ¶
func NewProgressWriter(writer io.Writer) *ProgressWriter
func NewProgressWriterWithID ¶
func NewProgressWriterWithID(writer io.Writer, itemID string) *ProgressWriter
func (*ProgressWriter) GetTotal ¶
func (pw *ProgressWriter) GetTotal() int64
type QobuzDownloader ¶
type QobuzDownloader struct {
// contains filtered or unexported fields
}
func NewQobuzDownloader ¶
func NewQobuzDownloader() *QobuzDownloader
func (*QobuzDownloader) DownloadCoverArt ¶
func (q *QobuzDownloader) DownloadCoverArt(coverURL, filepath string) error
func (*QobuzDownloader) DownloadFile ¶
func (q *QobuzDownloader) DownloadFile(url, filepath string) error
func (*QobuzDownloader) DownloadFromStandard ¶
func (*QobuzDownloader) DownloadTrack ¶
func (q *QobuzDownloader) DownloadTrack(spotifyID, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName, spotifyAlbumArtist, spotifyReleaseDate string, useAlbumTrackNumber bool, spotifyCoverURL string, embedMaxQualityCover bool, spotifyTrackNumber, spotifyDiscNumber, spotifyTotalTracks int, spotifyTotalDiscs int, spotifyCopyright, spotifyPublisher, spotifyURL string, allowFallback bool, useFirstArtistOnly bool, useSingleGenre bool, embedGenre bool) (string, error)
func (*QobuzDownloader) DownloadTrackWithISRC ¶
func (q *QobuzDownloader) DownloadTrackWithISRC(deezerISRC, spotifyID, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName, spotifyAlbumArtist, spotifyReleaseDate string, useAlbumTrackNumber bool, spotifyCoverURL string, embedMaxQualityCover bool, spotifyTrackNumber, spotifyDiscNumber, spotifyTotalTracks int, spotifyTotalDiscs int, spotifyCopyright, spotifyPublisher, spotifyURL string, allowFallback bool, useFirstArtistOnly bool, useSingleGenre bool, embedGenre bool) (string, error)
func (*QobuzDownloader) GetDownloadURL ¶
type QobuzSearchResponse ¶
type QobuzSearchResponse struct {
Query string `json:"query"`
Tracks struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
Total int `json:"total"`
Items []QobuzTrack `json:"items"`
} `json:"tracks"`
}
type QobuzStreamResponse ¶
type QobuzStreamResponse struct {
URL string `json:"url"`
}
type QobuzTrack ¶
type QobuzTrack struct {
ID int64 `json:"id"`
Title string `json:"title"`
Version string `json:"version"`
Duration int `json:"duration"`
TrackNumber int `json:"track_number"`
MediaNumber int `json:"media_number"`
ISRC string `json:"isrc"`
Copyright string `json:"copyright"`
MaximumBitDepth int `json:"maximum_bit_depth"`
MaximumSamplingRate float64 `json:"maximum_sampling_rate"`
Hires bool `json:"hires"`
HiresStreamable bool `json:"hires_streamable"`
ReleaseDateOriginal string `json:"release_date_original"`
Performer struct {
Name string `json:"name"`
ID int64 `json:"id"`
} `json:"performer"`
Album struct {
Title string `json:"title"`
ID string `json:"id"`
Image struct {
Small string `json:"small"`
Thumbnail string `json:"thumbnail"`
Large string `json:"large"`
} `json:"image"`
Artist struct {
Name string `json:"name"`
ID int64 `json:"id"`
} `json:"artist"`
Label struct {
Name string `json:"name"`
} `json:"label"`
} `json:"album"`
}
type RenamePreview ¶
type RenamePreview struct {
OldPath string `json:"old_path"`
OldName string `json:"old_name"`
NewName string `json:"new_name"`
NewPath string `json:"new_path"`
Error string `json:"error,omitempty"`
Metadata AudioMetadata `json:"metadata"`
}
func PreviewRename ¶
func PreviewRename(files []string, format string) []RenamePreview
type RenameResult ¶
type RenameResult struct {
OldPath string `json:"old_path"`
NewPath string `json:"new_path"`
Success bool `json:"success"`
Error string `json:"error,omitempty"`
}
func RenameFiles ¶
func RenameFiles(files []string, format string) []RenameResult
type SearchResponse ¶
type SearchResponse struct {
Tracks []SearchResult `json:"tracks"`
Albums []SearchResult `json:"albums"`
Artists []SearchResult `json:"artists"`
Playlists []SearchResult `json:"playlists"`
}
func SearchSpotify ¶
type SearchResult ¶
type SearchResult struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Artists string `json:"artists,omitempty"`
AlbumName string `json:"album_name,omitempty"`
Images string `json:"images"`
ReleaseDate string `json:"release_date,omitempty"`
ExternalURL string `json:"external_urls"`
Duration int `json:"duration_ms,omitempty"`
TotalTracks int `json:"total_tracks,omitempty"`
Owner string `json:"owner,omitempty"`
IsExplicit bool `json:"is_explicit,omitempty"`
}
func SearchSpotifyByType ¶
type SegmentTemplate ¶
type SendNowResponse ¶
type SendNowResponse []struct {
FileCode string `json:"file_code"`
}
type SongLinkClient ¶
type SongLinkClient struct {
// contains filtered or unexported fields
}
func NewSongLinkClient ¶
func NewSongLinkClient() *SongLinkClient
func (*SongLinkClient) CheckTrackAvailability ¶
func (s *SongLinkClient) CheckTrackAvailability(spotifyTrackID string) (*TrackAvailability, error)
func (*SongLinkClient) GetAllURLsFromSpotify ¶
func (s *SongLinkClient) GetAllURLsFromSpotify(spotifyTrackID string, region string) (*SongLinkURLs, error)
func (*SongLinkClient) GetDeezerURLFromSpotify ¶
func (s *SongLinkClient) GetDeezerURLFromSpotify(spotifyTrackID string) (string, error)
type SongLinkResponse ¶
type SongLinkURLs ¶
type SpectrumData ¶
type SpectrumData struct {
TimeSlices []TimeSlice `json:"time_slices"`
SampleRate int `json:"sample_rate"`
FreqBins int `json:"freq_bins"`
Duration float64 `json:"duration"`
MaxFreq float64 `json:"max_freq"`
}
func AnalyzeSpectrum ¶
func AnalyzeSpectrum(filepath string) (*SpectrumData, error)
type SpotifyClient ¶
type SpotifyClient struct {
// contains filtered or unexported fields
}
func NewSpotifyClient ¶
func NewSpotifyClient() *SpotifyClient
func (*SpotifyClient) Initialize ¶
func (c *SpotifyClient) Initialize() error
type SpotifyLyricsAPIResponse ¶
type SpotifyLyricsAPIResponse struct {
Error bool `json:"error"`
SyncType string `json:"syncType"`
Lines []SpotifyLyricsLine `json:"lines"`
}
type SpotifyLyricsLine ¶
type SpotifyMetadataClient ¶
type SpotifyMetadataClient struct {
// contains filtered or unexported fields
}
func NewSpotifyMetadataClient ¶
func NewSpotifyMetadataClient() *SpotifyMetadataClient
func (*SpotifyMetadataClient) GetFilteredData ¶
func (*SpotifyMetadataClient) Search ¶
func (c *SpotifyMetadataClient) Search(ctx context.Context, query string, limit int) (*SearchResponse, error)
func (*SpotifyMetadataClient) SearchByType ¶
func (c *SpotifyMetadataClient) SearchByType(ctx context.Context, query string, searchType string, limit int, offset int) ([]SearchResult, error)
type TidalAPIResponse ¶
type TidalAPIResponse struct {
OriginalTrackURL string `json:"OriginalTrackUrl"`
}
type TidalAPIResponseV2 ¶
type TidalAPIResponseV2 struct {
Version string `json:"version"`
Data struct {
TrackID int64 `json:"trackId"`
AssetPresentation string `json:"assetPresentation"`
AudioMode string `json:"audioMode"`
AudioQuality string `json:"audioQuality"`
ManifestMimeType string `json:"manifestMimeType"`
ManifestHash string `json:"manifestHash"`
Manifest string `json:"manifest"`
BitDepth int `json:"bitDepth"`
SampleRate int `json:"sampleRate"`
} `json:"data"`
}
type TidalBTSManifest ¶
type TidalDownloader ¶
type TidalDownloader struct {
// contains filtered or unexported fields
}
func NewTidalDownloader ¶
func NewTidalDownloader(apiURL string) *TidalDownloader
func (*TidalDownloader) Download ¶
func (t *TidalDownloader) Download(spotifyTrackID, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName, spotifyAlbumArtist, spotifyReleaseDate string, useAlbumTrackNumber bool, spotifyCoverURL string, embedMaxQualityCover bool, spotifyTrackNumber, spotifyDiscNumber, spotifyTotalTracks int, spotifyTotalDiscs int, spotifyCopyright, spotifyPublisher, spotifyURL string, allowFallback bool, useFirstArtistOnly bool, useSingleGenre bool, embedGenre bool) (string, error)
func (*TidalDownloader) DownloadByURL ¶
func (t *TidalDownloader) DownloadByURL(tidalURL, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName, spotifyAlbumArtist, spotifyReleaseDate string, useAlbumTrackNumber bool, spotifyCoverURL string, embedMaxQualityCover bool, spotifyTrackNumber, spotifyDiscNumber, spotifyTotalTracks int, spotifyTotalDiscs int, spotifyCopyright, spotifyPublisher, spotifyURL string, allowFallback bool, useFirstArtistOnly bool, useSingleGenre bool, embedGenre bool) (string, error)
func (*TidalDownloader) DownloadByURLWithFallback ¶
func (t *TidalDownloader) DownloadByURLWithFallback(tidalURL, outputDir, quality, filenameFormat string, includeTrackNumber bool, position int, spotifyTrackName, spotifyArtistName, spotifyAlbumName, spotifyAlbumArtist, spotifyReleaseDate string, useAlbumTrackNumber bool, spotifyCoverURL string, embedMaxQualityCover bool, spotifyTrackNumber, spotifyDiscNumber, spotifyTotalTracks int, spotifyTotalDiscs int, spotifyCopyright, spotifyPublisher, spotifyURL string, allowFallback bool, useFirstArtistOnly bool, useSingleGenre bool, embedGenre bool) (string, error)
func (*TidalDownloader) DownloadFile ¶
func (t *TidalDownloader) DownloadFile(url, filepath string) error
func (*TidalDownloader) DownloadFromManifest ¶
func (t *TidalDownloader) DownloadFromManifest(manifestB64, outputPath string) error
func (*TidalDownloader) GetAvailableAPIs ¶
func (t *TidalDownloader) GetAvailableAPIs() ([]string, error)
func (*TidalDownloader) GetDownloadURL ¶
func (t *TidalDownloader) GetDownloadURL(trackID int64, quality string) (string, error)
func (*TidalDownloader) GetTidalURLFromSpotify ¶
func (t *TidalDownloader) GetTidalURLFromSpotify(spotifyTrackID string) (string, error)
func (*TidalDownloader) GetTrackIDFromURL ¶
func (t *TidalDownloader) GetTrackIDFromURL(tidalURL string) (int64, error)
type TrackAvailability ¶
type TrackAvailability struct {
SpotifyID string `json:"spotify_id"`
Tidal bool `json:"tidal"`
Amazon bool `json:"amazon"`
Qobuz bool `json:"qobuz"`
Deezer bool `json:"deezer"`
TidalURL string `json:"tidal_url,omitempty"`
AmazonURL string `json:"amazon_url,omitempty"`
QobuzURL string `json:"qobuz_url,omitempty"`
DeezerURL string `json:"deezer_url,omitempty"`
}
type TrackMetadata ¶
type TrackMetadata struct {
SpotifyID string `json:"spotify_id,omitempty"`
Artists string `json:"artists"`
Name string `json:"name"`
AlbumName string `json:"album_name"`
AlbumArtist string `json:"album_artist,omitempty"`
DurationMS int `json:"duration_ms"`
Images string `json:"images"`
ReleaseDate string `json:"release_date"`
TrackNumber int `json:"track_number"`
TotalTracks int `json:"total_tracks,omitempty"`
DiscNumber int `json:"disc_number,omitempty"`
TotalDiscs int `json:"total_discs,omitempty"`
ExternalURL string `json:"external_urls"`
Copyright string `json:"copyright,omitempty"`
Publisher string `json:"publisher,omitempty"`
Plays string `json:"plays,omitempty"`
PreviewURL string `json:"preview_url,omitempty"`
IsExplicit bool `json:"is_explicit,omitempty"`
}
type TrackResponse ¶
type TrackResponse struct {
Track TrackMetadata `json:"track"`
}
type YoinkifyRequest ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.