Skip to content

feat: support separate DNS audio limit, channel-specific overrides, and optional opus transcoding#222

Open
tagh6668-dot wants to merge 1 commit into
sartoopjj:mainfrom
tagh6668-dot:upstream-pr-dns-limits
Open

feat: support separate DNS audio limit, channel-specific overrides, and optional opus transcoding#222
tagh6668-dot wants to merge 1 commit into
sartoopjj:mainfrom
tagh6668-dot:upstream-pr-dns-limits

Conversation

@tagh6668-dot

Copy link
Copy Markdown

This Pull Request implements support for separate DNS media limits for audio/voice files, channel-specific overrides, and optional server-side Opus transcoding.

As requested:

  • Removed Gradle and GitHub Actions Changes: The changes to android/app/build.gradle and .github/workflows/build.yml have been completely reverted.
  • Squashed Commits: All modifications have been squashed into a single clean commit.

Key Features Included:

  1. Separate DNS Audio Limit: Introduces --dns-audio-max-size (and its environment variable equivalent) to define a distinct size limit specifically for audio/voice files. If not set, it defaults to the main --dns-media-max-size.
  2. Channel-Specific Overrides: Support channel-specific dns-media-max-size and dns-audio-max-size overrides in channels.txt/private_channels.txt (e.g., channelname [media_limit, audio_limit]).
  3. Optional Opus Transcoding: Server-side audio auto-transcoding to Opus 16k single channel. This reduces audio file sizes to about 1/5 of the original. To keep backward compatibility and standard behavior intact, this feature is completely optional and only activates if the THEFEED_OPUS_TRANSCODE=1 environment variable is set.
  4. Fix: Preserve the letter-case of private channel invite hashes during limits parsing.

فارسی:

این پول رکوئست (PR) قابلیت‌های مدیریت حجم مجزا برای مدیاهای صوتی، اوررایدهای اختصاصی برای هر کانال و تبدیل فرمت اختیاری به Opus را اضافه می‌کند.

مطابق درخواست شما:

  • حذف تغییرات اضافی: تمام تغییرات فایل‌های گریدل (build.gradle) و ورک‌فلوهای گیت‌هاب اکشن (build.yml) به طور کامل حذف شده‌اند.
  • اسکواش کامیت‌ها: تمامی کامیت‌ها اسکواش شده و در قالب یک کامیت تمیز و یکپارچه قرار گرفته‌اند.

قابلیت‌های اضافه شده:

۱. محدودیت حجم مجزا برای فایل‌های صوتی: تعریف فلگ جدید --dns-audio-max-size جهت اعمال محدودیت مجزا برای ویس‌ها و موزیک‌ها بدون بالا بردن بیهوده سقف حجم تصاویر و ویدیوها. (در صورت عدم تنظیم، به طور خودکار از همان لیمیت مدیا استفاده می‌کند).
۲. اورراید اختصاصی کانال‌ها: امکان اعمال اورراید برای لیمیت‌های مدیا و صوتی به صورت اختصاصی برای هر کانال در فایل کانال‌ها (مثلاً channelname [limit, audio_limit]).
۳. کاهش حجم فایل‌های صوتی با تبدیل به Opus: قابلیت فشرده‌سازی خودکار ویس‌ها و فایل‌های صوتی به فرمت Opus 16k تک کاناله (که حجم را تقریباً به ۱/۵ کاهش می‌دهد). این قابلیت برای حفظ رفتار پیش‌فرض برنامه، کاملاً اختیاری است و تنها در صورت تنظیم متغیر محیطی THEFEED_OPUS_TRANSCODE=1 فعال می‌شود.
۴. رفع باگ: حفظ بزرگ و کوچک بودن کاراکترهای هش کانال‌های خصوصی در پردازش لیمیت‌ها.

…nd optional opus transcoding

- Add --dns-audio-max-size flag and configuration parsing to allow a distinct download limit exclusively for audio/voice files.

- Add support for channel-specific overrides for both dns-media-max-size and dns-audio-max-size inside channels config.

- Add optional server-side audio-to-opus transcode capability, gated behind the THEFEED_OPUS_TRANSCODE=1 environment variable.

- Fix: Preserve the case of private channel invite hashes in limits parsing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant