1 parent
9f06af6c80
commit
7975f2b38e
19 files changed
+2020
-747
No files matched your search
@@ -102,8 +102,7 @@ namespace Echoion::Core
|
||||
nullptr,
|
||||
std::function<void()> onComplete = nullptr);
|
||||
|
||||
// Extract video ID from various YouTube URL formats (handles
|
||||
// redirects for short URLs)
|
||||
// Extract a video ID from known YouTube URL formats or a bare ID.
|
||||
[[nodiscard]] std::optional<std::string>
|
||||
extractVideoId(std::string_view url);
|
||||
[[nodiscard]] static std::optional<std::string>
|
||||
@@ -153,6 +152,14 @@ namespace Echoion::Core
|
||||
|
||||
// Enable/disable URL shortening for track links
|
||||
void setUrlShorteningEnabled(bool enabled);
|
||||
void setUrlShortenerProvider(UrlShortener::ProviderGetter provider);
|
||||
void setUrlShorteningSources(
|
||||
const std::vector<std::string>& sources);
|
||||
void setUrlShorteningTimeout(std::chrono::milliseconds timeout);
|
||||
// Apply the provider-neutral policy to resolved tracks from any
|
||||
// source. Operations are best-effort and timeout-bounded.
|
||||
void populateShortenedUrls(std::vector<Api::TrackInfo>& tracks);
|
||||
void populateShortenedUrl(Api::TrackInfo& track);
|
||||
|
||||
// Gate yt-dlp's periodic background self-update
|
||||
// (features.enableAutoUpdateCheck). Set before initialize().
|
||||
@@ -208,9 +215,7 @@ namespace Echoion::Core
|
||||
mutable std::mutex configMutex_;
|
||||
size_t maxConcurrentResolutions_ = 4;
|
||||
bool urlShorteningEnabled_ = true;
|
||||
std::chrono::milliseconds urlShorteningTimeout_{3000};
|
||||
|
||||
// Populate shortened URLs for tracks
|
||||
void populateShortenedUrls(std::vector<Api::TrackInfo>& tracks);
|
||||
void populateShortenedUrl(Api::TrackInfo& track);
|
||||
};
|
||||
} // namespace Echoion::Core
|
||||
Reference in new issue
Block a user