Showing preview only (3,076K chars total). Download the full file or copy to clipboard to get everything.
Repository: JunkFood02/Seal
Branch: main
Commit: d9c741a07a25
Files: 365
Total size: 2.9 MB
Directory structure:
gitextract_n0w66_ho/
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ └── feature_request.yml
│ └── workflows/
│ ├── Issue-Handler.yaml
│ ├── android.yml
│ ├── android_ci.yml
│ ├── close-stale-issues.yml
│ └── sponsor.yml
├── .gitignore
├── .idea/
│ ├── AndroidProjectSystem.xml
│ ├── appInsightsSettings.xml
│ ├── codeStyles/
│ │ ├── Project.xml
│ │ └── codeStyleConfig.xml
│ ├── compiler.xml
│ ├── deploymentTargetSelector.xml
│ ├── gradle.xml
│ ├── inspectionProfiles/
│ │ └── Project_Default.xml
│ ├── kotlinc.xml
│ ├── ktfmt.xml
│ ├── migrations.xml
│ ├── misc.xml
│ ├── other.xml
│ ├── runConfigurations.xml
│ ├── studiobot.xml
│ └── vcs.xml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── app/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ ├── schemas/
│ │ └── com.junkfood.seal.database.AppDatabase/
│ │ ├── 1.json
│ │ ├── 2.json
│ │ ├── 3.json
│ │ ├── 4.json
│ │ └── 5.json
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── junkfood/
│ │ └── seal/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── junkfood/
│ │ │ └── seal/
│ │ │ ├── App.kt
│ │ │ ├── CrashReportActivity.kt
│ │ │ ├── DownloadService.kt
│ │ │ ├── Downloader.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── NotificationActionReceiver.kt
│ │ │ ├── QuickDownloadActivity.kt
│ │ │ ├── database/
│ │ │ │ ├── AppDatabase.kt
│ │ │ │ ├── VideoInfoDao.kt
│ │ │ │ ├── backup/
│ │ │ │ │ ├── Backup.kt
│ │ │ │ │ └── BackupUtil.kt
│ │ │ │ └── objects/
│ │ │ │ ├── CommandTemplate.kt
│ │ │ │ ├── CookieProfile.kt
│ │ │ │ ├── DownloadedVideoInfo.kt
│ │ │ │ └── OptionShortcut.kt
│ │ │ ├── download/
│ │ │ │ ├── DownloaderV2.kt
│ │ │ │ ├── Task.kt
│ │ │ │ └── TaskFactory.kt
│ │ │ ├── ui/
│ │ │ │ ├── common/
│ │ │ │ │ ├── AnimatedComposable.kt
│ │ │ │ │ ├── AsyncImageImpl.kt
│ │ │ │ │ ├── CompositionLocals.kt
│ │ │ │ │ ├── Ext.kt
│ │ │ │ │ ├── HapticFeedback.kt
│ │ │ │ │ ├── Route.kt
│ │ │ │ │ └── motion/
│ │ │ │ │ ├── AnimationSpecs.kt
│ │ │ │ │ ├── MaterialSharedAxis.kt
│ │ │ │ │ └── MotionConstants.kt
│ │ │ │ ├── component/
│ │ │ │ │ ├── ActionSheetItems.kt
│ │ │ │ │ ├── Buttons.kt
│ │ │ │ │ ├── Chips.kt
│ │ │ │ │ ├── CommonComponents.kt
│ │ │ │ │ ├── DialogItems.kt
│ │ │ │ │ ├── Dialogs.kt
│ │ │ │ │ ├── DownloadQueueItem.kt
│ │ │ │ │ ├── FormatItem.kt
│ │ │ │ │ ├── IconButtons.kt
│ │ │ │ │ ├── ModalBottomSheetM2.kt
│ │ │ │ │ ├── ModalBottomSheetM3.kt
│ │ │ │ │ ├── PreferenceItems.kt
│ │ │ │ │ ├── SearchBar.kt
│ │ │ │ │ ├── SegementedButton.kt
│ │ │ │ │ ├── SelectionGroup.kt
│ │ │ │ │ ├── SettingItem.kt
│ │ │ │ │ ├── SponsorItem.kt
│ │ │ │ │ ├── TextField.kt
│ │ │ │ │ ├── VideoCard.kt
│ │ │ │ │ └── VideoListItem.kt
│ │ │ │ ├── page/
│ │ │ │ │ ├── AppEntry.kt
│ │ │ │ │ ├── AppUpdater.kt
│ │ │ │ │ ├── NavigationDrawer.kt
│ │ │ │ │ ├── UpdateDialog.kt
│ │ │ │ │ ├── WelcomeDialog.kt
│ │ │ │ │ ├── YtdlpUpdater.kt
│ │ │ │ │ ├── command/
│ │ │ │ │ │ ├── TaskListPage.kt
│ │ │ │ │ │ └── TaskLogPage.kt
│ │ │ │ │ ├── download/
│ │ │ │ │ │ ├── DownloadPage.kt
│ │ │ │ │ │ ├── DownloadSettingsDialog.kt
│ │ │ │ │ │ ├── HomePageViewModel.kt
│ │ │ │ │ │ ├── MeteredNetworkDialog.kt
│ │ │ │ │ │ ├── NotificationPermissionDialog.kt
│ │ │ │ │ │ ├── PlaylistSelectionDialog.kt
│ │ │ │ │ │ └── VideoSectionSlider.kt
│ │ │ │ │ ├── downloadv2/
│ │ │ │ │ │ ├── ActionSheet.kt
│ │ │ │ │ │ ├── DownloadPageV2.kt
│ │ │ │ │ │ ├── TopBarNestedScrollConnection.kt
│ │ │ │ │ │ ├── VideoCardV2.kt
│ │ │ │ │ │ └── configure/
│ │ │ │ │ │ ├── DownloadDialogV2.kt
│ │ │ │ │ │ ├── DownloadDialogViewModel.kt
│ │ │ │ │ │ ├── FormatPage.kt
│ │ │ │ │ │ ├── InputUrlDialog.kt
│ │ │ │ │ │ └── PlaylistSelectionPage.kt
│ │ │ │ │ ├── settings/
│ │ │ │ │ │ ├── BasePreferencePage.kt
│ │ │ │ │ │ ├── SettingsPage.kt
│ │ │ │ │ │ ├── about/
│ │ │ │ │ │ │ ├── AboutPage.kt
│ │ │ │ │ │ │ ├── CreditsPage.kt
│ │ │ │ │ │ │ ├── SponsorPage.kt
│ │ │ │ │ │ │ └── UpdatePage.kt
│ │ │ │ │ │ ├── appearance/
│ │ │ │ │ │ │ ├── AppearancePreferences.kt
│ │ │ │ │ │ │ ├── DarkThemePreferences.kt
│ │ │ │ │ │ │ └── LanguagesPage.kt
│ │ │ │ │ │ ├── command/
│ │ │ │ │ │ │ ├── CommandTemplateDialog.kt
│ │ │ │ │ │ │ ├── TemplateEditPage.kt
│ │ │ │ │ │ │ └── TemplateListPage.kt
│ │ │ │ │ │ ├── directory/
│ │ │ │ │ │ │ ├── DirectoryPreferenceDialog.kt
│ │ │ │ │ │ │ └── DownloadDirectoryPreferences.kt
│ │ │ │ │ │ ├── format/
│ │ │ │ │ │ │ ├── DownloadFormatPreferences.kt
│ │ │ │ │ │ │ ├── FormatSettingDialogs.kt
│ │ │ │ │ │ │ └── SubtitlePreference.kt
│ │ │ │ │ │ ├── general/
│ │ │ │ │ │ │ ├── AdvancedSettingDialogs.kt
│ │ │ │ │ │ │ ├── GeneralDownloadPreferences.kt
│ │ │ │ │ │ │ └── YtdlpUpdateDialog.kt
│ │ │ │ │ │ ├── interaction/
│ │ │ │ │ │ │ ├── InteractionPreferencePage.kt
│ │ │ │ │ │ │ └── InterfaceCustomizationDialogs.kt
│ │ │ │ │ │ ├── network/
│ │ │ │ │ │ │ ├── CookieProfilesPage.kt
│ │ │ │ │ │ │ ├── CookiesViewModel.kt
│ │ │ │ │ │ │ ├── NetworkPreferences.kt
│ │ │ │ │ │ │ ├── NetworkSettingDialogs.kt
│ │ │ │ │ │ │ └── WebViewPage.kt
│ │ │ │ │ │ └── troubleshooting/
│ │ │ │ │ │ └── TroubleshootingPage.kt
│ │ │ │ │ └── videolist/
│ │ │ │ │ ├── ExportImportDialog.kt
│ │ │ │ │ ├── RemoveItemDialog.kt
│ │ │ │ │ ├── VideoDetailDrawer.kt
│ │ │ │ │ ├── VideoListPage.kt
│ │ │ │ │ └── VideoListViewModel.kt
│ │ │ │ ├── svg/
│ │ │ │ │ ├── VectorPreviews.kt
│ │ │ │ │ ├── __DrawableVectors.kt
│ │ │ │ │ └── drawablevectors/
│ │ │ │ │ ├── Coder.kt
│ │ │ │ │ ├── Download.kt
│ │ │ │ │ ├── VideoFiles.kt
│ │ │ │ │ └── VideoSteaming.kt
│ │ │ │ └── theme/
│ │ │ │ ├── ColorScheme.kt
│ │ │ │ ├── Shape.kt
│ │ │ │ ├── Theme.kt
│ │ │ │ └── Type.kt
│ │ │ └── util/
│ │ │ ├── DatabaseUtil.kt
│ │ │ ├── DateTimeUtil.kt
│ │ │ ├── DownloadUtil.kt
│ │ │ ├── FileUtil.kt
│ │ │ ├── LanguageSettings.kt
│ │ │ ├── NotificationUtil.kt
│ │ │ ├── PreferenceUtil.kt
│ │ │ ├── SponsorData.kt
│ │ │ ├── SponsorUtil.kt
│ │ │ ├── TextUtil.kt
│ │ │ ├── UpdateUtil.kt
│ │ │ └── VideoInfo.kt
│ │ └── res/
│ │ ├── drawable/
│ │ │ ├── ic_launcher_foreground.xml
│ │ │ ├── ic_launcher_monochrome.xml
│ │ │ ├── icons8_matrix.xml
│ │ │ ├── icons8_telegram_app.xml
│ │ │ ├── outline_cancel_24.xml
│ │ │ ├── outline_content_copy_24.xml
│ │ │ └── seal.xml
│ │ ├── drawable-anydpi-v24/
│ │ │ └── ic_stat_seal.xml
│ │ ├── mipmap-anydpi-v26/
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── resources.properties
│ │ ├── values/
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ ├── values-ar/
│ │ │ └── strings.xml
│ │ ├── values-ar-rSA/
│ │ │ └── strings.xml
│ │ ├── values-az/
│ │ │ └── strings.xml
│ │ ├── values-be/
│ │ │ └── strings.xml
│ │ ├── values-bn/
│ │ │ └── strings.xml
│ │ ├── values-ca/
│ │ │ └── strings.xml
│ │ ├── values-ckb/
│ │ │ └── strings.xml
│ │ ├── values-cs/
│ │ │ └── strings.xml
│ │ ├── values-da/
│ │ │ └── strings.xml
│ │ ├── values-de/
│ │ │ └── strings.xml
│ │ ├── values-el/
│ │ │ └── strings.xml
│ │ ├── values-es/
│ │ │ └── strings.xml
│ │ ├── values-eu/
│ │ │ └── strings.xml
│ │ ├── values-fa/
│ │ │ └── strings.xml
│ │ ├── values-fil/
│ │ │ └── strings.xml
│ │ ├── values-fr/
│ │ │ └── strings.xml
│ │ ├── values-gl/
│ │ │ └── strings.xml
│ │ ├── values-hi/
│ │ │ └── strings.xml
│ │ ├── values-hr/
│ │ │ └── strings.xml
│ │ ├── values-hu/
│ │ │ └── strings.xml
│ │ ├── values-in/
│ │ │ └── strings.xml
│ │ ├── values-it/
│ │ │ └── strings.xml
│ │ ├── values-iw/
│ │ │ └── strings.xml
│ │ ├── values-ja/
│ │ │ └── strings.xml
│ │ ├── values-ji/
│ │ │ └── strings.xml
│ │ ├── values-kab/
│ │ │ └── strings.xml
│ │ ├── values-km/
│ │ │ └── strings.xml
│ │ ├── values-kmr/
│ │ │ └── strings.xml
│ │ ├── values-kn/
│ │ │ └── strings.xml
│ │ ├── values-ko/
│ │ │ └── strings.xml
│ │ ├── values-lt/
│ │ │ └── strings.xml
│ │ ├── values-lv/
│ │ │ └── strings.xml
│ │ ├── values-ml/
│ │ │ └── strings.xml
│ │ ├── values-mn/
│ │ │ └── strings.xml
│ │ ├── values-mr/
│ │ │ └── strings.xml
│ │ ├── values-ms/
│ │ │ └── strings.xml
│ │ ├── values-nb/
│ │ │ └── strings.xml
│ │ ├── values-nl/
│ │ │ └── strings.xml
│ │ ├── values-nn/
│ │ │ └── strings.xml
│ │ ├── values-or/
│ │ │ └── strings.xml
│ │ ├── values-pa/
│ │ │ └── strings.xml
│ │ ├── values-pl/
│ │ │ └── strings.xml
│ │ ├── values-pt/
│ │ │ └── strings.xml
│ │ ├── values-pt-rBR/
│ │ │ └── strings.xml
│ │ ├── values-pt-rPT/
│ │ │ └── strings.xml
│ │ ├── values-ro/
│ │ │ └── strings.xml
│ │ ├── values-ru/
│ │ │ └── strings.xml
│ │ ├── values-si/
│ │ │ └── strings.xml
│ │ ├── values-sk/
│ │ │ └── strings.xml
│ │ ├── values-sl/
│ │ │ └── strings.xml
│ │ ├── values-sr/
│ │ │ └── strings.xml
│ │ ├── values-sv/
│ │ │ └── strings.xml
│ │ ├── values-ta/
│ │ │ └── strings.xml
│ │ ├── values-th/
│ │ │ └── strings.xml
│ │ ├── values-tr/
│ │ │ └── strings.xml
│ │ ├── values-uk/
│ │ │ └── strings.xml
│ │ ├── values-ur/
│ │ │ └── strings.xml
│ │ ├── values-uz/
│ │ │ └── strings.xml
│ │ ├── values-vi/
│ │ │ └── strings.xml
│ │ ├── values-zh-rCN/
│ │ │ └── strings.xml
│ │ ├── values-zh-rTW/
│ │ │ └── strings.xml
│ │ └── xml/
│ │ └── provider_paths.xml
│ └── test/
│ └── java/
│ └── com/
│ └── junkfood/
│ └── seal/
│ └── ExampleUnitTest.kt
├── build.gradle.kts
├── buildSrc/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── kotlin/
│ └── Version.kt
├── color/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ └── java/
│ ├── com/
│ │ └── kyant/
│ │ └── monet/
│ │ ├── ColorSpec.kt
│ │ ├── Monet.kt
│ │ ├── PaletteStyle.kt
│ │ └── TonalPalettes.kt
│ └── io/
│ └── material/
│ ├── hct/
│ │ ├── Cam16.kt
│ │ ├── Hct.kt
│ │ ├── HctSolver.kt
│ │ └── ViewingConditions.kt
│ └── utils/
│ ├── ColorUtils.kt
│ ├── MathUtils.kt
│ └── StringUtils.kt
├── fastlane/
│ └── metadata/
│ └── android/
│ ├── ar-SA/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── bn/
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── de-DE/
│ │ ├── changelogs/
│ │ │ ├── 10320.txt
│ │ │ ├── 10330.txt
│ │ │ ├── 10340.txt
│ │ │ └── 10350.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── en-US/
│ │ ├── changelogs/
│ │ │ ├── 10704.txt
│ │ │ ├── 10714.txt
│ │ │ ├── 10724.txt
│ │ │ ├── 10734.txt
│ │ │ ├── 10804.txt
│ │ │ ├── 10814.txt
│ │ │ └── 10824.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── es/
│ │ ├── changelogs/
│ │ │ ├── 10320.txt
│ │ │ ├── 10330.txt
│ │ │ └── 10340.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── fr-FR/
│ │ ├── changelogs/
│ │ │ └── 10350.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── hi/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── hr/
│ │ ├── changelogs/
│ │ │ ├── 10330.txt
│ │ │ └── 10340.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── id/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── it/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── ja/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── ml/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── nb-NO/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── nl-NL/
│ │ ├── changelogs/
│ │ │ └── 10350.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── pt-BR/
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── ru/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── th/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── uk/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── vi/
│ │ ├── changelogs/
│ │ │ └── 10320.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── zh-CN/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ └── zh-TW/
│ ├── changelogs/
│ │ └── 10330.txt
│ ├── full_description.txt
│ ├── short_description.txt
│ └── title.txt
├── gradle/
│ ├── libs.versions.toml
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle.kts
└── translations/
├── README-ar.md
├── README-az.md
├── README-bn.md
├── README-fa.md
├── README-hi.md
├── README-id.md
├── README-it.md
├── README-ja.md
├── README-pt.md
├── README-ru.md
├── README-sr.md
├── README-th.md
├── README-ua.md
├── README-zh_Hans.md
└── README-zh_Hant.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: JunkFood02
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Bug Report
description: Create a report to help us improve
labels: [ bug, new issue ]
body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: |
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of Seal/Yt-dlp:
options:
- label: I'm reporting a bug unrelated to a specific site.
required: false
- label: I've verified that I'm running the [**latest version**](https://github.com/yt-dlp/yt-dlp/releases/latest) of yt-dlp.
required: true
- label: I've verified that I'm running the latest [**stable version**](https://github.com/JunkFood02/Seal/releases/latest/) of Seal or any later [**preview versions**](https://github.com/JunkFood02/Seal/releases).
required: true
- label: I've read the [**Contributing guidelines**](https://github.com/JunkFood02/Seal/blob/main/CONTRIBUTING.md) and [**Code Of Conduct.**](https://github.com/JunkFood02/Seal/blob/main/CODE_OF_CONDUCT.md)
required: true
- label: I've checked that the site i'm trying to download from is in the [**Supported Sites**](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md) list from yt-dlp
required: true
- label: I understand that the issue will be (ignored/closed) if I intentionally remove or skip any mandatory field.
required: true
- type: textarea
attributes:
label: Describe the bug
description:
placeholder: |
A clear and concise description of what the bug is.
validations:
required: false
- type: textarea
attributes:
label: To Reproduce
placeholder: |
Steps to reproduce the behavior:
1.Go to '...'
2.Click on '....'
3.Scroll down to '....'
4.See error
validations:
required: false
- type: textarea
attributes:
label: Error reports
placeholder: |
Click on the displayed error report to copy it.
validations:
required: true
- type: textarea
attributes:
label: Screenshots & Screen Records
placeholder: |
Screenshots & Screen Records can amp up bug reports.
validations:
required: false
- type: textarea
attributes:
label: Additional context
description:
placeholder: |
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
# disable blank issue creation
blank_issues_enabled: false
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: Feature Request
description: Suggest a new feature for the app
labels: [ enhancement, new issue ]
body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: |
Even if you're not sure about the answer, feel free to leave it blank and provide us with more information about this request.
options:
- label: This feature I'm requesting is already implemented in yt-dlp.
required: false
- label: This feature is merely a UI/UX update.
required: false
- label: This feature is suitable for primary users with little knowledge about yt-dlp.
required: false
- label: This feature is available for most websites, not only the video platform I use.
required: false
- label: This feature is suitable for a large variety of videos.
required: false
- label: This feature is not going to conflict with many of the existing options.
required: false
- type: textarea
id: description_1
attributes:
label: Is your feature request related to a problem? Please describe.
description:
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: false
- type: textarea
id: description_2
attributes:
label: Describe the solution you'd like
description:
placeholder: A clear and concise description of what you want to happen.
validations:
required: false
- type: textarea
id: description_3
attributes:
label: Video link
description:
placeholder: Please provide us with a link to the video for which this feature might be beneficial.
validations:
required: false
- type: textarea
id: description_4
attributes:
label: Additional context
description:
placeholder: Add any other context or screenshots about the feature request here.
validations:
required: false
render: shell
================================================
FILE: .github/workflows/Issue-Handler.yaml
================================================
# Name of the GitHub Action
name: Check and Close Issues
# Trigger the action on issue events, specifically when an issue is opened
on:
issues:
types: [opened]
# Job definitions
jobs:
handle-issues:
# Run this job only for issues
if: github.event_name == 'issues'
# Specify the runner environment
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository code
- name: Check out code
uses: actions/checkout@v4
# Step 2: Set up Node.js environment (version 16)
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 16
# Step 3: Custom script to check and close issues
- name: Check and close issues
id: close-issues
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
// Define keywords and labels for issue filtering
const keywordsToCheck = ['instagram', 'facebook', 'twitter', 'HTTP Error 403', 'not a bot'];
const requiredLabel = 'new issue';
const referenceIssueNumber = 1399;
const actionClosedLabel = 'action-closed'; // Unique label to track action-closed issues
// Function to process each issue
async function processIssue(issue) {
const issueBody = issue.body.toLowerCase();
const issueLabels = issue.labels.map(label => label.name);
const wasClosedByAction = issueLabels.includes(actionClosedLabel);
// Determine if the issue should be closed
const shouldCloseIssue = !wasClosedByAction &&
keywordsToCheck.some(keyword => issueBody.includes(keyword)) && issueLabels.includes(requiredLabel);
// Close the issue if it meets the criteria
if (shouldCloseIssue) {
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
state: 'closed'
});
// Add labels and comment to the closed issue
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: ['duplicate', actionClosedLabel]
});
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
name: requiredLabel
});
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: `This issue has been closed and labeled as duplicate. Please see issue #${referenceIssueNumber} for more details. If you believe this is not the case, you can reopen this issue.`
});
}
}
// Process newly opened issues
if (context.payload.action === 'opened') {
await processIssue(context.payload.issue);
}
================================================
FILE: .github/workflows/android.yml
================================================
name: Build Release APK
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- uses: gradle/actions/setup-gradle@v3
- run: gradle assembleRelease
- name: Sign app APK
id: sign_app
uses: ilharp/sign-android-release@nightly
with:
releaseDir: app/build/outputs/apk/release
signingKey: ${{ secrets.SIGNING_KEY }}
keyAlias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: signed-apks
path: app/build/outputs/apk/release/*-arm64-v8a-release-signed.apk
if-no-files-found: error
retention-days: 20
================================================
FILE: .github/workflows/android_ci.yml
================================================
name: Android CI
on:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- uses: gradle/actions/setup-gradle@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew buildGenericRelease
================================================
FILE: .github/workflows/close-stale-issues.yml
================================================
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '0 0 1 * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
days-before-stale: 90
days-before-close: 30
================================================
FILE: .github/workflows/sponsor.yml
================================================
name: Generate Sponsors README
on:
workflow_dispatch:
schedule:
- cron: 30 15 25 * *
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.repository == 'JunkFood02/Seal' }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Generate Sponsors 💖
uses: JamesIves/github-sponsors-readme-action@v1
with:
token: ${{ secrets.PAT }}
file: 'README.md'
minimum: 500
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: main
token: ${{ secrets.PAT }}
folder: '.'
commit-message: 'docs(readme): update sponsor info'
================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
/.idea/deploymentTargetDropDown.xml
/.idea/shelf
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
/keystore.properties
.kotlin
================================================
FILE: .idea/AndroidProjectSystem.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
</component>
</project>
================================================
FILE: .idea/appInsightsSettings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AppInsightsSettings">
<option name="tabSettings">
<map>
<entry key="Firebase Crashlytics">
<value>
<InsightsFilterSettings>
<option name="connection">
<ConnectionSetting>
<option name="appId" value="PLACEHOLDER" />
<option name="mobileSdkAppId" value="" />
<option name="projectId" value="" />
<option name="projectNumber" value="" />
</ConnectionSetting>
</option>
<option name="signal" value="SIGNAL_UNSPECIFIED" />
<option name="timeIntervalDays" value="THIRTY_DAYS" />
<option name="visibilityType" value="ALL" />
</InsightsFilterSettings>
</value>
</entry>
</map>
</option>
</component>
</project>
================================================
FILE: .idea/codeStyles/Project.xml
================================================
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>
================================================
FILE: .idea/codeStyles/codeStyleConfig.xml
================================================
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
================================================
FILE: .idea/compiler.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8">
<module name="Seal.app" target="21" />
<module name="Seal.buildSrc" target="21" />
<module name="Seal.buildSrc.main" target="21" />
<module name="Seal.buildSrc.test" target="21" />
</bytecodeTargetLevel>
</component>
</project>
================================================
FILE: .idea/deploymentTargetSelector.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-10-08T21:31:16.287350Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="PhysicalDevice" identifier="serial=29091FDH3007P1" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
<SelectionState runConfigName="BottomBarPreview">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="DownloadPagePreview">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-10-04T15:47:27.481595Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=/Users/junkfood/.android/avd/Resizable_Experimental_API_VanillaIceCream.avd" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
<SelectionState runConfigName="Preview">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="Preview - Light">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-10-07T18:32:33.710498Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=/Users/junkfood/.android/avd/Resizable_Experimental_API_VanillaIceCream.avd" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
<SelectionState runConfigName="SheetPreview - Dark">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>
================================================
FILE: .idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<compositeConfiguration>
<compositeBuild compositeDefinitionSource="SCRIPT">
<builds>
<build path="$PROJECT_DIR$/buildSrc" name="buildSrc">
<projects>
<project path="$PROJECT_DIR$/buildSrc" />
</projects>
</build>
</builds>
</compositeBuild>
</compositeConfiguration>
<option name="testRunner" value="CHOOSE_PER_TEST" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/buildSrc" />
<option value="$PROJECT_DIR$/color" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
================================================
FILE: .idea/inspectionProfiles/Project_Default.xml
================================================
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewDeviceShouldUseNewSpec" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool>
</profile>
</component>
================================================
FILE: .idea/kotlinc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="2.0.20" />
</component>
</project>
================================================
FILE: .idea/ktfmt.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KtfmtSettings">
<option name="enableKtfmt" value="Enabled" />
<option name="enabled" value="true" />
<option name="uiFormatterStyle" value="Kotlinlang" />
</component>
</project>
================================================
FILE: .idea/migrations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>
================================================
FILE: .idea/misc.xml
================================================
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../../../layout/compose-model-1651485741994.xml" value="0.9422382671480144" />
<entry key="../../../../layout/compose-model-1651732459930.xml" value="0.22314814814814815" />
<entry key="../../../../layout/compose-model-1651739120146.xml" value="0.1787037037037037" />
<entry key="../../../../layout/compose-model-1651828828315.xml" value="0.25" />
<entry key="app/src/main/java/com/junkfood/seal/ui/page/download/DownloadPage.kt" value="0.375" />
<entry key="app/src/main/java/com/junkfood/seal/ui/page/download/PlaylistSelectionDialog.kt" value="0.27954545454545454" />
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.1" />
<entry key="app/src/main/res/drawable/ic_dashboard_black_24dp.xml" value="0.1" />
<entry key="app/src/main/res/drawable/ic_home_black_24dp.xml" value="0.1" />
<entry key="app/src/main/res/drawable/ic_launcher_background.xml" value="0.1" />
<entry key="app/src/main/res/drawable/ic_launcher_foreground.xml" value="0.1" />
<entry key="app/src/main/res/drawable/ic_notifications_black_24dp.xml" value="0.1" />
<entry key="app/src/main/res/drawable/seal.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.19653727213541666" />
<entry key="app/src/main/res/layout/activity_settings.xml" value="0.22135416666666666" />
<entry key="app/src/main/res/layout/content_scrolling.xml" value="0.20729166666666668" />
<entry key="app/src/main/res/layout/fragment_home.xml" value="0.23585510253906253" />
<entry key="app/src/main/res/layout/fragment_notifications.xml" value="0.1" />
<entry key="app/src/main/res/layout/fragment_settings.xml" value="0.3098958333333333" />
<entry key="app/src/main/res/layout/fragment_settings_list.xml" value="0.32135416666666666" />
<entry key="app/src/main/res/menu/settings_toolbar.xml" value="0.22135416666666666" />
<entry key="app/src/main/res/menu/toolbar.xml" value="2.125" />
<entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.223" />
<entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.1" />
<entry key="app/src/main/res/xml/root_preferences.xml" value="0.3098958333333333" />
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
================================================
FILE: .idea/other.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="direct_access_persist.xml">
<option name="selectedCloudProject" />
</component>
</project>
================================================
FILE: .idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>
================================================
FILE: .idea/studiobot.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="StudioBotProjectSettings">
<option name="shareContext" value="OptedIn" />
</component>
</project>
================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes (starting from v1.7.3) to stable releases will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.0][2.0.0] - unreleased
### Notable changes from v1.13
- Concurrent downloading
- Download queue
- User interface overhaul
- Large screen support
- Resume failed/canceled download
- Backup & restore unfinished tasks in the download queue
- Select from formats/playlists in Quick Download
- Predictive back animation support for Android 14+
- Bump up minimum API level to 24 (Android 7.0)
## [v1.13.0][1.13.0] - 2024-08-18
### Fixed
- Fix the issue where exported command templates could not be imported in v1.12.x
- Fix an unexpected behavior where multiple formats would be selected
### Change
- Update `youtubedl-android` to v0.16.1
- Update translations
## [v1.12.1][1.12.1] - 2024-04-17
### Added
* Add auto update interval for yt-dlp
* Cookies page now shows the current count of cookies stored in the database
### Fixed
* Intercept non-HTTP(s) URLs opened in WebView
* Videos are remuxed to mkv even when download subtitle is disabled
* Use MD2 ModalBottomSheetLayout in devices on API < 30
* Block downloads when updating yt-dlp
### Known issues
* TextFields(IME) fallback to plain character mode when showing a ModalBottomSheet
* yt-dlp might be broken if you tried to download something while it was
updating (`bad local file header`). To fix it, you just need to update yt-dlp again
## [v1.12.0][1.12.0] - 2024-04-05
### Added
* Search from download history
* Search from subtitles in format selection page
* Export download history to file/clipboard
* Import download history from file/clipboard
* Re-download unavailable videos
* Download auto-translated subtitles
* Remember subtitle selection for next downloads
* Remux videos into mkv container for better compatibility
* Configuration for not using the download type in the last download
* Improve UI/UX for download error handling
* Add splash screen
* Haptic feedback BZZZTT!!1!
### Changed
* Long pressing on an item in download history now selects it
* Use nightly builds for yt-dlp by default
* Migrate `Slider` & `ProgressIndicator` to the new visual styles in MD3
* Use default display name from system for locales
* Metadata of videos is also embedded in the files now
* A few UI changes that I forgot
### Fixed
* Fix a permission issue when using Seal in a different user profile or private space
* Fix an issue where the text cannot be copied in the menu of the download history
* Display approximate file size for formats when there's no exact value available
* Fix an issue causes app to crash when the selected template is not available
* Custom command now ignore empty URLs, which means you can insert URLs along with arguments in
command templates
* Fix an issue where some formats may be unavailable when downloading playlists
### Known issues
* TextFields(IME) fallback to plain character mode when showing a ModalBottomSheet
* ModalBottomSheet handles insets incorrectly on devices below API 30
## [v1.11.3][1.11.3] - 2024-01-22
### Added
* Merge multiple audio streams into a single file
* Allow downloading with cellular network temporarily
### Fixed
* App creates duplicated command templates on initialization
* Cannot make video clip in FormatPage
## [v1.11.2][1.11.2] - 2024-01-06
### Added
* Keep subtitles files after embedding into videos
* Force all connections via ipv4
* Prefer vp9.2 if av1 hardware decoding unavailable
* Add system locale settings for Android 13+
### Fixed
* User agent gets enabled when refreshing cookies
* Restrict filenames not working in custom commands
### Changed
* Transition animation should look more smooth now
## [v1.11.1][1.11.1] - 2023-12-16
### Added
* Add `--restrict-filenames` option in yt-dlp
* Add playlist title as an option for subdirectory
* Add more thanks to sponsors
### Fixed
* Fix some minor UI bugs
* Fix an issue causing error when parsing video info
## [v1.11.0][1.11.0] - 2023-11-18
### Added
* Custom output template (`-o` option in yt-dlp)
* Export cookies to a text file
* Make embed metadata in audio files optional
* Add the ability to record download archive, and skip duplicate downloads
* Add cancel button to the download page
* Add input chips for sponsorblock categories
* Add subtitle selection dialog in format page, make auto-translated subtitles available in subtitle
selection
* Add more thanks to sponsors
### Changed
* Move the directory for storing temporary files to external storage (`Seal/tmp`)
* Change the default output template to `%(title)s.%(ext)s`
* Temporary directory now are enabled by default for downloads in general mode
* Move actions in format page to dropdown menu
* Download subtitles are now available when downloading audio files
* `android:enableOnBackInvokedCallback` is changed to `false` due to compatibility issues
### Fixed
* Fix an issue causes sharing videos to fail on certain devices
* Fix an issue causes uploader marked as null, make uploader_id as a fallback to uploader
* Fix an issue when a user performs multiple clicks causing duplicate navigating behaviors
### Removed
* Custom prefix for output template has been removed, please migrate to custom output template
## [v1.10.0][1.10.0] - 2023-08-30
### Added
**Subtitles**
* Convert subtitles to another format
* Select subtitle language in format selection
**Format selection**
* Display icons(video/audio) on `FormatItem`s
* Split video by chapters
* Select subtitle to download by language names/codes
**Custom commands**
* Create custom command tasks in the Running Tasks page
* Configure download directory separately for custom command tasks
* Select multiple command templates to export & remove
**Cookies**
* Add `CookiesQuickSettingsDialog` for refreshing & configuring cookies in configuration menu
* Add user agent header when downloading with cookies enabled
**Other New Features & UI Improvements**
* Show `PlainToolTip` when long-press on `PlaylistItem`
* Add monochrome theme
* Add proxy configuration for network connections
* Add translations in Swedish and Portuguese
### Fixed
* App crashes when being opened in the system share sheet
* Video not shown in YouTube playlist results
* Cookies cannot be disabled after clearing cookies
* Hide video only formats when save as audio enabled
* Parsing error with decimal value in width/height
* Audio codec preference not works as expected
* Could not fetch video info when `originalUrl` is null
### Changed
**Notable Changes**
* Upgrade target API level to 34 (Android 14)
* Preferred video format changed to two options: Legacy and Quality
* UI improvements to the configuration dialog
**Other Changes**
* Update `ColorScheme`s and components to reflect the new MD3 color roles
* Update youtubedl-android version, added pycryptodomex to the library
* Move Video formats to the bottom of the `FormatPage`
* Notifications now are enabled by default
* Minor UI improvements & changes
## [v1.9.2][1.9.2] - 2023-04-27
### Fixed
* Fix a bug causing Incognito mode not working in v1.9.1
* Fix misplaced quality tags in `AudioQuickSettingsDialog`
* Fix mismatched formats when using Save as audio & Download playlist
## [v1.9.1][1.9.1] - 2023-04-11
### Added
* Add Sponsor page: You can now support this app by sponsoring on GitHub!
### Fixed
* Fix a bug causing warnings not shown in logs of completed custom command tasks
* Fix a bug causing videos not scanned into media library when private mode is enabled
### Changed
* Move the directory for temporary files to `cacheDir`
## [v1.9.0][1.9.0] - 2023-03-12
### Added
* Add Preview channel for auto-updating
* Add an option to update to Nightly builds of yt-dlp
* Add a dialog for F-Droid builds in auto-update settings
* Add a switch for auto-updating yt-dlp
* Add the ability to share files in `VideoDetailDrawer`
* Add a badge to the icon to indicate the count of running processes
* Add a switch for disabling the temporary directory
* Add format & quality preference for audio
* Add custom format sorter
* Add the ability to clip video and audio in `FormatSelectionPage` (experimental)
* Add the ability to edit video titles in `FormatSelectionPage` before downloading
* Add the ability to share the thumbnail url in `FormatSelectionPage`
* Implement a new method to extract cookies from the `WebView` database
### Changed
- Change the operation of open link to long pressing the link button in `VideoDetailDrawer`
- Change the thread number range of multi-threaded download to 1-24
- Change the status bar icon to filled icon
- Change the quick settings for media format in the configuration dialog
### Fixed
- Fix a bug causing high-quality audio not downloaded with YT Premium cookies & YT Music URLs
- UI bug in `ShortcutChip` with long template
- Fix a bug causing empty subtitle language breaks downloads
- Fix an issue causing specific languages not visible in system settings on Android 13+
- Fix a UI bug in the format selection page
- Fix a bug causing app to crash when toasting in Android 5.0
- Fix a UI bug causing LTR texts to display incorrectly in RTL locale environment
- Add legacy app icon for API 21~25
### Known issues
- Cookies may not work as expected in some devices, please try to re-generate cookies after this
occurs. File an issue on GitHub with your device info when experience errors.
## [v1.8.2][1.8.2] - 2023-02-10
### Fixed
- Trimmed ASCII characters filename
- Unexpected error when downloading multiple video to SD card with quick download
- Error when cropping vertical thumbnails as artwork
- ID conflicts when importing custom templates
### Changed
- Add `horizontalScroll` to `LogPage`
- Revert the URL intent filters
## [v1.8.1][1.8.1] - 2023-02-01
### Fixed
- App crashes when downloading in private mode
- Unexpected ImeActions in TextFields
- Disable SD card download when the directory is not set
- Localized strings for file size texts
## [v1.8.0][1.8.0] - 2023-01-29
### Added
- Download to SD card
- Quick download in parallel
- Task dashboard & log page for custom commands
- Custom shortcuts for command templates
- Subtitle preferences
- Apply `--embed-chapters` for video downloads by default
- New color schemes for UI theming
### Changed
- New transition animation between destinations
- Change `minSdkVersion` to 21 (Android 5.0)
- Accessibility improvements to components
- Revert playlist items limit in v1.7.3
- Scan the download directory to the system media library after running commands
- Change the LongClick operations of `FormatItem` to share the stream URLs
## [v1.7.3][1.7.3] - 2023-01-10
### Fixed
- `Webview` captures Cookies from wrong domains
- Notifications of custom commands remain unfinished status
- App crashes when fails to parse video info for format selection
- App crashes when parsing channel info for playlist download
### Added
- Tips about streams merging in `FormatSelectionPage`
### Changed
- Playlist results are limited to 200 videos
[1.7.3]: https://github.com/JunkFood02/Seal/releases/tag/v1.7.3
[1.8.0]: https://github.com/JunkFood02/Seal/releases/tag/v1.8.0
[1.8.1]: https://github.com/JunkFood02/Seal/releases/tag/v1.8.1
[1.8.2]: https://github.com/JunkFood02/Seal/releases/tag/v1.8.2
[1.9.0]: https://github.com/JunkFood02/Seal/releases/tag/v1.9.0
[1.9.1]: https://github.com/JunkFood02/Seal/releases/tag/v1.9.1
[1.9.2]: https://github.com/JunkFood02/Seal/releases/tag/v1.9.2
[1.10.0]: https://github.com/JunkFood02/Seal/releases/tag/v1.10.0
[1.11.0]: https://github.com/JunkFood02/Seal/releases/tag/v1.11.0
[1.11.1]: https://github.com/JunkFood02/Seal/releases/tag/v1.11.1
[1.11.2]: https://github.com/JunkFood02/Seal/releases/tag/v1.11.2
[1.11.3]: https://github.com/JunkFood02/Seal/releases/tag/v1.11.3
[1.12.0]: https://github.com/JunkFood02/Seal/releases/tag/v1.12.0
[1.12.1]: https://github.com/JunkFood02/Seal/releases/tag/v1.12.1
[1.13.0]: https://github.com/JunkFood02/Seal/releases/tag/v1.13.0
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
junkfood02@proton.me.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
Before reading, you may know what [yt-dlp](https://github.com/yt-dlp/yt-dlp) is and what it does. In short, it's a CLI (Command Line Interface) program written in python, which lets you download videos from [1000+ websites](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md).
For bug reports and feature requests, please search in issues first (including the closed ones). If there're no duplicates, feel free to [submit an issue](https://github.com/JunkFood02/Seal/issues/new) with an issue template.
**We'll probably ignore and close your issue if it's not using the existing templates or doesn't contain sufficient description.**
For questions or any other ideas to improve, you can join our official [Telegram group](https://t.me/seal_app_group) or [Matrix space](https://matrix.to/#/#seal-space:matrix.org).
## Disclaimer
This is a toy project I use to learn Android development. Please do not have any expectations or assumptions about the quality of the code.
## Bug Report
When submitting a bug report, please make sure your issue contains **enough** information for reproducing the problem, including the options or the custom command being used, the link to the video, and other fields in the issue template.
## Feature Request
Seal is and will remain a simple GUI for yt-dlp, providing most of the functionality of yt-dlp as is, without modifications. Thus, **we'll not take requests for features that yt-dlp does not support.**
The app has two download modes:
- General mode: Save as audio, download playlist, and many other options that can be used individually or combined for normal download tasks. Once the download is complete, Seal will scan the files into the system media library, and store them in the download history.
- Custom command mode: For advanced usage of yt-dlp, a user can create and store multiple command templates in the app, then select and use one of them directly to execute the yt-dlp command like in a terminal. In this mode, all of the GUI options and features in the general mode will be disabled.
Since most of the functions can be implemented in custom command mode, the "feature request" would be treated as adding a shortcut to the general mode. However, not all feature requests will be accepted and implemented in the app. [Why not add an option for that?](https://neugierig.org/software/blog/2018/07/options.html)
## Pull Request
If you wish to contribute to the project by submitting code directly, please first leave a comment under the relevant issue or file a new issue, describe the changes you are about to make.
To avoid multiple pull requests resolving the same issue, let others know you are working on it by saying so in a comment, or ask the issue to be assigned to yourself.
## New contributors
Scan through our [existing issues](https://github.com/JunkFood02/Seal/issues) to find one that interests you. The [👋 good first issue](https://github.com/JunkFood02/Seal/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) is a good place to start exploring issues that are up-for-grab for newcomers. (Do not hesitate to ask for more details or clarifying questions on the issue!)
## Building From Source
Fork this project, import and compile it with the latest version of [Android Studio Canary](https://developer.android.com/studio/preview).
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
<div align="center">
<img width="" src="fastlane/metadata/android/en-US/images/icon.png" width=160 height=160 align="center">
# Seal
### Video/Audio Downloader for Android
English
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-zh_Hans.md">简体中文</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-zh_Hant.md">繁體中文</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-ar.md">العربية</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-pt.md">Portuguese</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-ua.md">Українська</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-th.md">ภาษาไทย</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-fa.md">فارسی</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-it.md">Italiano</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-az.md">Azərbaycanca</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-ru.md">Русский</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-sr.md">Српски</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-ja.md">日本語</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-id.md">Indonesia</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-hi.md">हिंदी</a>
|
<a href="https://github.com/JunkFood02/Seal/blob/main/translations/README-bn.md">বাংলা</a>
[](https://f-droid.org/en/packages/com.junkfood.seal)
[](https://github.com/JunkFood02/Seal/releases/latest/)
[](https://github.com/JunkFood02/Seal/releases/)
[](https://github.com/JunkFood02/Seal/blob/main/CHANGELOG.md)
[](https://github.com/JunkFood02/Seal/releases/)
[](https://github.com/JunkFood02/Seal/stargazers)
[](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)
[](https://t.me/seal_app)
[
](https://matrix.to/#/#seal-space:matrix.org)
</div>
## 📱 Screenshots
<div align="center">
<div>
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/4.jpg" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/7.jpg" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/8.jpg" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/9.jpg" width="30%" />
</div>
</div>
<br>
## 📖 Features
- Download videos and audio files from video platforms supported by [yt-dlp](https://github.com/yt-dlp/yt-dlp) (formerly youtube-dl).
- Embed metadata and video thumbnail into extracted audio files supported by [mutagen](https://github.com/quodlibet/mutagen).
- Download all videos in the playlist with one click.
- Use embedded [aria2c](https://github.com/aria2/aria2) as external downloader for all your downloads.
- Embed subtitles into the downloaded videos.
- Execute custom yt-dlp commands with templates.
- Manage in-app downloads and custom command templates.
- Easy to use and user-friendly.
- [Material Design 3](https://m3.material.io/) style UI, with dynamic color theme.
- MAD: UI and logic written with pure Kotlin. Single activity, no fragments, only composable destinations.
## ⬇️ Download
For most devices, it is recommended to install the **arm64-v8a** version of the apks
- Download the latest stable version from [GitHub releases](https://github.com/JunkFood02/Seal/releases/latest)
- Install the [pre-release](https://github.com/JunkFood02/Seal/releases/) versions to help us test out new features & changes
- Stable releases are also available on [F-Droid](https://f-droid.org/packages/com.junkfood.seal/)
<!-- [<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
height="70">](https://f-droid.org/packages/com.junkfood.seal/) -->
## 💬 Contact
Join our [Telegram Channel](https://t.me/seal_app) or [Matrix Space](https://matrix.to/#/#seal-space:matrix.org) for discussion, announcements, and releases!
## 💖 Sponsors
<p><!-- sponsors --><a href="https://github.com/Cook-I-T"><img src="https://github.com/Cook-I-T.png" width="60px" alt="User avatar: Cook I.T!" /></a><a href="https://github.com/reallyrealcolby"><img src="https://github.com/reallyrealcolby.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/abelladianne458-gif"><img src="https://github.com/abelladianne458-gif.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/agusterodin"><img src="https://github.com/agusterodin.png" width="60px" alt="User avatar: Jeff Rosen" /></a><!-- sponsors --></p>
Seal will be always free and open source for everyone. If you like it, please consider [sponsoring me](https://github.com/sponsors/JunkFood02)!
## 🤝 Contributing
Contributions are welcome!
You can help translate Seal on [Hosted Weblate](https://hosted.weblate.org/projects/seal/).
[](https://hosted.weblate.org/engage/seal/)
>[!Note]
>
>For submitting bug reports, feature requests, questions, or any other ideas to improve, please read [CONTRIBUTING.md](https://github.com/JunkFood02/Seal/blob/main/CONTRIBUTING.md) for instructions and guidelines first.
## ⭐️ Star History
[](https://star-history.com/#JunkFood02/Seal&Timeline)
## 🧱 Credits
Seal is a simple GUI of [yt-dlp](https://github.com/yt-dlp/yt-dlp), based on [youtubedl-android](https://github.com/yausername/youtubedl-android)
Some of the UI designs and codes are borrowed from [Read You](https://github.com/Ashinch/ReadYou) and [Music You](https://github.com/Kyant0/MusicYou)
[dvd](https://github.com/yausername/dvd)
[Material color utilities](https://github.com/material-foundation/material-color-utilities)
[Monet](https://github.com/Kyant0/Monet)
## 📃 License
[](https://github.com/JunkFood02/Seal/blob/main/LICENSE)
>[!Warning]
>
>Except for the source code licensed under the GPLv3 license,
>all other parties are prohibited from using Seal's name as a downloader app,
>and the same is true for Seal's derivatives.
>Derivatives include but are not limited to forks and unofficial builds.
<div align="right">
<table><td>
<a href="#start-of-content">👆 Scroll to top</a>
</td></table>
</div>
================================================
FILE: app/.gitignore
================================================
/build
================================================
FILE: app/build.gradle.kts
================================================
@file:Suppress("UnstableApiUsage")
import com.android.build.api.variant.FilterConfiguration
import java.io.FileInputStream
import java.util.Properties
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.ksp)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.room)
alias(libs.plugins.ktfmt.gradle)
}
val keystorePropertiesFile: File = rootProject.file("keystore.properties")
val splitApks = !project.hasProperty("noSplits")
val abiFilterList = (properties["ABI_FILTERS"] as String).split(';')
val abiCodes = mapOf("armeabi-v7a" to 1, "arm64-v8a" to 2, "x86" to 3, "x86_64" to 4)
val baseVersionName = currentVersion.name
val currentVersionCode = currentVersion.code.toInt()
android {
compileSdk = 35
if (keystorePropertiesFile.exists()) {
val keystoreProperties = Properties()
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
signingConfigs {
create("githubPublish") {
keyAlias = keystoreProperties["keyAlias"].toString()
keyPassword = keystoreProperties["keyPassword"].toString()
storeFile = file(keystoreProperties["storeFile"]!!)
storePassword = keystoreProperties["storePassword"].toString()
}
}
}
buildFeatures { buildConfig = true }
defaultConfig {
applicationId = "com.junkfood.seal"
minSdk = 24
targetSdk = 35
versionCode = 200_000_150
check(versionCode == currentVersionCode)
versionName = baseVersionName
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { useSupportLibrary = true }
if (splitApks) {
splits {
abi {
isEnable = true
reset()
include("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
isUniversalApk = true
}
}
} else {
ndk { abiFilters.addAll(abiFilterList) }
}
}
room { schemaDirectory("$projectDir/schemas") }
ksp { arg("room.incremental", "true") }
androidComponents {
onVariants { variant ->
variant.outputs.forEach { output ->
val name =
if (splitApks) {
output.filters
.find { it.filterType == FilterConfiguration.FilterType.ABI }
?.identifier
} else {
abiFilterList.firstOrNull()
}
val baseAbiCode = abiCodes[name]
if (baseAbiCode != null) {
output.versionCode.set(baseAbiCode + (output.versionCode.get() ?: 0))
}
}
}
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
if (keystorePropertiesFile.exists()) {
signingConfig = signingConfigs.getByName("githubPublish")
}
}
debug {
if (keystorePropertiesFile.exists()) {
signingConfig = signingConfigs.getByName("githubPublish")
}
applicationIdSuffix = ".debug"
versionNameSuffix = "-debug"
resValue("string", "app_name", "Seal Debug")
}
}
flavorDimensions += "publishChannel"
productFlavors {
create("generic") {
dimension = "publishChannel"
isDefault = true
}
create("githubPreview") {
dimension = "publishChannel"
applicationIdSuffix = ".preview"
resValue("string", "app_name", "Seal Preview")
}
create("fdroid") {
dimension = "publishChannel"
versionName = "$baseVersionName-(F-Droid)"
}
}
lint { disable.addAll(listOf("MissingTranslation", "ExtraTranslation", "MissingQuantity")) }
applicationVariants.all {
outputs.all {
(this as com.android.build.gradle.internal.api.BaseVariantOutputImpl).outputFileName =
"Seal-${defaultConfig.versionName}-${name}.apk"
}
}
kotlinOptions { freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn" }
packaging {
resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" }
jniLibs.useLegacyPackaging = true
}
androidResources { generateLocaleConfig = true }
namespace = "com.junkfood.seal"
}
ktfmt { kotlinLangStyle() }
kotlin { jvmToolchain(21) }
dependencies {
implementation(project(":color"))
implementation(libs.bundles.core)
implementation(libs.androidx.lifecycle.runtimeCompose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.bundles.androidxCompose)
implementation(libs.bundles.accompanist)
implementation(libs.coil.kt.compose)
implementation(libs.kotlinx.serialization.json)
implementation(libs.koin.android)
implementation(libs.koin.compose)
implementation(libs.room.runtime)
implementation(libs.room.ktx)
ksp(libs.room.compiler)
implementation(libs.okhttp)
implementation(libs.bundles.youtubedlAndroid)
implementation(libs.mmkv)
testImplementation(libs.junit4)
androidTestImplementation(libs.androidx.test.ext)
androidTestImplementation(libs.androidx.test.espresso.core)
implementation(libs.androidx.compose.ui.tooling)
}
================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#noinspection ShrinkerUnresolvedReference
-dontobfuscate
-keep class com.yausername.** { *; }
-keep class org.apache.commons.compress.archivers.zip.** { *; }
# Keep `Companion` object fields of serializable classes.
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}
# Keep `serializer()` on companion objects (both default and named) of serializable classes.
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}
# Keep `INSTANCE.serializer()` of serializable objects.
-if @kotlinx.serialization.Serializable class ** {
public static ** INSTANCE;
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}
# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
# Serializer for classes with named companion objects are retrieved using `getDeclaredClasses`.
# If you have any, uncomment and replace classes with those containing named companion objects.
#-keepattributes InnerClasses # Needed for `getDeclaredClasses`.
#-if @kotlinx.serialization.Serializable class
#com.example.myapplication.HasNamedCompanion, # <-- List serializable classes with named companions.
#com.example.myapplication.HasNamedCompanion2
#{
# static **$* *;
#}
#-keepnames class <1>$$serializer { # -keepnames suffices; class is kept when serializer() is kept.
# static <1>$$serializer INSTANCE;
#}
================================================
FILE: app/schemas/com.junkfood.seal.database.AppDatabase/1.json
================================================
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "988509a71f29b1a28b60e346980acccb",
"entities": [
{
"tableName": "DownloadedVideoInfo",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `videoTitle` TEXT NOT NULL, `videoAuthor` TEXT NOT NULL, `videoUrl` TEXT NOT NULL, `thumbnailUrl` TEXT NOT NULL, `videoPath` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "videoTitle",
"columnName": "videoTitle",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoAuthor",
"columnName": "videoAuthor",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoUrl",
"columnName": "videoUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "thumbnailUrl",
"columnName": "thumbnailUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoPath",
"columnName": "videoPath",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '988509a71f29b1a28b60e346980acccb')"
]
}
}
================================================
FILE: app/schemas/com.junkfood.seal.database.AppDatabase/2.json
================================================
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "4af4e9805a6d4977cdf27c8cb419c965",
"entities": [
{
"tableName": "DownloadedVideoInfo",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `videoTitle` TEXT NOT NULL, `videoAuthor` TEXT NOT NULL, `videoUrl` TEXT NOT NULL, `thumbnailUrl` TEXT NOT NULL, `videoPath` TEXT NOT NULL, `extractor` TEXT NOT NULL DEFAULT 'Unknown')",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "videoTitle",
"columnName": "videoTitle",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoAuthor",
"columnName": "videoAuthor",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoUrl",
"columnName": "videoUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "thumbnailUrl",
"columnName": "thumbnailUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoPath",
"columnName": "videoPath",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "extractor",
"columnName": "extractor",
"affinity": "TEXT",
"notNull": true,
"defaultValue": "'Unknown'"
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '4af4e9805a6d4977cdf27c8cb419c965')"
]
}
}
================================================
FILE: app/schemas/com.junkfood.seal.database.AppDatabase/3.json
================================================
{
"formatVersion": 1,
"database": {
"version": 3,
"identityHash": "63b1cd29253fd3dd9060188d793fa8d3",
"entities": [
{
"tableName": "DownloadedVideoInfo",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `videoTitle` TEXT NOT NULL, `videoAuthor` TEXT NOT NULL, `videoUrl` TEXT NOT NULL, `thumbnailUrl` TEXT NOT NULL, `videoPath` TEXT NOT NULL, `extractor` TEXT NOT NULL DEFAULT 'Unknown')",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "videoTitle",
"columnName": "videoTitle",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoAuthor",
"columnName": "videoAuthor",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoUrl",
"columnName": "videoUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "thumbnailUrl",
"columnName": "thumbnailUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoPath",
"columnName": "videoPath",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "extractor",
"columnName": "extractor",
"affinity": "TEXT",
"notNull": true,
"defaultValue": "'Unknown'"
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "CommandTemplate",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `template` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "template",
"columnName": "template",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '63b1cd29253fd3dd9060188d793fa8d3')"
]
}
}
================================================
FILE: app/schemas/com.junkfood.seal.database.AppDatabase/4.json
================================================
{
"formatVersion": 1,
"database": {
"version": 4,
"identityHash": "d049bb757be0d1c233c7ec34bfde51dc",
"entities": [
{
"tableName": "DownloadedVideoInfo",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `videoTitle` TEXT NOT NULL, `videoAuthor` TEXT NOT NULL, `videoUrl` TEXT NOT NULL, `thumbnailUrl` TEXT NOT NULL, `videoPath` TEXT NOT NULL, `extractor` TEXT NOT NULL DEFAULT 'Unknown')",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "videoTitle",
"columnName": "videoTitle",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoAuthor",
"columnName": "videoAuthor",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoUrl",
"columnName": "videoUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "thumbnailUrl",
"columnName": "thumbnailUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoPath",
"columnName": "videoPath",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "extractor",
"columnName": "extractor",
"affinity": "TEXT",
"notNull": true,
"defaultValue": "'Unknown'"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "CommandTemplate",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `template` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "template",
"columnName": "template",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "CookieProfile",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `url` TEXT NOT NULL, `content` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd049bb757be0d1c233c7ec34bfde51dc')"
]
}
}
================================================
FILE: app/schemas/com.junkfood.seal.database.AppDatabase/5.json
================================================
{
"formatVersion": 1,
"database": {
"version": 5,
"identityHash": "5eab3a1c93713521f1197fa2e2903231",
"entities": [
{
"tableName": "DownloadedVideoInfo",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `videoTitle` TEXT NOT NULL, `videoAuthor` TEXT NOT NULL, `videoUrl` TEXT NOT NULL, `thumbnailUrl` TEXT NOT NULL, `videoPath` TEXT NOT NULL, `extractor` TEXT NOT NULL DEFAULT 'Unknown')",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "videoTitle",
"columnName": "videoTitle",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoAuthor",
"columnName": "videoAuthor",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoUrl",
"columnName": "videoUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "thumbnailUrl",
"columnName": "thumbnailUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoPath",
"columnName": "videoPath",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "extractor",
"columnName": "extractor",
"affinity": "TEXT",
"notNull": true,
"defaultValue": "'Unknown'"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "CommandTemplate",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `template` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "template",
"columnName": "template",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "CookieProfile",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `url` TEXT NOT NULL, `content` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "OptionShortcut",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `option` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "option",
"columnName": "option",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5eab3a1c93713521f1197fa2e2903231')"
]
}
}
================================================
FILE: app/src/androidTest/java/com/junkfood/seal/ExampleInstrumentedTest.kt
================================================
package com.junkfood.seal
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.*
import org.junit.Test
import org.junit.runner.RunWith
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.junkfood.Seal", appContext.packageName)
}
}
================================================
FILE: app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission
android:name="android.permission.POST_NOTIFICATIONS"
android:minSdkVersion="33" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
</queries>
<application
android:name=".App"
android:allowBackup="true"
android:enableOnBackInvokedCallback="true"
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
tools:targetApi="tiramisu">
<activity
android:name=".CrashReportActivity"
android:exported="false"
android:label="CrashReportActivity"
android:theme="@style/Theme.Seal" />
<activity
android:name=".QuickDownloadActivity"
android:excludeFromRecents="true"
android:exported="true"
android:label="@string/title_activity_share"
android:launchMode="singleInstance"
android:theme="@style/Theme.Seal.Dialog">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
</intent-filter>
</activity>
<service
android:name=".DownloadService"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="specialUse" />
<activity
android:name=".MainActivity"
android:configChanges="orientation"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="unspecified"
android:theme="@style/Theme.Seal">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:mimeType="video/*" />
<data android:mimeType="audio/*" />
</intent-filter>
</activity>
<service
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
android:enabled="false"
android:exported="false">
<meta-data
android:name="autoStoreLocales"
android:value="true" />
</service>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<receiver android:name=".NotificationActionReceiver" />
</application>
</manifest>
================================================
FILE: app/src/main/java/com/junkfood/seal/App.kt
================================================
package com.junkfood.seal
import android.annotation.SuppressLint
import android.app.Application
import android.content.ClipboardManager
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.ServiceConnection
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.net.ConnectivityManager
import android.net.Uri
import android.os.Build
import android.os.IBinder
import androidx.core.content.getSystemService
import com.google.android.material.color.DynamicColors
import com.junkfood.seal.download.DownloaderV2
import com.junkfood.seal.download.DownloaderV2Impl
import com.junkfood.seal.ui.page.download.HomePageViewModel
import com.junkfood.seal.ui.page.downloadv2.configure.DownloadDialogViewModel
import com.junkfood.seal.ui.page.settings.directory.Directory
import com.junkfood.seal.ui.page.settings.network.CookiesViewModel
import com.junkfood.seal.ui.page.videolist.VideoListViewModel
import com.junkfood.seal.util.AUDIO_DIRECTORY
import com.junkfood.seal.util.COMMAND_DIRECTORY
import com.junkfood.seal.util.DownloadUtil
import com.junkfood.seal.util.FileUtil
import com.junkfood.seal.util.FileUtil.createEmptyFile
import com.junkfood.seal.util.FileUtil.getCookiesFile
import com.junkfood.seal.util.FileUtil.getExternalDownloadDirectory
import com.junkfood.seal.util.FileUtil.getExternalPrivateDownloadDirectory
import com.junkfood.seal.util.NotificationUtil
import com.junkfood.seal.util.PreferenceUtil
import com.junkfood.seal.util.PreferenceUtil.getString
import com.junkfood.seal.util.PreferenceUtil.updateString
import com.junkfood.seal.util.SDCARD_URI
import com.junkfood.seal.util.UpdateUtil
import com.junkfood.seal.util.VIDEO_DIRECTORY
import com.junkfood.seal.util.YT_DLP_VERSION
import com.tencent.mmkv.MMKV
import com.yausername.aria2c.Aria2c
import com.yausername.ffmpeg.FFmpeg
import com.yausername.youtubedl_android.YoutubeDL
import java.io.File
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.context.startKoin
import org.koin.core.module.dsl.viewModel
import org.koin.dsl.module
class App : Application() {
override fun onCreate() {
super.onCreate()
MMKV.initialize(this)
startKoin {
androidLogger()
androidContext(this@App)
modules(
module {
single<DownloaderV2> { DownloaderV2Impl(androidContext()) }
viewModel { DownloadDialogViewModel(downloader = get()) }
viewModel { HomePageViewModel() }
viewModel { CookiesViewModel() }
viewModel { VideoListViewModel() }
}
)
}
context = applicationContext
packageInfo =
packageManager.run {
if (Build.VERSION.SDK_INT >= 33)
getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(0))
else getPackageInfo(packageName, 0)
}
applicationScope = CoroutineScope(SupervisorJob())
DynamicColors.applyToActivitiesIfAvailable(this)
clipboard = getSystemService()!!
connectivityManager = getSystemService()!!
applicationScope.launch((Dispatchers.IO)) {
try {
YoutubeDL.init(this@App)
FFmpeg.init(this@App)
Aria2c.init(this@App)
DownloadUtil.getCookiesContentFromDatabase().getOrNull()?.let {
FileUtil.writeContentToFile(it, getCookiesFile())
}
UpdateUtil.deleteOutdatedApk()
} catch (th: Throwable) {
withContext(Dispatchers.Main) { startCrashReportActivity(th) }
}
}
videoDownloadDir = VIDEO_DIRECTORY.getString(getExternalDownloadDirectory().absolutePath)
audioDownloadDir = AUDIO_DIRECTORY.getString(File(videoDownloadDir, "Audio").absolutePath)
if (!PreferenceUtil.containsKey(COMMAND_DIRECTORY)) {
COMMAND_DIRECTORY.updateString(videoDownloadDir)
}
if (Build.VERSION.SDK_INT >= 26) NotificationUtil.createNotificationChannel()
Thread.setDefaultUncaughtExceptionHandler { _, e -> startCrashReportActivity(e) }
}
private fun startCrashReportActivity(th: Throwable) {
th.printStackTrace()
startActivity(
Intent(this, CrashReportActivity::class.java)
.setAction("$packageName.error_report")
.apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK
putExtra("error_report", getVersionReport() + "\n" + th.stackTraceToString())
}
)
}
companion object {
lateinit var clipboard: ClipboardManager
lateinit var videoDownloadDir: String
lateinit var audioDownloadDir: String
lateinit var applicationScope: CoroutineScope
lateinit var connectivityManager: ConnectivityManager
lateinit var packageInfo: PackageInfo
var isServiceRunning = false
private val connection =
object : ServiceConnection {
override fun onServiceConnected(className: ComponentName, service: IBinder) {
val binder = service as DownloadService.DownloadServiceBinder
isServiceRunning = true
}
override fun onServiceDisconnected(arg0: ComponentName) {}
}
fun startService() {
if (isServiceRunning) return
Intent(context.applicationContext, DownloadService::class.java).also { intent ->
context.applicationContext.bindService(intent, connection, Context.BIND_AUTO_CREATE)
}
}
fun stopService() {
if (!isServiceRunning) return
try {
isServiceRunning = false
context.applicationContext.run { unbindService(connection) }
} catch (e: Exception) {
e.printStackTrace()
}
}
val privateDownloadDir: String
get() =
getExternalPrivateDownloadDirectory().run {
createEmptyFile(".nomedia")
absolutePath
}
fun updateDownloadDir(uri: Uri, directoryType: Directory) {
when (directoryType) {
Directory.AUDIO -> {
val path = FileUtil.getRealPath(uri)
audioDownloadDir = path
PreferenceUtil.encodeString(AUDIO_DIRECTORY, path)
}
Directory.VIDEO -> {
val path = FileUtil.getRealPath(uri)
videoDownloadDir = path
PreferenceUtil.encodeString(VIDEO_DIRECTORY, path)
}
Directory.CUSTOM_COMMAND -> {
val path = FileUtil.getRealPath(uri)
}
Directory.SDCARD -> {
context.contentResolver?.takePersistableUriPermission(
uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION or
Intent.FLAG_GRANT_WRITE_URI_PERMISSION,
)
PreferenceUtil.encodeString(SDCARD_URI, uri.toString())
}
}
}
fun getVersionReport(): String {
val versionName = packageInfo.versionName
val page = packageInfo
val versionCode =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
packageInfo.longVersionCode
} else {
packageInfo.versionCode.toLong()
}
val release =
if (Build.VERSION.SDK_INT >= 30) {
Build.VERSION.RELEASE_OR_CODENAME
} else {
Build.VERSION.RELEASE
}
return StringBuilder()
.append("App version: $versionName ($versionCode)\n")
.append("Device information: Android $release (API ${Build.VERSION.SDK_INT})\n")
.append("Supported ABIs: ${Build.SUPPORTED_ABIS.contentToString()}\n")
.append("Yt-dlp version: ${YT_DLP_VERSION.getString()}\n")
.toString()
}
fun isFDroidBuild(): Boolean = BuildConfig.FLAVOR == "fdroid"
fun isDebugBuild(): Boolean = BuildConfig.DEBUG
@SuppressLint("StaticFieldLeak") lateinit var context: Context
}
}
================================================
FILE: app/src/main/java/com/junkfood/seal/CrashReportActivity.kt
================================================
package com.junkfood.seal
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.BugReport
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalClipboardManager
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.junkfood.seal.ui.common.LocalDarkTheme
import com.junkfood.seal.ui.common.SettingsProvider
import com.junkfood.seal.ui.component.FilledButtonWithIcon
import com.junkfood.seal.ui.theme.SealTheme
class CrashReportActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
val errorMessage: String = intent.getStringExtra("error_report").toString()
setContent {
SettingsProvider(WindowWidthSizeClass.Compact) {
SealTheme(
darkTheme = LocalDarkTheme.current.isDarkTheme(),
isHighContrastModeEnabled = LocalDarkTheme.current.isHighContrastModeEnabled,
) {
val clipboardManager = LocalClipboardManager.current
CrashReportPage(errorMessage = errorMessage) {
clipboardManager.setText(AnnotatedString(errorMessage))
this.finishAffinity()
}
}
}
}
}
override fun onDestroy() {
super.onDestroy()
if (isFinishing) finishAffinity()
}
}
@Composable
@Preview
fun CrashReportPage(errorMessage: String = "ERROR_EXAMPLE", onClick: () -> Unit = {}) {
Scaffold(
modifier = Modifier.fillMaxSize(),
bottomBar = {
androidx.compose.material3.HorizontalDivider()
FilledButtonWithIcon(
modifier =
Modifier.fillMaxWidth()
.navigationBarsPadding()
.padding(horizontal = 16.dp, vertical = 8.dp),
onClick = onClick,
icon = Icons.Outlined.BugReport,
text = stringResource(R.string.copy_and_exit),
)
},
) {
Column(modifier = Modifier.padding(it).verticalScroll(rememberScrollState())) {
Text(
text = stringResource(R.string.unknown_error_title),
style = MaterialTheme.typography.displaySmall,
modifier = Modifier.padding(start = 16.dp, end = 16.dp, top = 60.dp, bottom = 12.dp),
)
Text(
text = errorMessage,
style = MaterialTheme.typography.bodyMedium.copy(fontFamily = FontFamily.Monospace),
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(16.dp).fillMaxWidth(),
)
}
}
}
================================================
FILE: app/src/main/java/com/junkfood/seal/DownloadService.kt
================================================
package com.junkfood.seal
import android.app.PendingIntent
import android.app.Service
import android.content.Intent
import android.os.Binder
import android.os.Build
import android.os.IBinder
import android.util.Log
import com.junkfood.seal.util.NotificationUtil
import com.junkfood.seal.util.NotificationUtil.SERVICE_NOTIFICATION_ID
private const val TAG = "DownloadService"
/** This `Service` does nothing */
class DownloadService : Service() {
override fun onBind(intent: Intent): IBinder {
val pendingIntent: PendingIntent =
Intent(this, MainActivity::class.java).let { notificationIntent ->
PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE)
}
val notification = NotificationUtil.makeServiceNotification(pendingIntent)
startForeground(SERVICE_NOTIFICATION_ID, notification)
return DownloadServiceBinder()
}
override fun onUnbind(intent: Intent?): Boolean {
Log.d(TAG, "onUnbind: ")
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
stopForeground(STOP_FOREGROUND_REMOVE)
} else {
stopForeground(true)
}
stopSelf()
return super.onUnbind(intent)
}
inner class DownloadServiceBinder : Binder() {
fun getService(): DownloadService = this@DownloadService
}
}
================================================
FILE: app/src/main/java/com/junkfood/seal/Downloader.kt
================================================
package com.junkfood.seal
import android.app.PendingIntent
import android.util.Log
import androidx.annotation.CheckResult
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateMapOf
import androidx.compose.ui.platform.ClipboardManager
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import com.junkfood.seal.App.Companion.applicationScope
import com.junkfood.seal.App.Companion.context
import com.junkfood.seal.App.Companion.startService
import com.junkfood.seal.App.Companion.stopService
import com.junkfood.seal.database.objects.CommandTemplate
import com.junkfood.seal.util.COMMAND_DIRECTORY
import com.junkfood.seal.util.DownloadUtil
import com.junkfood.seal.util.FileUtil
import com.junkfood.seal.util.NotificationUtil
import com.junkfood.seal.util.PlaylistEntry
import com.junkfood.seal.util.PlaylistResult
import com.junkfood.seal.util.PreferenceUtil.getString
import com.junkfood.seal.util.ToastUtil
import com.junkfood.seal.util.VideoInfo
import com.junkfood.seal.util.toHttpsUrl
import com.yausername.youtubedl_android.YoutubeDL
import java.util.concurrent.CancellationException
import kotlin.math.roundToInt
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
/** Singleton Downloader for state holder & perform downloads, used by `Activity` & `Service` */
object Downloader {
private const val TAG = "Downloader"
sealed class State {
data class DownloadingPlaylist(val currentItem: Int = 0, val itemCount: Int = 0) : State()
data object DownloadingVideo : State()
data object FetchingInfo : State()
data object Idle : State()
data object Updating : State()
}
sealed class ErrorState(open val url: String = "", open val report: String = "") {
data class DownloadError(override val url: String, override val report: String) :
ErrorState(url = url, report = report)
data class FetchInfoError(override val url: String, override val report: String) :
ErrorState(url = url, report = report)
data object None : ErrorState()
val title: String
@Composable
get() =
when (this) {
is DownloadError -> stringResource(id = R.string.download_error_msg)
is FetchInfoError -> stringResource(id = R.string.fetch_info_error_msg)
None -> ""
}
}
data class CustomCommandTask(
val template: CommandTemplate,
val url: String,
val output: String,
val state: State,
val currentLine: String,
) {
fun toKey() = makeKey(url, template.name)
sealed class State {
data class Error(val errorReport: String) : State()
object Completed : State()
object Canceled : State()
data class Running(val progress: Float) : State()
}
override fun hashCode(): Int {
return (this.url + this.template.name + this.template.template).hashCode()
}
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as CustomCommandTask
if (template != other.template) return false
if (url != other.url) return false
if (output != other.output) return false
if (state != other.state) return false
if (currentLine != other.currentLine) return false
return true
}
fun onCopyLog(clipboardManager: ClipboardManager) {
clipboardManager.setText(AnnotatedString(output))
}
fun onRestart() {
applicationScope.launch(Dispatchers.IO) {
DownloadUtil.executeCommandInBackground(url, template)
}
}
fun onCopyError(clipboardManager: ClipboardManager) {
clipboardManager.setText(AnnotatedString(currentLine))
ToastUtil.makeToast(R.string.error_copied)
}
fun onCancel() {
toKey().run {
YoutubeDL.destroyProcessById(this)
onProcessCanceled(this)
}
}
}
data class DownloadTaskItem(
val webpageUrl: String = "",
val title: String = "",
val uploader: String = "",
val duration: Int = 0,
val fileSizeApprox: Double = .0,
val progress: Float = 0f,
val progressText: String = "",
val thumbnailUrl: String = "",
val taskId: String = "",
val playlistIndex: Int = 0,
)
private var currentJob: Job? = null
private var downloadResultTemp: Result<List<String>> = Result.failure(Exception())
private val mutableDownloaderState: MutableStateFlow<State> = MutableStateFlow(State.Idle)
private val mutableTaskState = MutableStateFlow(DownloadTaskItem())
private val mutablePlaylistResult = MutableStateFlow(PlaylistResult())
private val mutableErrorState: MutableStateFlow<ErrorState> = MutableStateFlow(ErrorState.None)
private val mutableProcessCount = MutableStateFlow(0)
private val mutableQuickDownloadCount = MutableStateFlow(0)
val mutableTaskList = mutableStateMapOf<String, CustomCommandTask>()
val taskState = mutableTaskState.asStateFlow()
val downloaderState = mutableDownloaderState.asStateFlow()
val playlistResult = mutablePlaylistResult.asStateFlow()
val errorState = mutableErrorState.asStateFlow()
val processCount = mutableProcessCount.asStateFlow()
init {
applicationScope.launch {
downloaderState
.combine(processCount) { state, cnt ->
if (cnt > 0) true
else
when (state) {
is State.Idle -> false
else -> true
}
}
.combine(mutableQuickDownloadCount) { isRunning, cnt ->
if (!isRunning) cnt > 0 else true
}
.collect { if (it) startService() else stopService() }
}
}
fun isDownloaderAvailable(): Boolean {
return downloaderState.value is State.Idle
}
fun makeKey(url: String, templateName: String): String = "${templateName}_$url"
fun onTaskStarted(template: CommandTemplate, url: String) =
CustomCommandTask(
template = template,
url = url,
output = "",
state = CustomCommandTask.State.Running(0f),
currentLine = "",
)
.run { mutableTaskList.put(this.toKey(), this) }
fun updateTaskOutput(template: CommandTemplate, url: String, line: String, progress: Float) {
val key = makeKey(url, template.name)
val oldValue = mutableTaskList[key] ?: return
val newValue =
oldValue.run {
copy(
output = output + line + "\n",
currentLine = line,
state = CustomCommandTask.State.Running(progress),
)
}
mutableTaskList[key] = newValue
}
fun onTaskEnded(template: CommandTemplate, url: String, response: String? = null) {
val key = makeKey(url, template.name)
NotificationUtil.finishNotification(
notificationId = key.toNotificationId(),
title = key,
text = context.getString(R.string.status_completed),
)
mutableTaskList.run {
val oldValue = get(key) ?: return
val newValue =
oldValue.copy(state = CustomCommandTask.State.Completed).run {
response?.let { copy(output = response) } ?: this
}
this[key] = newValue
}
FileUtil.scanDownloadDirectoryToMediaLibrary(COMMAND_DIRECTORY.getString())
}
fun onProcessEnded() = mutableProcessCount.update { it - 1 }
fun onProcessCanceled(taskId: String) =
mutableTaskList.run {
get(taskId)?.let { this.put(taskId, it.copy(state = CustomCommandTask.State.Canceled)) }
}
fun onTaskError(errorReport: String, template: CommandTemplate, url: String) =
mutableTaskList.run {
val key = makeKey(url, template.name)
NotificationUtil.notifyError(
title = "",
notificationId = key.toNotificationId(),
report = errorReport,
)
val oldValue = mutableTaskList[key] ?: return
mutableTaskList[key] =
oldValue.copy(
state = CustomCommandTask.State.Error(errorReport),
currentLine = errorReport,
output = oldValue.output + "\n" + errorReport,
)
}
private fun VideoInfo.toTask(playlistIndex: Int = 0, preferencesHash: Int): DownloadTaskItem =
DownloadTaskItem(
webpageUrl = webpageUrl.toString(),
title = title,
uploader = uploader ?: channel ?: uploaderId.toString(),
duration = duration?.roundToInt() ?: 0,
taskId = id + preferencesHash,
thumbnailUrl = thumbnail.toHttpsUrl(),
fileSizeApprox = fileSize ?: fileSizeApprox ?: .0,
playlistIndex = playlistIndex,
)
fun updateState(state: State) = mutableDownloaderState.update { state }
fun clearErrorState() {
mutableErrorState.update { ErrorState.None }
}
private fun fetchInfoError(url: String, errorReport: String) {
mutableErrorState.update { ErrorState.FetchInfoError(url, errorReport) }
}
private fun downloadError(url: String, errorReport: String) {
mutableErrorState.update { ErrorState.DownloadError(url, errorReport) }
}
private fun clearProgressState(isFinished: Boolean) {
mutableTaskState.update {
it.copy(progress = if (isFinished) 100f else 0f, progressText = "")
}
if (!isFinished) downloadResultTemp = Result.failure(Exception())
}
fun updatePlaylistResult(playlistResult: PlaylistResult = PlaylistResult()) =
mutablePlaylistResult.update { playlistResult }
fun getInfoAndDownload(
url: String,
preferences: DownloadUtil.DownloadPreferences =
DownloadUtil.DownloadPreferences.createFromPreferences(),
) {
currentJob =
applicationScope.launch(Dispatchers.IO) {
updateState(State.FetchingInfo)
DownloadUtil.fetchVideoInfoFromUrl(url = url, preferences = preferences)
.onFailure {
manageDownloadError(
th = it,
url = url,
isFetchingInfo = true,
isTaskAborted = true,
)
}
.onSuccess { info ->
downloadResultTemp =
downloadVideo(videoInfo = info, preferences = preferences)
}
}
}
fun addToDownloadQueue(
videoInfo: VideoInfo? = null,
url: String = videoInfo?.originalUrl ?: "",
preferences: DownloadUtil.DownloadPreferences =
DownloadUtil.DownloadPreferences.createFromPreferences(),
) {
require(url.isNotEmpty() || videoInfo != null)
if (!isDownloaderAvailable()) {
ToastUtil.makeToast(R.string.task_added)
applicationScope
.launch(Dispatchers.Default) {
while (!isDownloaderAvailable()) {
delay(3000)
}
}
.invokeOnCompletion {
videoInfo?.let {
downloadVideoWithInfo(info = videoInfo, preferences = preferences)
} ?: getInfoAndDownload(url, preferences)
}
} else {
videoInfo?.let { downloadVideoWithInfo(info = videoInfo, preferences = preferences) }
?: getInfoAndDownload(url, preferences)
}
}
fun downloadVideoWithInfo(
info: VideoInfo,
preferences: DownloadUtil.DownloadPreferences =
DownloadUtil.DownloadPreferences.createFromPreferences(),
) {
currentJob =
applicationScope.launch(Dispatchers.IO) {
downloadResultTemp = downloadVideo(videoInfo = info, preferences = preferences)
}
}
/**
* This method is used for download a single video and multiple videos from playlist at the same
* time.
*
* @see downloadVideoInPlaylistByIndexList
* @see getInfoAndDownload
*/
@CheckResult
private suspend fun downloadVideo(
playlistIndex: Int = 0,
playlistUrl: String = "",
videoInfo: VideoInfo,
preferences: DownloadUtil.DownloadPreferences =
DownloadUtil.DownloadPreferences.createFromPreferences(),
): Result<List<String>> {
Log.d(TAG, preferences.subtitleLanguage)
mutableTaskState.update { videoInfo.toTask(preferencesHash = preferences.hashCode()) }
val isDownloadingPlaylist = downloaderState.value is State.DownloadingPlaylist
if (!isDownloadingPlaylist) updateState(State.DownloadingVideo)
val taskId = videoInfo.id + preferences.hashCode()
val notificationId = taskId.toNotificationId()
Log.d(TAG, "downloadVideo: id=${videoInfo.id} " + videoInfo.title)
Log.d(TAG, "notificationId: $notificationId")
NotificationUtil.notifyProgress(notificationId = notificationId, title = videoInfo.title)
return DownloadUtil.downloadVideo(
videoInfo = videoInfo,
playlistUrl = playlistUrl,
playlistItem = playlistIndex,
downloadPreferences = preferences,
taskId = videoInfo.id + preferences.hashCode(),
) { progress, _, line ->
Log.d(TAG, line)
mutableTaskState.update { it.copy(progress = progress, progressText = line) }
NotificationUtil.notifyProgress(
notificationId = notificationId,
progress = progress.toInt(),
text = line,
title = videoInfo.title,
taskId = taskId,
)
}
.onFailure {
manageDownloadError(
th = it,
url = videoInfo.originalUrl,
title = videoInfo.title,
isFetchingInfo = false,
notificationId = notificationId,
isTaskAborted = !isDownloadingPlaylist,
)
}
.onSuccess {
if (!isDownloadingPlaylist) finishProcessing()
val text =
context.getString(
if (it.isEmpty()) R.string.status_completed
else R.string.download_finish_notification
)
FileUtil.createIntentForOpeningFile(it.firstOrNull()).run {
NotificationUtil.finishNotification(
notificationId,
title = videoInfo.title,
text = text,
intent =
if (this != null)
PendingIntent.getActivity(
context,
0,
this,
PendingIntent.FLAG_IMMUTABLE,
)
else null,
)
}
}
}
fun downloadVideoInPlaylistByIndexList(
url: String,
indexList: List<Int>,
playlistItemList: List<PlaylistEntry> = emptyList(),
preferences: DownloadUtil.DownloadPreferences =
DownloadUtil.DownloadPreferences.createFromPreferences(),
) {
val itemCount = indexList.size
if (!isDownloaderAvailable()) return
mutableDownloaderState.update { State.DownloadingPlaylist() }
currentJob =
applicationScope.launch(Dispatchers.IO) {
for (i in indexList.indices) {
mutableDownloaderState.update {
if (it is State.DownloadingPlaylist)
it.copy(currentItem = i + 1, itemCount = indexList.size)
else return@launch
}
NotificationUtil.updateServiceNotificationForPlaylist(
index = i + 1,
itemCount = itemCount,
)
val playlistIndex = indexList[i]
val playlistEntry = playlistItemList.getOrNull(i)
Log.d(TAG, playlistEntry?.title.toString())
val title = playlistEntry?.title
DownloadUtil.fetchVideoInfoFromUrl(
url = url,
playlistIndex = playlistIndex,
preferences = preferences,
)
.onSuccess {
if (downloaderState.value !is State.DownloadingPlaylist) return@launch
downloadResultTemp =
downloadVideo(
videoInfo = it,
playlistIndex = playlistIndex,
playlistUrl = url,
preferences = preferences,
)
.onFailure { th ->
manageDownloadError(
th = th,
url = it.originalUrl,
title = it.title,
isFetchingInfo = false,
isTaskAborted = false,
)
}
}
.onFailure { th ->
manageDownloadError(
th = th,
url = playlistEntry?.url,
title = title,
isFetchingInfo = true,
isTaskAborted = false,
)
}
}
finishProcessing()
}
}
private fun finishProcessing() {
if (downloaderState.value is State.Idle) return
mutableTaskState.update { it.copy(progress = 100f, progressText = "") }
clearProgressState(isFinished = true)
updateState(State.Idle)
clearErrorState()
}
/**
* @param isTaskAborted Determines if the download task is aborted due to the given `Exception`
*/
fun manageDownloadError(
th: Throwable,
url: String?,
title: String? = null,
isFetchingInfo: Boolean,
isTaskAborted: Boolean = true,
notificationId: Int? = null,
) {
if (th is YoutubeDL.CanceledException) return
th.printStackTrace()
val resId =
if (isFetchingInfo) R.string.fetch_info_error_msg else R.string.download_error_msg
ToastUtil.makeToastSuspend(context.getString(resId))
val notificationTitle = title ?: url
if (isFetchingInfo) {
fetchInfoError(url = url.toString(), errorReport = th.message.toString())
} else {
downloadError(url = url.toString(), errorReport = th.message.toString())
}
notificationId?.let {
NotificationUtil.finishNotification(
notificationId = notificationId,
title = notificationTitle,
text = context.getString(R.string.download_error_msg),
)
}
if (isTaskAborted) {
updateState(State.Idle)
clearProgressState(isFinished = false)
}
}
fun cancelDownload() {
ToastUtil.makeToast(context.getString(R.string.task_canceled))
currentJob?.cancel(CancellationException(context.getString(R.string.task_canceled)))
updateState(State.Idle)
clearProgressState(isFinished = false)
taskState.value.taskId.run {
YoutubeDL.destroyProcessById(this)
NotificationUtil.cancelNotification(this.toNotificationId())
}
}
fun executeCommandWithUrl(url: String) =
applicationScope.launch(Dispatchers.IO) { DownloadUtil.executeCommandInBackground(url) }
fun openDownloadResult() {
if (taskState.value.progress == 100f) FileUtil.openFileFromResult(downloadResultTemp)
}
fun onProcessStarted() = mutableProcessCount.update { it + 1 }
fun String.toNotificationId(): Int = this.hashCode()
}
================================================
FILE: app/src/main/java/com/junkfood/seal/MainActivity.kt
================================================
package com.junkfood.seal
import android.content.Intent
import android.os.Build
import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
import com.junkfood.seal.App.Companion.context
import com.junkfood.seal.ui.common.LocalDarkTheme
import com.junkfood.seal.ui.common.SettingsProvider
import com.junkfood.seal.ui.page.AppEntry
import com.junkfood.seal.ui.page.downloadv2.configure.DownloadDialogViewModel
import com.junkfood.seal.ui.theme.SealTheme
import com.junkfood.seal.util.PreferenceUtil
import com.junkfood.seal.util.matchUrlFromSharedText
import com.junkfood.seal.util.setLanguage
import kotlinx.coroutines.runBlocking
import org.koin.androidx.viewmodel.ext.android.viewModel
import org.koin.compose.KoinContext
class MainActivity : AppCompatActivity() {
private val dialogViewModel: DownloadDialogViewModel by viewModel()
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (Build.VERSION.SDK_INT < 33) {
runBlocking { setLanguage(PreferenceUtil.getLocaleFromPreference()) }
}
enableEdgeToEdge()
context = this.baseContext
setContent {
KoinContext {
val windowSizeClass = calculateWindowSizeClass(this)
SettingsProvider(windowWidthSizeClass = windowSizeClass.widthSizeClass) {
SealTheme(
darkTheme = LocalDarkTheme.current.isDarkTheme(),
isHighContrastModeEnabled = LocalDarkTheme.current.isHighContrastModeEnabled,
) {
AppEntry(dialogViewModel = dialogViewModel)
}
}
}
}
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
val url = intent.getSharedURL()
if (url != null) {
dialogViewModel.postAction(DownloadDialogViewModel.Action.ShowSheet(listOf(url)))
}
}
private fun Intent.getSharedURL(): String? {
val intent = this
return when (intent.action) {
Intent.ACTION_VIEW -> {
intent.dataString
}
Intent.ACTION_SEND -> {
intent.getStringExtra(Intent.EXTRA_TEXT)?.let { sharedContent ->
intent.removeExtra(Intent.EXTRA_TEXT)
matchUrlFromSharedText(sharedContent).also { matchedUrl ->
if (sharedUrlCached != matchedUrl) {
sharedUrlCached = matchedUrl
}
}
}
}
else -> {
null
}
}
}
companion object {
private const val TAG = "MainActivity"
private var sharedUrlCached = ""
}
}
================================================
FILE: app/src/main/java/com/junkfood/seal/NotificationActionReceiver.kt
================================================
package com.junkfood.seal
import android.content.BroadcastReceiver
import android.content.ClipData
import android.content.Context
import android.content.Intent
import android.util.Log
import com.junkfood.seal.App.Companion.context
import com.junkfood.seal.download.DownloaderV2
import com.junkfood.seal.util.NotificationUtil
import com.junkfood.seal.util.ToastUtil
import com.yausername.youtubedl_android.YoutubeDL
import org.koin.core.component.KoinComponent
import org.koin.core.component.get
class NotificationActionReceiver : BroadcastReceiver(), KoinComponent {
val downloader = get<DownloaderV2>()
companion object {
private const val TAG = "CancelReceiver"
private const val PACKAGE_NAME_PREFIX = "com.junkfood.seal."
const val ACTION_CANCEL_TASK = 0
const val ACTION_ERROR_REPORT = 1
const val ACTION_KEY = PACKAGE_NAME_PREFIX + "action"
const val TASK_ID_KEY = PACKAGE_NAME_PREFIX + "taskId"
const val NOTIFICATION_ID_KEY = PACKAGE_NAME_PREFIX + "notificationId"
const val ERROR_REPORT_KEY = PACKAGE_NAME_PREFIX + "error_report"
}
override fun onReceive(context: Context?, intent: Intent?) {
if (intent == null) return
val notificationId = intent.getIntExtra(NOTIFICATION_ID_KEY, 0)
val action = intent.getIntExtra(ACTION_KEY, ACTION_CANCEL_TASK)
Log.d(TAG, "onReceive: $action")
when (action) {
ACTION_CANCEL_TASK -> {
val taskId = intent.getStringExtra(TASK_ID_KEY)
cancelTask(taskId, notificationId)
}
ACTION_ERROR_REPORT -> {
val errorReport = intent.getStringExtra(ERROR_REPORT_KEY)
if (!errorReport.isNullOrEmpty()) copyErrorReport(errorReport, notificationId)
}
}
}
private fun cancelTask(taskId: String?, notificationId: Int) {
if (taskId.isNullOrEmpty()) return
NotificationUtil.cancelNotification(notificationId)
val res = downloader.cancel(taskId)
if (res) {
Log.d(TAG, "Task (id:$taskId) was killed.")
} else {
// todo: reserved for custom commands
YoutubeDL.destroyProcessById(taskId)
Downloader.onProcessCanceled(taskId)
}
}
private fun copyErrorReport(error: String, notificationId: Int) {
App.clipboard.setPrimaryClip(ClipData.newPlainText(null, error))
context.let { ToastUtil.makeToastSuspend(it.getString(R.string.error_copied)) }
NotificationUtil.cancelNotification(notificationId)
}
}
================================================
FILE: app/src/main/java/com/junkfood/seal/QuickDownloadActivity.kt
================================================
package com.junkfood.seal
import android.content.Intent
import android.graphics.drawable.ColorDrawable
import android.os.Build
import android.os.Bundle
import android.view.WindowManager
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.junkfood.seal.ui.common.LocalDarkTheme
import com.junkfood.seal.ui.common.SettingsProvider
import com.junkfood.seal.ui.page.downloadv2.configure.Config
import com.junkfood.seal.ui.page.downloadv2.configure.DownloadDialog
import com.junkfood.seal.ui.page.downloadv2.configure.DownloadDialogViewModel
import com.junkfood.seal.ui.page.downloadv2.configure.DownloadDialogViewModel.Action
import com.junkfood.seal.ui.page.downloadv2.configure.DownloadDialogViewModel.SelectionState
import com.junkfood.seal.ui.page.downloadv2.configure.FormatPage
import com.junkfood.seal.ui.page.downloadv2.configure.PlaylistSelectionPage
import com.junkfood.seal.ui.theme.SealTheme
import com.junkfood.seal.util.DownloadUtil
import com.junkfood.seal.util.PreferenceUtil
import com.junkfood.seal.util.matchUrlFromSharedText
import com.junkfood.seal.util.setLanguage
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.koin.androidx.viewmodel.ext.android.getViewModel
private const val TAG = "QuickDownloadActivity"
class QuickDownloadActivity : ComponentActivity() {
private var sharedUrlCached: String = ""
private fun Intent.getSharedURL(): String? {
val intent = this
return when (intent.action) {
Intent.ACTION_VIEW -> {
intent.dataString
}
Intent.ACTION_SEND -> {
intent.getStringExtra(Intent.EXTRA_TEXT)?.let { sharedContent ->
intent.removeExtra(Intent.EXTRA_TEXT)
matchUrlFromSharedText(sharedContent)
}
}
else -> {
null
}
}
}
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class, ExperimentalMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
intent.getSharedURL()?.let { sharedUrlCached = it }
if (sharedUrlCached.isEmpty()) {
finish()
}
App.startService()
enableEdgeToEdge()
window.run {
setBackgroundDrawable(ColorDrawable(0))
setLayout(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.MATCH_PARENT,
)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY)
} else {
setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT)
}
}
if (Build.VERSION.SDK_INT < 33) {
runBlocking { setLanguage(PreferenceUtil.getLocaleFromPreference()) }
}
val viewModel: DownloadDialogViewModel = getViewModel()
viewModel.postAction(Action.ShowSheet(listOf(sharedUrlCached)))
setContent {
SettingsProvider(calculateWindowSizeClass(this).widthSizeClass) {
SealTheme(
darkTheme = LocalDarkTheme.current.isDarkTheme(),
isHighContrastModeEnabled = LocalDarkTheme.current.isHighContrastModeEnabled,
) {
var preferences by remember {
mutableStateOf(DownloadUtil.DownloadPreferences.createFromPreferences())
}
val sheetValue = viewModel.sheetValueFlow.collectAsStateWithLifecycle().value
val state = viewModel.sheetStateFlow.collectAsStateWithLifecycle().value
val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
val selectionState =
viewModel.selectionStateFlow.collectAsStateWithLifecycle().value
var showDialog by remember { mutableStateOf(false) }
LaunchedEffect(sheetValue, selectionState) {
if (sheetValue == DownloadDialogViewModel.SheetValue.Expanded) {
showDialog = true
} else if (sheetValue == DownloadDialogViewModel.SheetValue.Hidden) {
launch { sheetState.hide() }
.invokeOnCompletion {
showDialog = false
if (selectionState == SelectionState.Idle) {
this@QuickDownloadActivity.finish()
}
}
}
}
if (showDialog) {
DownloadDialog(
state = state,
sheetState = sheetState,
config = Config(),
preferences = preferences,
onPreferencesUpdate = { preferences = it },
onActionPost = { viewModel.postAction(it) },
)
}
when (selectionState) {
is SelectionState.FormatSelection ->
FormatPage(
state = selectionState,
onDismissRequest = {
viewModel.postAction(Action.Reset)
this.finish()
},
)
SelectionState.Idle -> {}
is SelectionState.PlaylistSelection -> {
PlaylistSelectionPage(
state = selectionState,
onDismissRequest = {
viewModel.postAction(Action.Reset)
this.finish()
},
)
}
}
}
}
}
}
}
================================================
FILE: app/src/main/java/com/junkfood/seal/database/AppDatabase.kt
================================================
package com.junkfood.seal.database
import androidx.room.AutoMigration
import androidx.room.Database
import androidx.room.RoomDatabase
import com.junkfood.seal.database.objects.CommandTemplate
import com.junkfood.seal.database.objects.CookieProfile
import com.junkfood.seal.database.objects.DownloadedVideoInfo
import com.junkfood.seal.database.objects.OptionShortcut
@Database(
entities =
[
DownloadedVideoInfo::class,
CommandTemplate::class,
CookieProfile::class,
OptionShortcut::class,
],
version = 5,
autoMigrations =
[
AutoMigration(from = 1, to = 2),
AutoMigration(from = 2, to = 3),
AutoMigration(from = 3, to = 4),
AutoMigration(from = 4, to = 5),
],
)
abstract class AppDatabase : RoomDatabase() {
abstract fun videoInfoDao(): VideoInfoDao
}
================================================
FILE: app/src/main/java/com/junkfood/seal/database/VideoInfoDao.kt
================================================
package com.junkfood.seal.database
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Transaction
import androidx.room.Update
import com.junkfood.seal.database.objects.CommandTemplate
import com.junkfood.seal.database.objects.CookieProfile
import com.junkfood.seal.database.objects.DownloadedVideoInfo
import com.junkfood.seal.database.objects.OptionShortcut
import kotlinx.coroutines.flow.Flow
@Dao
interface VideoInfoDao {
@Insert suspend fun insert(info: DownloadedVideoInfo)
@Insert suspend fun insertAll(infoList: List<DownloadedVideoInfo>)
@Query("select * from DownloadedVideoInfo")
fun getDownloadHistoryFlow(): Flow<List<DownloadedVideoInfo>>
@Query("select * from DownloadedVideoInfo")
suspend fun getDownloadHistory(): List<DownloadedVideoInfo>
@Query("select * from DownloadedVideoInfo where id=:id")
suspend fun getInfoById(id: Int): DownloadedVideoInfo
@Query("DELETE FROM DownloadedVideoInfo WHERE id = :id") suspend fun deleteInfoById(id: Int)
@Query("DELETE FROM DownloadedVideoInfo WHERE videoPath = :path")
suspend fun deleteInfoByPath(path: String)
@Query("select * from DownloadedVideoInfo where videoPath = :path")
suspend fun getInfoByPath(path: String): DownloadedVideoInfo?
@Transaction
suspend fun insertInfoDistinctByPath(
videoInfo: DownloadedVideoInfo,
path: String = videoInfo.videoPath,
) {
if (getInfoByPath(path) == null) insert(videoInfo)
}
@Delete suspend fun deleteInfo(vararg info: DownloadedVideoInfo)
@Delete @Transaction suspend fun deleteInfoList(idList: List<DownloadedVideoInfo>)
@Query("SELECT * FROM CommandTemplate") fun getTemplateFlow(): Flow<List<CommandTemplate>>
@Query("SELECT * FROM CommandTemplate") suspend fun getTemplateList(): List<CommandTemplate>
@Query("select * from CookieProfile") fun getCookieProfileFlow(): Flow<List<CookieProfile>>
@Insert suspend fun insertTemplate(template: CommandTemplate): Long
@Insert @Transaction suspend fun importTemplates(templateList: List<CommandTemplate>)
@Update suspend fun updateTemplate(template: CommandTemplate)
@Delete suspend fun deleteTemplate(template: CommandTemplate)
@Query("SELECT * FROM CommandTemplate where id = :id")
suspend fun getTemplateById(id: Int): CommandTemplate
@Query("select * from CookieProfile where id=:id")
suspend fun getCookieById(id: Int): CookieProfile?
@Update suspend fun updateCookieProfile(cookieProfile: CookieProfile)
@Delete suspend fun deleteCookieProfile(cookieProfile: CookieProfile)
@Insert suspend fun insertCookieProfile(cookieProfile: CookieProfile)
@Query("delete from CommandTemplate where id=:id") suspend fun deleteTemplateById(id: Int)
@Delete suspend fun deleteTemplates(templates: List<CommandTemplate>)
@Query("select * from OptionShortcut") fun getOptionShortcuts(): Flow<List<OptionShortcut>>
@Query("select * from OptionShortcut") suspend fun getShortcutList(): List<OptionShortcut>
@Delete suspend fun deleteShortcut(optionShortcut: OptionShortcut)
@Insert suspend fun insertShortcut(optionShortcut: OptionShortcut): Long
@Transaction @Insert suspend fun insertAllShortcuts(shortcuts: List<OptionShortcut>)
}
================================================
FILE: app/src/main/java/com/junkfood/seal/database/backup/Backup.kt
================================================
package com.junkfood.seal.database.backup
import com.junkfood.seal.database.objects.CommandTemplate
import com.junkfood.seal.database.objects.DownloadedVideoInfo
import com.junkfood.seal.database.objects.OptionShortcut
import kotlinx.serialization.Serializable
@Serializable
data class Backup(
val templates: List<CommandTemplate>? = null,
val shortcuts: List<OptionShortcut>? = null,
val downloadHistory: List<DownloadedVideoInfo>? = null,
)
================================================
FILE: app/src/main/java/com/junkfood/seal/database/backup/BackupUtil.kt
================================================
package com.junkfood.seal.database.backup
import android.content.Context
import com.junkfood.seal.App
import com.junkfood.seal.R
import com.junkfood.seal.database.objects.CommandTemplate
import com.junkfood.seal.database.objects.DownloadedVideoInfo
import com.junkfood.seal.database.objects.OptionShortcut
import com.junkfood.seal.util.DatabaseUtil
import java.util.Date
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
object BackupUtil {
private val format = Json {
prettyPrint = true
ignoreUnknownKeys = true
}
suspend fun exportTemplatesToJson() =
exportTemplatesToJson(
templates = DatabaseUtil.getTemplateList(),
shortcuts = DatabaseUtil.getShortcutList(),
)
fun exportTemplatesToJson(
templates: List<CommandTemplate>,
shortcuts: List<OptionShortcut>,
): String {
return format.encodeToString(Backup(templates = templates, shortcuts = shortcuts))
}
fun List<DownloadedVideoInfo>.toJsonString(): String {
return format.encodeToString(Backup(downloadHistory = this))
}
fun List<DownloadedVideoInfo>.toURLListString(): String {
return this.map { it.videoUrl }.joinToString(separator = "\n") { it }
}
fun String.decodeToBackup(): Result<Backup> {
return format.runCatching { decodeFromString<Backup>(this@decodeToBackup) }
}
fun getDownloadHistoryExportFilename(context: Context): String {
return listOf(
context.getString(R.string.app_name),
App.packageInfo.versionName.toString(),
Date().toString(),
)
.joinToString(separator = "-") { it }
}
enum class BackupDestination {
File,
Clipboard,
}
enum class BackupType {
DownloadHistory,
URLList,
CommandTemplate,
CommandShortcut,
}
}
================================================
FILE: app/src/main/java/com/junkfood/seal/database/objects/CommandTemplate.kt
================================================
package com.junkfood.seal.database.objects
import androidx.room.Entity
import androidx.room.PrimaryKey
import kotlinx.serialization.Serializable
@Entity
@Serializable
data class CommandTemplate(
@PrimaryKey(autoGenerate = true) val id: Int,
val name: String,
val template: String,
)
================================================
FILE: app/src/main/java/com/junkfood/seal/database/objects/CookieProfile.kt
================================================
package com.junkfood.seal.database.objects
import androidx.room.Entity
import androidx.room.PrimaryKey
import kotlinx.serialization.Serializable
@Entity
@Serializable
data class CookieProfile(
@PrimaryKey(autoGenerate = true) val id: Int,
val url: String,
val content: String,
)
================================================
FILE: app/src/main/java/com/junkfood/seal/database/objects/DownloadedVideoInfo.kt
================================================
package com.junkfood.seal.database.objects
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey
import kotlinx.serialization.Serializable
@Entity
@Serializable
data class DownloadedVideoInfo(
@PrimaryKey(autoGenerate = true) val id: Int,
val videoTitle: String,
val videoAuthor: String,
val videoUrl: String,
val thumbnailUrl: String,
val videoPath: String,
@ColumnInfo(defaultValue = "Unknown") val extractor: String = "Unknown",
) {
@Ignore
constructor() :
this(
id = 0,
videoTitle = "Video",
videoAuthor = "Author",
videoUrl = "Url",
thumbnailUrl = "Thumbnail",
videoPath = "Path",
extractor = "Unknown",
)
}
================================================
FILE: app/src/main/java/com/junkfood/seal/database/objects/OptionShortcut.kt
================================================
package com.junkfood.seal.database.objects
import androidx.room.Entity
import androidx.room.PrimaryKey
import kotlinx.serialization.Serializable
@Entity
@Serializable
data class OptionShortcut(@PrimaryKey(autoGenerate = true) val id: Long = 0, val option: String)
================================================
FILE: app/src/main/java/com/junkfood/seal/download/DownloaderV2.kt
================================================
package com.junkfood.seal.download
import android.app.PendingIntent
import android.content.Context
import android.util.Log
import androidx.compose.runtime.mutableStateMapOf
import androidx.compose.runtime.snapshotFlow
import androidx.compose.runtime.snapshots.SnapshotStateMap
import com.junkfood.seal.App
import com.junkfood.seal.R
import com.junkfood.seal.download.Task.DownloadState
import com.junkfood.seal.download.Task.DownloadState.Canceled
import com.junkfood.seal.download.Task.DownloadState.Completed
import com.junkfood.seal.download.Task.DownloadState.Error
import com.junkfood.seal.download.Task.DownloadState.FetchingInfo
import com.junkfood.seal.download.Task.DownloadState.Idle
import com.junkfood.seal.download.Task.DownloadState.ReadyWithInfo
import com.junkfood.seal.download.Task.DownloadState.Running
import com.junkfood.seal.download.Task.RestartableAction.Download
import com.junkfood.seal.download.Task.RestartableAction.FetchInfo
import com.junkfood.seal.download.Task.TypeInfo
import com.junkfood.seal.util.DownloadUtil
import com.junkfood.seal.util.FileUtil
import com.junkfood.seal.util.NotificationUtil
import com.junkfood.seal.util.PreferenceUtil
import com.junkfood.seal.util.VideoInfo
import com.yausername.youtubedl_android.YoutubeDL
import kotlin.collections.component1
import kotlin.collections.component2
import kotlin.collections.set
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
private const val TAG = "DownloaderV2"
private const val MAX_CONCURRENCY = 3
interface DownloaderV2 {
fun getTaskStateMap(): SnapshotStateMap<Task, Task.State>
fun cancel(task: Task): Boolean
fun cancel(taskId: String): Boolean {
return getTaskStateMap().keys.find { it.id == taskId }?.let { cancel(it) } ?: false
}
fun restart(task: Task)
/** Enqueue a [Task] with an empty [Task.State] */
fun enqueue(task: Task)
fun enqueue(task: Task, state: Task.State)
fun enqueue(taskWithState: TaskFactory.TaskWithState) {
val (task, state) = taskWithState
enqueue(task, state)
}
fun remove(task: Task): Boolean
}
internal object FakeDownloaderV2 : DownloaderV2 {
override fun getTaskStateMap(): SnapshotStateMap<Task, Task.State> {
return mutableStateMapOf()
}
override fun cancel(task: Task): Boolean {
return false
}
override fun restart(task: Task) {}
override fun enqueue(task: Task) {}
override fun enqueue(task: Task, state: Task.State) {}
override fun remove(task: Task): Boolean {
return true
}
}
/**
* TODO:
* - Notification
* - Custom commands
* - States for ViewModels
*/
@OptIn(FlowPreview::class)
class DownloaderV2Impl(private val appContext: Context) : DownloaderV2, KoinComponent {
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
private val taskStateMap = mutableStateMapOf<Task, Task.State>()
private val snapshotFlow = snapshotFlow { taskStateMap.toMap() }
init {
scope.launch(Dispatchers.Default) {
snapshotFlow
.onEach { doYourWork() }
.map { it.countRunning() }
.distinctUntilChanged()
.collect { if (it > 0) App.startService() else App.stopService() }
}
scope.launch(Dispatchers.IO) {
// don't write before we read
enqueueFromBackup()
snapshotFlow
.map { it.filter { it.value.downloadState !is Completed } }
.distinctUntilChanged()
.collect {
it.forEach { Log.d(TAG, it.value.viewState.title) }
PreferenceUtil.encodeTaskListBackup(it)
}
}
}
private fun enqueueFromBackup() {
val taskList =
PreferenceUtil.decodeTaskListBackup()
.filter { it.value.downloadState !is Completed }
.mapValues { (_, state) ->
val preState = state.downloadState
val downloadState =
when (preState) {
is FetchingInfo,
Idle -> {
Canceled(action = FetchInfo)
}
is Running -> {
Canceled(action = Download, progress = preState.progress)
}
ReadyWithInfo -> {
Canceled(action = Download, progress = null)
}
else -> {
preState
}
}
state.copy(downloadState = downloadState)
}
taskList.forEach(::enqueue)
}
private fun Map<Task, Task.State>.countRunning(): Int = count { (_, state) ->
state.downloadState is Running || state.downloadState is FetchingInfo
}
override fun getTaskStateMap(): SnapshotStateMap<Task, Task.State> {
return taskStateMap
}
override fun enqueue(task: Task) {
taskStateMap +=
task to Task.State(Idle, null, Task.ViewState(url = task.url, title = task.url))
}
override fun enqueue(task: Task, state: Task.State) {
taskStateMap += task to state
}
/**
* Noted the caller is responsible for stopping the [task] before removing it
*
* @return true if the task was removed
*/
override fun remove(task: Task): Boolean {
if (taskStateMap.contains(task)) {
taskStateMap.remove(task)
return true
}
return false
}
override fun cancel(task: Task): Boolean = task.cancelImpl()
override fun restart(task: Task) {
task.restartImpl()
}
private var Task.state: Task.State
get() = taskStateMap[this]!!
set(value) {
taskStateMap[this] = value
}
private var Task.downloadState: DownloadState
get() = state.downloadState
set(value) {
val prevState = state
taskStateMap[this] = prevState.copy(downloadState = value)
}
private var Task.info: VideoInfo?
get() = state.videoInfo
set(value) {
val prevState = state
taskStateMap[this] = prevState.copy(videoInfo = value)
}
private var Task.viewState: Task.ViewState
get() = state.viewState
set(value) {
val prevState = state
taskStateMap[this] = prevState.copy(viewState = value)
}
private val Task.notificationId: Int
get() = id.hashCode()
/** Processes pending tasks, prioritizing downloads. */
private fun doYourWork() {
if (taskStateMap.countRunning() >= MAX_CONCURRENCY) return
taskStateMap.entries
.sortedBy { (_, state) -> state.downloadState }
.firstOrNull { (_, state) ->
state.downloadState == ReadyWithInfo || state.downloadState == Idle
}
?.let { (task, state) ->
when (state.downloadState) {
Idle -> task.prepare()
ReadyWithInfo -> task.download()
else -> {
throw IllegalStateException()
}
}
}
}
private fun Task.prepare() {
check(downloadState == Idle)
if (type is TypeInfo.CustomCommand) {
execute()
} else {
fetchInfo()
}
}
private fun Task.fetchInfo() {
check(downloadState == Idle)
val task = this
val taskInfo = task.type
val playlistIndex = if (taskInfo is TypeInfo.Playlist) taskInfo.index else null
scope
.launch(Dispatchers.Default) {
DownloadUtil.fetchVideoInfoFromUrl(
url = url,
playlistIndex = playlistIndex,
preferences = preferences,
taskKey = id,
)
.onSuccess {
info = it
downloadState = ReadyWithInfo
viewState = Task.ViewState.fromVideoInfo(it)
}
.onFailure { throwable ->
if (throwable is YoutubeDL.CanceledException) {
return@onFailure
}
task.downloadState = Error(throwable = throwable, action = FetchInfo)
NotificationUtil.notifyError(
title = viewState.title,
textId = R.string.download_error_msg,
notificationId = notificationId,
report = throwable.stackTraceToString(),
)
}
}
.also { job -> downloadState = FetchingInfo(job = job, taskId = id) }
}
private fun Task.downlo
gitextract_n0w66_ho/
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ └── feature_request.yml
│ └── workflows/
│ ├── Issue-Handler.yaml
│ ├── android.yml
│ ├── android_ci.yml
│ ├── close-stale-issues.yml
│ └── sponsor.yml
├── .gitignore
├── .idea/
│ ├── AndroidProjectSystem.xml
│ ├── appInsightsSettings.xml
│ ├── codeStyles/
│ │ ├── Project.xml
│ │ └── codeStyleConfig.xml
│ ├── compiler.xml
│ ├── deploymentTargetSelector.xml
│ ├── gradle.xml
│ ├── inspectionProfiles/
│ │ └── Project_Default.xml
│ ├── kotlinc.xml
│ ├── ktfmt.xml
│ ├── migrations.xml
│ ├── misc.xml
│ ├── other.xml
│ ├── runConfigurations.xml
│ ├── studiobot.xml
│ └── vcs.xml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── app/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ ├── schemas/
│ │ └── com.junkfood.seal.database.AppDatabase/
│ │ ├── 1.json
│ │ ├── 2.json
│ │ ├── 3.json
│ │ ├── 4.json
│ │ └── 5.json
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── junkfood/
│ │ └── seal/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── junkfood/
│ │ │ └── seal/
│ │ │ ├── App.kt
│ │ │ ├── CrashReportActivity.kt
│ │ │ ├── DownloadService.kt
│ │ │ ├── Downloader.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── NotificationActionReceiver.kt
│ │ │ ├── QuickDownloadActivity.kt
│ │ │ ├── database/
│ │ │ │ ├── AppDatabase.kt
│ │ │ │ ├── VideoInfoDao.kt
│ │ │ │ ├── backup/
│ │ │ │ │ ├── Backup.kt
│ │ │ │ │ └── BackupUtil.kt
│ │ │ │ └── objects/
│ │ │ │ ├── CommandTemplate.kt
│ │ │ │ ├── CookieProfile.kt
│ │ │ │ ├── DownloadedVideoInfo.kt
│ │ │ │ └── OptionShortcut.kt
│ │ │ ├── download/
│ │ │ │ ├── DownloaderV2.kt
│ │ │ │ ├── Task.kt
│ │ │ │ └── TaskFactory.kt
│ │ │ ├── ui/
│ │ │ │ ├── common/
│ │ │ │ │ ├── AnimatedComposable.kt
│ │ │ │ │ ├── AsyncImageImpl.kt
│ │ │ │ │ ├── CompositionLocals.kt
│ │ │ │ │ ├── Ext.kt
│ │ │ │ │ ├── HapticFeedback.kt
│ │ │ │ │ ├── Route.kt
│ │ │ │ │ └── motion/
│ │ │ │ │ ├── AnimationSpecs.kt
│ │ │ │ │ ├── MaterialSharedAxis.kt
│ │ │ │ │ └── MotionConstants.kt
│ │ │ │ ├── component/
│ │ │ │ │ ├── ActionSheetItems.kt
│ │ │ │ │ ├── Buttons.kt
│ │ │ │ │ ├── Chips.kt
│ │ │ │ │ ├── CommonComponents.kt
│ │ │ │ │ ├── DialogItems.kt
│ │ │ │ │ ├── Dialogs.kt
│ │ │ │ │ ├── DownloadQueueItem.kt
│ │ │ │ │ ├── FormatItem.kt
│ │ │ │ │ ├── IconButtons.kt
│ │ │ │ │ ├── ModalBottomSheetM2.kt
│ │ │ │ │ ├── ModalBottomSheetM3.kt
│ │ │ │ │ ├── PreferenceItems.kt
│ │ │ │ │ ├── SearchBar.kt
│ │ │ │ │ ├── SegementedButton.kt
│ │ │ │ │ ├── SelectionGroup.kt
│ │ │ │ │ ├── SettingItem.kt
│ │ │ │ │ ├── SponsorItem.kt
│ │ │ │ │ ├── TextField.kt
│ │ │ │ │ ├── VideoCard.kt
│ │ │ │ │ └── VideoListItem.kt
│ │ │ │ ├── page/
│ │ │ │ │ ├── AppEntry.kt
│ │ │ │ │ ├── AppUpdater.kt
│ │ │ │ │ ├── NavigationDrawer.kt
│ │ │ │ │ ├── UpdateDialog.kt
│ │ │ │ │ ├── WelcomeDialog.kt
│ │ │ │ │ ├── YtdlpUpdater.kt
│ │ │ │ │ ├── command/
│ │ │ │ │ │ ├── TaskListPage.kt
│ │ │ │ │ │ └── TaskLogPage.kt
│ │ │ │ │ ├── download/
│ │ │ │ │ │ ├── DownloadPage.kt
│ │ │ │ │ │ ├── DownloadSettingsDialog.kt
│ │ │ │ │ │ ├── HomePageViewModel.kt
│ │ │ │ │ │ ├── MeteredNetworkDialog.kt
│ │ │ │ │ │ ├── NotificationPermissionDialog.kt
│ │ │ │ │ │ ├── PlaylistSelectionDialog.kt
│ │ │ │ │ │ └── VideoSectionSlider.kt
│ │ │ │ │ ├── downloadv2/
│ │ │ │ │ │ ├── ActionSheet.kt
│ │ │ │ │ │ ├── DownloadPageV2.kt
│ │ │ │ │ │ ├── TopBarNestedScrollConnection.kt
│ │ │ │ │ │ ├── VideoCardV2.kt
│ │ │ │ │ │ └── configure/
│ │ │ │ │ │ ├── DownloadDialogV2.kt
│ │ │ │ │ │ ├── DownloadDialogViewModel.kt
│ │ │ │ │ │ ├── FormatPage.kt
│ │ │ │ │ │ ├── InputUrlDialog.kt
│ │ │ │ │ │ └── PlaylistSelectionPage.kt
│ │ │ │ │ ├── settings/
│ │ │ │ │ │ ├── BasePreferencePage.kt
│ │ │ │ │ │ ├── SettingsPage.kt
│ │ │ │ │ │ ├── about/
│ │ │ │ │ │ │ ├── AboutPage.kt
│ │ │ │ │ │ │ ├── CreditsPage.kt
│ │ │ │ │ │ │ ├── SponsorPage.kt
│ │ │ │ │ │ │ └── UpdatePage.kt
│ │ │ │ │ │ ├── appearance/
│ │ │ │ │ │ │ ├── AppearancePreferences.kt
│ │ │ │ │ │ │ ├── DarkThemePreferences.kt
│ │ │ │ │ │ │ └── LanguagesPage.kt
│ │ │ │ │ │ ├── command/
│ │ │ │ │ │ │ ├── CommandTemplateDialog.kt
│ │ │ │ │ │ │ ├── TemplateEditPage.kt
│ │ │ │ │ │ │ └── TemplateListPage.kt
│ │ │ │ │ │ ├── directory/
│ │ │ │ │ │ │ ├── DirectoryPreferenceDialog.kt
│ │ │ │ │ │ │ └── DownloadDirectoryPreferences.kt
│ │ │ │ │ │ ├── format/
│ │ │ │ │ │ │ ├── DownloadFormatPreferences.kt
│ │ │ │ │ │ │ ├── FormatSettingDialogs.kt
│ │ │ │ │ │ │ └── SubtitlePreference.kt
│ │ │ │ │ │ ├── general/
│ │ │ │ │ │ │ ├── AdvancedSettingDialogs.kt
│ │ │ │ │ │ │ ├── GeneralDownloadPreferences.kt
│ │ │ │ │ │ │ └── YtdlpUpdateDialog.kt
│ │ │ │ │ │ ├── interaction/
│ │ │ │ │ │ │ ├── InteractionPreferencePage.kt
│ │ │ │ │ │ │ └── InterfaceCustomizationDialogs.kt
│ │ │ │ │ │ ├── network/
│ │ │ │ │ │ │ ├── CookieProfilesPage.kt
│ │ │ │ │ │ │ ├── CookiesViewModel.kt
│ │ │ │ │ │ │ ├── NetworkPreferences.kt
│ │ │ │ │ │ │ ├── NetworkSettingDialogs.kt
│ │ │ │ │ │ │ └── WebViewPage.kt
│ │ │ │ │ │ └── troubleshooting/
│ │ │ │ │ │ └── TroubleshootingPage.kt
│ │ │ │ │ └── videolist/
│ │ │ │ │ ├── ExportImportDialog.kt
│ │ │ │ │ ├── RemoveItemDialog.kt
│ │ │ │ │ ├── VideoDetailDrawer.kt
│ │ │ │ │ ├── VideoListPage.kt
│ │ │ │ │ └── VideoListViewModel.kt
│ │ │ │ ├── svg/
│ │ │ │ │ ├── VectorPreviews.kt
│ │ │ │ │ ├── __DrawableVectors.kt
│ │ │ │ │ └── drawablevectors/
│ │ │ │ │ ├── Coder.kt
│ │ │ │ │ ├── Download.kt
│ │ │ │ │ ├── VideoFiles.kt
│ │ │ │ │ └── VideoSteaming.kt
│ │ │ │ └── theme/
│ │ │ │ ├── ColorScheme.kt
│ │ │ │ ├── Shape.kt
│ │ │ │ ├── Theme.kt
│ │ │ │ └── Type.kt
│ │ │ └── util/
│ │ │ ├── DatabaseUtil.kt
│ │ │ ├── DateTimeUtil.kt
│ │ │ ├── DownloadUtil.kt
│ │ │ ├── FileUtil.kt
│ │ │ ├── LanguageSettings.kt
│ │ │ ├── NotificationUtil.kt
│ │ │ ├── PreferenceUtil.kt
│ │ │ ├── SponsorData.kt
│ │ │ ├── SponsorUtil.kt
│ │ │ ├── TextUtil.kt
│ │ │ ├── UpdateUtil.kt
│ │ │ └── VideoInfo.kt
│ │ └── res/
│ │ ├── drawable/
│ │ │ ├── ic_launcher_foreground.xml
│ │ │ ├── ic_launcher_monochrome.xml
│ │ │ ├── icons8_matrix.xml
│ │ │ ├── icons8_telegram_app.xml
│ │ │ ├── outline_cancel_24.xml
│ │ │ ├── outline_content_copy_24.xml
│ │ │ └── seal.xml
│ │ ├── drawable-anydpi-v24/
│ │ │ └── ic_stat_seal.xml
│ │ ├── mipmap-anydpi-v26/
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── resources.properties
│ │ ├── values/
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ ├── values-ar/
│ │ │ └── strings.xml
│ │ ├── values-ar-rSA/
│ │ │ └── strings.xml
│ │ ├── values-az/
│ │ │ └── strings.xml
│ │ ├── values-be/
│ │ │ └── strings.xml
│ │ ├── values-bn/
│ │ │ └── strings.xml
│ │ ├── values-ca/
│ │ │ └── strings.xml
│ │ ├── values-ckb/
│ │ │ └── strings.xml
│ │ ├── values-cs/
│ │ │ └── strings.xml
│ │ ├── values-da/
│ │ │ └── strings.xml
│ │ ├── values-de/
│ │ │ └── strings.xml
│ │ ├── values-el/
│ │ │ └── strings.xml
│ │ ├── values-es/
│ │ │ └── strings.xml
│ │ ├── values-eu/
│ │ │ └── strings.xml
│ │ ├── values-fa/
│ │ │ └── strings.xml
│ │ ├── values-fil/
│ │ │ └── strings.xml
│ │ ├── values-fr/
│ │ │ └── strings.xml
│ │ ├── values-gl/
│ │ │ └── strings.xml
│ │ ├── values-hi/
│ │ │ └── strings.xml
│ │ ├── values-hr/
│ │ │ └── strings.xml
│ │ ├── values-hu/
│ │ │ └── strings.xml
│ │ ├── values-in/
│ │ │ └── strings.xml
│ │ ├── values-it/
│ │ │ └── strings.xml
│ │ ├── values-iw/
│ │ │ └── strings.xml
│ │ ├── values-ja/
│ │ │ └── strings.xml
│ │ ├── values-ji/
│ │ │ └── strings.xml
│ │ ├── values-kab/
│ │ │ └── strings.xml
│ │ ├── values-km/
│ │ │ └── strings.xml
│ │ ├── values-kmr/
│ │ │ └── strings.xml
│ │ ├── values-kn/
│ │ │ └── strings.xml
│ │ ├── values-ko/
│ │ │ └── strings.xml
│ │ ├── values-lt/
│ │ │ └── strings.xml
│ │ ├── values-lv/
│ │ │ └── strings.xml
│ │ ├── values-ml/
│ │ │ └── strings.xml
│ │ ├── values-mn/
│ │ │ └── strings.xml
│ │ ├── values-mr/
│ │ │ └── strings.xml
│ │ ├── values-ms/
│ │ │ └── strings.xml
│ │ ├── values-nb/
│ │ │ └── strings.xml
│ │ ├── values-nl/
│ │ │ └── strings.xml
│ │ ├── values-nn/
│ │ │ └── strings.xml
│ │ ├── values-or/
│ │ │ └── strings.xml
│ │ ├── values-pa/
│ │ │ └── strings.xml
│ │ ├── values-pl/
│ │ │ └── strings.xml
│ │ ├── values-pt/
│ │ │ └── strings.xml
│ │ ├── values-pt-rBR/
│ │ │ └── strings.xml
│ │ ├── values-pt-rPT/
│ │ │ └── strings.xml
│ │ ├── values-ro/
│ │ │ └── strings.xml
│ │ ├── values-ru/
│ │ │ └── strings.xml
│ │ ├── values-si/
│ │ │ └── strings.xml
│ │ ├── values-sk/
│ │ │ └── strings.xml
│ │ ├── values-sl/
│ │ │ └── strings.xml
│ │ ├── values-sr/
│ │ │ └── strings.xml
│ │ ├── values-sv/
│ │ │ └── strings.xml
│ │ ├── values-ta/
│ │ │ └── strings.xml
│ │ ├── values-th/
│ │ │ └── strings.xml
│ │ ├── values-tr/
│ │ │ └── strings.xml
│ │ ├── values-uk/
│ │ │ └── strings.xml
│ │ ├── values-ur/
│ │ │ └── strings.xml
│ │ ├── values-uz/
│ │ │ └── strings.xml
│ │ ├── values-vi/
│ │ │ └── strings.xml
│ │ ├── values-zh-rCN/
│ │ │ └── strings.xml
│ │ ├── values-zh-rTW/
│ │ │ └── strings.xml
│ │ └── xml/
│ │ └── provider_paths.xml
│ └── test/
│ └── java/
│ └── com/
│ └── junkfood/
│ └── seal/
│ └── ExampleUnitTest.kt
├── build.gradle.kts
├── buildSrc/
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src/
│ └── main/
│ └── kotlin/
│ └── Version.kt
├── color/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ └── java/
│ ├── com/
│ │ └── kyant/
│ │ └── monet/
│ │ ├── ColorSpec.kt
│ │ ├── Monet.kt
│ │ ├── PaletteStyle.kt
│ │ └── TonalPalettes.kt
│ └── io/
│ └── material/
│ ├── hct/
│ │ ├── Cam16.kt
│ │ ├── Hct.kt
│ │ ├── HctSolver.kt
│ │ └── ViewingConditions.kt
│ └── utils/
│ ├── ColorUtils.kt
│ ├── MathUtils.kt
│ └── StringUtils.kt
├── fastlane/
│ └── metadata/
│ └── android/
│ ├── ar-SA/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── bn/
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── de-DE/
│ │ ├── changelogs/
│ │ │ ├── 10320.txt
│ │ │ ├── 10330.txt
│ │ │ ├── 10340.txt
│ │ │ └── 10350.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── en-US/
│ │ ├── changelogs/
│ │ │ ├── 10704.txt
│ │ │ ├── 10714.txt
│ │ │ ├── 10724.txt
│ │ │ ├── 10734.txt
│ │ │ ├── 10804.txt
│ │ │ ├── 10814.txt
│ │ │ └── 10824.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── es/
│ │ ├── changelogs/
│ │ │ ├── 10320.txt
│ │ │ ├── 10330.txt
│ │ │ └── 10340.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── fr-FR/
│ │ ├── changelogs/
│ │ │ └── 10350.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── hi/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── hr/
│ │ ├── changelogs/
│ │ │ ├── 10330.txt
│ │ │ └── 10340.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── id/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── it/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── ja/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── ml/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── nb-NO/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── nl-NL/
│ │ ├── changelogs/
│ │ │ └── 10350.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── pt-BR/
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── ru/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── th/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── uk/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── vi/
│ │ ├── changelogs/
│ │ │ └── 10320.txt
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ ├── zh-CN/
│ │ ├── full_description.txt
│ │ ├── short_description.txt
│ │ └── title.txt
│ └── zh-TW/
│ ├── changelogs/
│ │ └── 10330.txt
│ ├── full_description.txt
│ ├── short_description.txt
│ └── title.txt
├── gradle/
│ ├── libs.versions.toml
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle.kts
└── translations/
├── README-ar.md
├── README-az.md
├── README-bn.md
├── README-fa.md
├── README-hi.md
├── README-id.md
├── README-it.md
├── README-ja.md
├── README-pt.md
├── README-ru.md
├── README-sr.md
├── README-th.md
├── README-ua.md
├── README-zh_Hans.md
└── README-zh_Hant.md
Condensed preview — 365 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,132K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 736,
"preview": "# These are supported funding model platforms\n\ngithub: JunkFood02\npatreon: # Replace with a single Patreon username\nopen"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 2455,
"preview": "name: Bug Report\ndescription: Create a report to help us improve\nlabels: [ bug, new issue ]\nbody:\n\n\n - type: checkboxes"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 59,
"preview": "# disable blank issue creation\nblank_issues_enabled: false\n"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 2049,
"preview": "name: Feature Request\ndescription: Suggest a new feature for the app\nlabels: [ enhancement, new issue ]\nbody:\n - type: "
},
{
"path": ".github/workflows/Issue-Handler.yaml",
"chars": 3308,
"preview": "# Name of the GitHub Action\nname: Check and Close Issues\n\n# Trigger the action on issue events, specifically when an iss"
},
{
"path": ".github/workflows/android.yml",
"chars": 1040,
"preview": "name: Build Release APK\n\non:\n workflow_dispatch:\n\njobs:\n\n build:\n runs-on: ubuntu-latest\n\n steps:\n - uses: ac"
},
{
"path": ".github/workflows/android_ci.yml",
"chars": 601,
"preview": "name: Android CI\n\non:\n pull_request:\n branches: [ \"main\" ]\n\njobs:\n build:\n\n runs-on: ubuntu-latest\n\n steps:\n "
},
{
"path": ".github/workflows/close-stale-issues.yml",
"chars": 407,
"preview": "name: 'Close stale issues and PRs'\non:\n schedule:\n - cron: '0 0 1 * *'\n\njobs:\n stale:\n runs-on: ubuntu-latest\n "
},
{
"path": ".github/workflows/sponsor.yml",
"chars": 708,
"preview": "name: Generate Sponsors README\non:\n workflow_dispatch:\n schedule:\n - cron: 30 15 25 * *\n \njobs:\n deploy:\n runs"
},
{
"path": ".gitignore",
"chars": 302,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor."
},
{
"path": ".idea/AndroidProjectSystem.xml",
"chars": 212,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"AndroidProjectSystem\">\n <option name="
},
{
"path": ".idea/appInsightsSettings.xml",
"chars": 938,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"AppInsightsSettings\">\n <option name=\""
},
{
"path": ".idea/codeStyles/Project.xml",
"chars": 3622,
"preview": "<component name=\"ProjectCodeStyleConfiguration\">\n <code_scheme name=\"Project\" version=\"173\">\n <JetCodeStyleSettings>"
},
{
"path": ".idea/codeStyles/codeStyleConfig.xml",
"chars": 142,
"preview": "<component name=\"ProjectCodeStyleConfiguration\">\n <state>\n <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n "
},
{
"path": ".idea/compiler.xml",
"chars": 400,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"CompilerConfiguration\">\n <bytecodeTar"
},
{
"path": ".idea/deploymentTargetSelector.xml",
"chars": 2043,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"deploymentTargetSelector\">\n <selectio"
},
{
"path": ".idea/gradle.xml",
"chars": 1268,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"GradleMigrationSettings\" migrationVersio"
},
{
"path": ".idea/inspectionProfiles/Project_Default.xml",
"chars": 4365,
"preview": "<component name=\"InspectionProjectProfileManager\">\n <profile version=\"1.0\">\n <option name=\"myName\" value=\"Project De"
},
{
"path": ".idea/kotlinc.xml",
"chars": 176,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"KotlinJpsPluginSettings\">\n <option na"
},
{
"path": ".idea/ktfmt.xml",
"chars": 272,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"KtfmtSettings\">\n <option name=\"enable"
},
{
"path": ".idea/migrations.xml",
"chars": 254,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectMigrations\">\n <option name=\"Mi"
},
{
"path": ".idea/misc.xml",
"chars": 2811,
"preview": "<project version=\"4\">\n <component name=\"DesignSurface\">\n <option name=\"filePathToZoomLevelMap\">\n <map>\n "
},
{
"path": ".idea/other.xml",
"chars": 176,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"direct_access_persist.xml\">\n <option "
},
{
"path": ".idea/runConfigurations.xml",
"chars": 964,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"RunConfigurationProducerService\">\n <o"
},
{
"path": ".idea/studiobot.xml",
"chars": 183,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"StudioBotProjectSettings\">\n <option n"
},
{
"path": ".idea/vcs.xml",
"chars": 180,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "CHANGELOG.md",
"chars": 12184,
"preview": "# Changelog\n\nAll notable changes (starting from v1.7.3) to stable releases will be documented in this file.\n\nThe format "
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 5222,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
},
{
"path": "CONTRIBUTING.md",
"chars": 3369,
"preview": "# Contributing\n\nBefore reading, you may know what [yt-dlp](https://github.com/yt-dlp/yt-dlp) is and what it does. In sho"
},
{
"path": "LICENSE",
"chars": 35149,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 10404,
"preview": "<div align=\"center\">\n\n<img width=\"\" src=\"fastlane/metadata/android/en-US/images/icon.png\" width=160 height=160 align=\""
},
{
"path": "app/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "app/build.gradle.kts",
"chars": 5749,
"preview": "@file:Suppress(\"UnstableApiUsage\")\n\nimport com.android.build.api.variant.FilterConfiguration\nimport java.io.FileInputStr"
},
{
"path": "app/proguard-rules.pro",
"chars": 2466,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "app/schemas/com.junkfood.seal.database.AppDatabase/1.json",
"chars": 1892,
"preview": "{\n \"formatVersion\": 1,\n \"database\": {\n \"version\": 1,\n \"identityHash\": \"988509a71f29b1a28b60e346980acccb\",\n \"e"
},
{
"path": "app/schemas/com.junkfood.seal.database.AppDatabase/2.json",
"chars": 2140,
"preview": "{\n \"formatVersion\": 1,\n \"database\": {\n \"version\": 2,\n \"identityHash\": \"4af4e9805a6d4977cdf27c8cb419c965\",\n \"e"
},
{
"path": "app/schemas/com.junkfood.seal.database.AppDatabase/3.json",
"chars": 3027,
"preview": "{\n \"formatVersion\": 1,\n \"database\": {\n \"version\": 3,\n \"identityHash\": \"63b1cd29253fd3dd9060188d793fa8d3\",\n \"e"
},
{
"path": "app/schemas/com.junkfood.seal.database.AppDatabase/4.json",
"chars": 3906,
"preview": "{\n \"formatVersion\": 1,\n \"database\": {\n \"version\": 4,\n \"identityHash\": \"d049bb757be0d1c233c7ec34bfde51dc\",\n \"e"
},
{
"path": "app/schemas/com.junkfood.seal.database.AppDatabase/5.json",
"chars": 4612,
"preview": "{\n \"formatVersion\": 1,\n \"database\": {\n \"version\": 5,\n \"identityHash\": \"5eab3a1c93713521f1197fa2e2903231\",\n \"e"
},
{
"path": "app/src/androidTest/java/com/junkfood/seal/ExampleInstrumentedTest.kt",
"chars": 660,
"preview": "package com.junkfood.seal\n\nimport androidx.test.ext.junit.runners.AndroidJUnit4\nimport androidx.test.platform.app.Instru"
},
{
"path": "app/src/main/AndroidManifest.xml",
"chars": 5212,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:to"
},
{
"path": "app/src/main/java/com/junkfood/seal/App.kt",
"chars": 8854,
"preview": "package com.junkfood.seal\n\nimport android.annotation.SuppressLint\nimport android.app.Application\nimport android.content."
},
{
"path": "app/src/main/java/com/junkfood/seal/CrashReportActivity.kt",
"chars": 3767,
"preview": "package com.junkfood.seal\n\nimport android.os.Bundle\nimport androidx.activity.ComponentActivity\nimport androidx.activity."
},
{
"path": "app/src/main/java/com/junkfood/seal/DownloadService.kt",
"chars": 1378,
"preview": "package com.junkfood.seal\n\nimport android.app.PendingIntent\nimport android.app.Service\nimport android.content.Intent\nimp"
},
{
"path": "app/src/main/java/com/junkfood/seal/Downloader.kt",
"chars": 21694,
"preview": "package com.junkfood.seal\n\nimport android.app.PendingIntent\nimport android.util.Log\nimport androidx.annotation.CheckResu"
},
{
"path": "app/src/main/java/com/junkfood/seal/MainActivity.kt",
"chars": 3143,
"preview": "package com.junkfood.seal\n\nimport android.content.Intent\nimport android.os.Build\nimport android.os.Bundle\nimport android"
},
{
"path": "app/src/main/java/com/junkfood/seal/NotificationActionReceiver.kt",
"chars": 2605,
"preview": "package com.junkfood.seal\n\nimport android.content.BroadcastReceiver\nimport android.content.ClipData\nimport android.conte"
},
{
"path": "app/src/main/java/com/junkfood/seal/QuickDownloadActivity.kt",
"chars": 6882,
"preview": "package com.junkfood.seal\n\nimport android.content.Intent\nimport android.graphics.drawable.ColorDrawable\nimport android.o"
},
{
"path": "app/src/main/java/com/junkfood/seal/database/AppDatabase.kt",
"chars": 896,
"preview": "package com.junkfood.seal.database\n\nimport androidx.room.AutoMigration\nimport androidx.room.Database\nimport androidx.roo"
},
{
"path": "app/src/main/java/com/junkfood/seal/database/VideoInfoDao.kt",
"chars": 3363,
"preview": "package com.junkfood.seal.database\n\nimport androidx.room.Dao\nimport androidx.room.Delete\nimport androidx.room.Insert\nimp"
},
{
"path": "app/src/main/java/com/junkfood/seal/database/backup/Backup.kt",
"chars": 457,
"preview": "package com.junkfood.seal.database.backup\n\nimport com.junkfood.seal.database.objects.CommandTemplate\nimport com.junkfood"
},
{
"path": "app/src/main/java/com/junkfood/seal/database/backup/BackupUtil.kt",
"chars": 1933,
"preview": "package com.junkfood.seal.database.backup\n\nimport android.content.Context\nimport com.junkfood.seal.App\nimport com.junkfo"
},
{
"path": "app/src/main/java/com/junkfood/seal/database/objects/CommandTemplate.kt",
"chars": 297,
"preview": "package com.junkfood.seal.database.objects\n\nimport androidx.room.Entity\nimport androidx.room.PrimaryKey\nimport kotlinx.s"
},
{
"path": "app/src/main/java/com/junkfood/seal/database/objects/CookieProfile.kt",
"chars": 293,
"preview": "package com.junkfood.seal.database.objects\n\nimport androidx.room.Entity\nimport androidx.room.PrimaryKey\nimport kotlinx.s"
},
{
"path": "app/src/main/java/com/junkfood/seal/database/objects/DownloadedVideoInfo.kt",
"chars": 817,
"preview": "package com.junkfood.seal.database.objects\n\nimport androidx.room.ColumnInfo\nimport androidx.room.Entity\nimport androidx."
},
{
"path": "app/src/main/java/com/junkfood/seal/database/objects/OptionShortcut.kt",
"chars": 266,
"preview": "package com.junkfood.seal.database.objects\n\nimport androidx.room.Entity\nimport androidx.room.PrimaryKey\nimport kotlinx.s"
},
{
"path": "app/src/main/java/com/junkfood/seal/download/DownloaderV2.kt",
"chars": 16792,
"preview": "package com.junkfood.seal.download\n\nimport android.app.PendingIntent\nimport android.content.Context\nimport android.util."
},
{
"path": "app/src/main/java/com/junkfood/seal/download/Task.kt",
"chars": 5476,
"preview": "package com.junkfood.seal.download\n\nimport com.junkfood.seal.database.objects.CommandTemplate\nimport com.junkfood.seal.d"
},
{
"path": "app/src/main/java/com/junkfood/seal/download/TaskFactory.kt",
"chars": 4554,
"preview": "package com.junkfood.seal.download\n\nimport androidx.annotation.CheckResult\nimport com.junkfood.seal.download.Task.Downlo"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/AnimatedComposable.kt",
"chars": 6231,
"preview": "package com.junkfood.seal.ui.common\n\nimport android.os.Build\nimport androidx.compose.animation.AnimatedVisibilityScope\ni"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/AsyncImageImpl.kt",
"chars": 2182,
"preview": "package com.junkfood.seal.ui.common\n\nimport androidx.compose.foundation.Image\nimport androidx.compose.runtime.Composable"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/CompositionLocals.kt",
"chars": 2522,
"preview": "package com.junkfood.seal.ui.common\n\nimport android.os.Build\nimport androidx.compose.material3.darkColorScheme\nimport an"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/Ext.kt",
"chars": 683,
"preview": "package com.junkfood.seal.ui.common\n\nimport androidx.compose.runtime.Composable\nimport androidx.compose.runtime.mutableI"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/HapticFeedback.kt",
"chars": 347,
"preview": "package com.junkfood.seal.ui.common\n\nimport android.view.HapticFeedbackConstants\nimport android.view.View\n\nobject Haptic"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/Route.kt",
"chars": 1424,
"preview": "package com.junkfood.seal.ui.common\n\nobject Route {\n\n const val HOME = \"home\"\n const val DOWNLOADS = \"download_his"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/motion/AnimationSpecs.kt",
"chars": 1138,
"preview": "package com.junkfood.seal.ui.common.motion\n\nimport android.view.animation.PathInterpolator\nimport androidx.compose.anima"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/motion/MaterialSharedAxis.kt",
"chars": 8104,
"preview": "package com.junkfood.seal.ui.common.motion\n\n/*\n * Copyright 2021 SOUP\n *\n * Licensed under the Apache License, Version 2"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/common/motion/MotionConstants.kt",
"chars": 949,
"preview": "package com.junkfood.seal.ui.common.motion\n\n/*\n * Copyright 2021 SOUP\n *\n * Licensed under the Apache License, Version 2"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/ActionSheetItems.kt",
"chars": 5131,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.LocalIndication\nimport androidx.compose.found"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/Buttons.kt",
"chars": 6907,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.BorderStroke\nimport androidx.compose.foundati"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/Chips.kt",
"chars": 7837,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.animation.AnimatedVisibility\nimport androidx.compose.fou"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/CommonComponents.kt",
"chars": 745,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.layout.Spacer\nimport androidx.compose.foundat"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/DialogItems.kt",
"chars": 7574,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.LocalIndication\nimport androidx.compose.found"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/Dialogs.kt",
"chars": 13360,
"preview": "package com.junkfood.seal.ui.component\n\nimport android.content.res.Configuration\nimport androidx.compose.foundation.clic"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/DownloadQueueItem.kt",
"chars": 15486,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.animation.core.animateFloatAsState\nimport androidx.compo"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/FormatItem.kt",
"chars": 20369,
"preview": "package com.junkfood.seal.ui.component\n\nimport android.content.res.Configuration\nimport androidx.compose.animation.anima"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/IconButtons.kt",
"chars": 2239,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.layout.size\nimport androidx.compose.material."
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/ModalBottomSheetM2.kt",
"chars": 7206,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.background\nimport androidx.compose.foundation"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/ModalBottomSheetM3.kt",
"chars": 2397,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.layout.Column\nimport androidx.compose.foundat"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/PreferenceItems.kt",
"chars": 29307,
"preview": "package com.junkfood.seal.ui.component\n\nimport android.content.res.Configuration\nimport androidx.compose.animation.Anima"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/SearchBar.kt",
"chars": 3377,
"preview": "package com.junkfood.seal.ui.component\n\nimport android.view.HapticFeedbackConstants\nimport androidx.compose.foundation.l"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/SegementedButton.kt",
"chars": 1120,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.material3.SegmentedButton\nimport androidx.compose.materi"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/SelectionGroup.kt",
"chars": 8423,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.animation.animateColorAsState\nimport androidx.compose.an"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/SettingItem.kt",
"chars": 2558,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.clickable\nimport androidx.compose.foundation."
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/SponsorItem.kt",
"chars": 3286,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.clickable\nimport androidx.compose.foundation."
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/TextField.kt",
"chars": 8784,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.foundation.interaction.MutableInteractionSource\nimport a"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/VideoCard.kt",
"chars": 6701,
"preview": "package com.junkfood.seal.ui.component\n\nimport android.content.res.Configuration\nimport androidx.compose.animation.Anima"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/component/VideoListItem.kt",
"chars": 6998,
"preview": "package com.junkfood.seal.ui.component\n\nimport androidx.compose.animation.AnimatedVisibility\nimport androidx.compose.ani"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/AppEntry.kt",
"chars": 11715,
"preview": "package com.junkfood.seal.ui.page\n\nimport android.webkit.CookieManager\nimport androidx.compose.foundation.background\nimp"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/AppUpdater.kt",
"chars": 4406,
"preview": "package com.junkfood.seal.ui.page\n\nimport android.Manifest\nimport android.content.Intent\nimport android.net.Uri\nimport a"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/NavigationDrawer.kt",
"chars": 17616,
"preview": "package com.junkfood.seal.ui.page\n\nimport androidx.compose.foundation.background\nimport androidx.compose.foundation.layo"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/UpdateDialog.kt",
"chars": 4876,
"preview": "package com.junkfood.seal.ui.page\n\nimport android.os.Build\nimport androidx.compose.animation.animateContentSize\nimport a"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/WelcomeDialog.kt",
"chars": 4513,
"preview": "package com.junkfood.seal.ui.page\n\nimport androidx.compose.foundation.layout.Column\nimport androidx.compose.foundation.l"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/YtdlpUpdater.kt",
"chars": 1780,
"preview": "package com.junkfood.seal.ui.page\n\nimport androidx.compose.runtime.Composable\nimport androidx.compose.runtime.LaunchedEf"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/command/TaskListPage.kt",
"chars": 16700,
"preview": "package com.junkfood.seal.ui.page.command\n\nimport androidx.activity.compose.BackHandler\nimport androidx.compose.foundati"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/command/TaskLogPage.kt",
"chars": 7523,
"preview": "package com.junkfood.seal.ui.page.command\n\nimport android.util.Log\nimport androidx.compose.foundation.horizontalScroll\ni"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/download/DownloadPage.kt",
"chars": 33143,
"preview": "package com.junkfood.seal.ui.page.download\n\nimport android.Manifest\nimport android.os.Build\nimport androidx.compose.anim"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/download/DownloadSettingsDialog.kt",
"chars": 26416,
"preview": "package com.junkfood.seal.ui.page.download\n\nimport android.os.Build\nimport androidx.activity.compose.BackHandler\nimport "
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/download/HomePageViewModel.kt",
"chars": 5216,
"preview": "@file:OptIn(ExperimentalMaterial3Api::class)\n\npackage com.junkfood.seal.ui.page.download\n\nimport androidx.compose.materi"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/download/MeteredNetworkDialog.kt",
"chars": 2172,
"preview": "package com.junkfood.seal.ui.page.download\n\nimport androidx.compose.material.icons.Icons\nimport androidx.compose.materia"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/download/NotificationPermissionDialog.kt",
"chars": 1387,
"preview": "package com.junkfood.seal.ui.page.download\n\nimport androidx.compose.material.icons.Icons\nimport androidx.compose.materia"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/download/PlaylistSelectionDialog.kt",
"chars": 5058,
"preview": "@file:OptIn(ExperimentalMaterial3Api::class)\n\npackage com.junkfood.seal.ui.page.download\n\nimport androidx.compose.founda"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/download/VideoSectionSlider.kt",
"chars": 14368,
"preview": "package com.junkfood.seal.ui.page.download\n\nimport androidx.compose.foundation.clickable\nimport androidx.compose.foundat"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/ActionSheet.kt",
"chars": 19419,
"preview": "package com.junkfood.seal.ui.page.downloadv2\n\nimport android.content.res.Configuration\nimport androidx.compose.foundatio"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/DownloadPageV2.kt",
"chars": 33327,
"preview": "package com.junkfood.seal.ui.page.downloadv2\n\nimport android.content.Intent\nimport android.content.res.Configuration\nimp"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/TopBarNestedScrollConnection.kt",
"chars": 3493,
"preview": "package com.junkfood.seal.ui.page.downloadv2\n\nimport androidx.compose.animation.core.AnimationState\nimport androidx.comp"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/VideoCardV2.kt",
"chars": 23886,
"preview": "package com.junkfood.seal.ui.page.downloadv2\n\nimport android.content.res.Configuration\nimport androidx.compose.animation"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/configure/DownloadDialogV2.kt",
"chars": 44447,
"preview": "package com.junkfood.seal.ui.page.downloadv2.configure\n\nimport androidx.activity.compose.BackHandler\nimport androidx.com"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/configure/DownloadDialogViewModel.kt",
"chars": 8152,
"preview": "package com.junkfood.seal.ui.page.downloadv2.configure\n\nimport androidx.lifecycle.ViewModel\nimport androidx.lifecycle.vi"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/configure/FormatPage.kt",
"chars": 46331,
"preview": "package com.junkfood.seal.ui.page.downloadv2.configure\n\nimport android.content.Intent\nimport androidx.compose.animation."
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/configure/InputUrlDialog.kt",
"chars": 21978,
"preview": "package com.junkfood.seal.ui.page.downloadv2.configure\n\nimport androidx.compose.animation.animateColorAsState\nimport and"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/downloadv2/configure/PlaylistSelectionPage.kt",
"chars": 16754,
"preview": "package com.junkfood.seal.ui.page.downloadv2.configure\n\nimport androidx.activity.compose.BackHandler\nimport androidx.com"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/BasePreferencePage.kt",
"chars": 2348,
"preview": "package com.junkfood.seal.ui.page.settings\n\nimport androidx.compose.foundation.layout.PaddingValues\nimport androidx.comp"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/SettingsPage.kt",
"chars": 10383,
"preview": "package com.junkfood.seal.ui.page.settings\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimport"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/about/AboutPage.kt",
"chars": 11678,
"preview": "package com.junkfood.seal.ui.page.settings.about\n\nimport androidx.compose.foundation.layout.fillMaxSize\nimport androidx."
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/about/CreditsPage.kt",
"chars": 6351,
"preview": "package com.junkfood.seal.ui.page.settings.about\n\nimport androidx.compose.foundation.Image\nimport androidx.compose.found"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/about/SponsorPage.kt",
"chars": 20300,
"preview": "package com.junkfood.seal.ui.page.settings.about\n\nimport android.util.Log\nimport androidx.compose.foundation.background\n"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/about/UpdatePage.kt",
"chars": 9159,
"preview": "package com.junkfood.seal.ui.page.settings.about\n\nimport androidx.compose.foundation.layout.Arrangement\nimport androidx."
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/appearance/AppearancePreferences.kt",
"chars": 13897,
"preview": "package com.junkfood.seal.ui.page.settings.appearance\n\nimport androidx.compose.animation.core.animateDpAsState\nimport an"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/appearance/DarkThemePreferences.kt",
"chars": 4081,
"preview": "package com.junkfood.seal.ui.page.settings.appearance\n\nimport android.os.Build\nimport androidx.compose.foundation.layout"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/appearance/LanguagesPage.kt",
"chars": 10750,
"preview": "package com.junkfood.seal.ui.page.settings.appearance\n\nimport android.content.Intent\nimport android.content.pm.PackageMa"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/command/CommandTemplateDialog.kt",
"chars": 10131,
"preview": "package com.junkfood.seal.ui.page.settings.command\n\nimport androidx.compose.foundation.horizontalScroll\nimport androidx."
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/command/TemplateEditPage.kt",
"chars": 10317,
"preview": "package com.junkfood.seal.ui.page.settings.command\n\nimport androidx.compose.foundation.horizontalScroll\nimport androidx."
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/command/TemplateListPage.kt",
"chars": 19234,
"preview": "package com.junkfood.seal.ui.page.settings.command\n\nimport androidx.activity.compose.BackHandler\nimport androidx.compose"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/directory/DirectoryPreferenceDialog.kt",
"chars": 4020,
"preview": "package com.junkfood.seal.ui.page.settings.directory\n\nimport androidx.compose.foundation.layout.Column\nimport androidx.c"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/directory/DownloadDirectoryPreferences.kt",
"chars": 27455,
"preview": "@file:OptIn(ExperimentalPermissionsApi::class)\n\npackage com.junkfood.seal.ui.page.settings.directory\n\nimport android.Man"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/format/DownloadFormatPreferences.kt",
"chars": 19851,
"preview": "package com.junkfood.seal.ui.page.settings.format\n\nimport androidx.compose.foundation.layout.fillMaxSize\nimport androidx"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/format/FormatSettingDialogs.kt",
"chars": 37970,
"preview": "package com.junkfood.seal.ui.page.settings.format\n\nimport androidx.compose.animation.AnimatedContent\nimport androidx.com"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/format/SubtitlePreference.kt",
"chars": 10762,
"preview": "package com.junkfood.seal.ui.page.settings.format\n\nimport androidx.compose.foundation.layout.Column\nimport androidx.comp"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/general/AdvancedSettingDialogs.kt",
"chars": 4403,
"preview": "package com.junkfood.seal.ui.page.settings.general\n\nimport androidx.compose.foundation.layout.Arrangement\nimport android"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/general/GeneralDownloadPreferences.kt",
"chars": 24285,
"preview": "package com.junkfood.seal.ui.page.settings.general\n\nimport android.Manifest\nimport android.os.Build\nimport androidx.comp"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/general/YtdlpUpdateDialog.kt",
"chars": 9368,
"preview": "package com.junkfood.seal.ui.page.settings.general\n\nimport androidx.compose.foundation.layout.Arrangement\nimport android"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/interaction/InteractionPreferencePage.kt",
"chars": 3041,
"preview": "package com.junkfood.seal.ui.page.settings.interaction\n\nimport androidx.compose.foundation.lazy.LazyColumn\nimport androi"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/interaction/InterfaceCustomizationDialogs.kt",
"chars": 1850,
"preview": "package com.junkfood.seal.ui.page.settings.interaction\n\nimport androidx.compose.foundation.layout.padding\nimport android"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/network/CookieProfilesPage.kt",
"chars": 21765,
"preview": "package com.junkfood.seal.ui.page.settings.network\n\nimport android.content.res.Configuration\nimport android.webkit.Cooki"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/network/CookiesViewModel.kt",
"chars": 2365,
"preview": "package com.junkfood.seal.ui.page.settings.network\n\nimport androidx.lifecycle.ViewModel\nimport androidx.lifecycle.viewMo"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/network/NetworkPreferences.kt",
"chars": 8574,
"preview": "package com.junkfood.seal.ui.page.settings.network\n\nimport androidx.compose.foundation.layout.fillMaxSize\nimport android"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/network/NetworkSettingDialogs.kt",
"chars": 7575,
"preview": "package com.junkfood.seal.ui.page.settings.network\n\nimport androidx.compose.foundation.interaction.MutableInteractionSou"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/network/WebViewPage.kt",
"chars": 5355,
"preview": "package com.junkfood.seal.ui.page.settings.network\n\nimport android.annotation.SuppressLint\nimport android.util.Log\nimpor"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/settings/troubleshooting/TroubleshootingPage.kt",
"chars": 8562,
"preview": "package com.junkfood.seal.ui.page.settings.troubleshooting\n\nimport androidx.compose.foundation.layout.Spacer\nimport andr"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/videolist/ExportImportDialog.kt",
"chars": 8444,
"preview": "package com.junkfood.seal.ui.page.videolist\n\nimport android.content.res.Configuration\nimport androidx.compose.foundation"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/videolist/RemoveItemDialog.kt",
"chars": 2186,
"preview": "package com.junkfood.seal.ui.page.videolist\n\nimport androidx.compose.foundation.layout.Column\nimport androidx.compose.fo"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/videolist/VideoDetailDrawer.kt",
"chars": 9064,
"preview": "@file:OptIn(ExperimentalMaterialApi::class)\n\npackage com.junkfood.seal.ui.page.videolist\n\nimport android.content.Intent\n"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/videolist/VideoListPage.kt",
"chars": 28807,
"preview": "package com.junkfood.seal.ui.page.videolist\n\nimport androidx.activity.compose.BackHandler\nimport androidx.activity.compo"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/page/videolist/VideoListViewModel.kt",
"chars": 5558,
"preview": "package com.junkfood.seal.ui.page.videolist\n\nimport android.content.Context\nimport android.net.Uri\nimport androidx.compo"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/svg/VectorPreviews.kt",
"chars": 1813,
"preview": "package com.junkfood.seal.ui.svg\n\nimport android.content.res.Configuration\nimport androidx.compose.foundation.Image\nimpo"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/svg/__DrawableVectors.kt",
"chars": 73,
"preview": "package com.junkfood.seal.ui.svg\n\npublic object DynamicColorImageVectors\n"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/svg/drawablevectors/Coder.kt",
"chars": 67338,
"preview": "package com.junkfood.seal.ui.svg.drawablevectors\n\nimport androidx.compose.material3.MaterialTheme\nimport androidx.compos"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/svg/drawablevectors/Download.kt",
"chars": 18477,
"preview": "package com.junkfood.seal.ui.svg.drawablevectors\n\nimport androidx.compose.foundation.Image\nimport androidx.compose.mater"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/svg/drawablevectors/VideoFiles.kt",
"chars": 23341,
"preview": "package com.junkfood.seal.ui.svg.drawablevectors\n\nimport androidx.compose.material3.MaterialTheme\nimport androidx.compos"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/svg/drawablevectors/VideoSteaming.kt",
"chars": 26001,
"preview": "package com.junkfood.seal.ui.svg.drawablevectors\n\nimport androidx.compose.material3.MaterialTheme\nimport androidx.compos"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/theme/ColorScheme.kt",
"chars": 6622,
"preview": "package com.junkfood.seal.ui.theme\n\nimport androidx.compose.material3.ColorScheme\nimport androidx.compose.runtime.Compos"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/theme/Shape.kt",
"chars": 100,
"preview": "package com.junkfood.seal.ui.theme\n\nimport androidx.compose.material3.Shapes\n\nval Shapes = Shapes()\n"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/theme/Theme.kt",
"chars": 3394,
"preview": "package com.junkfood.seal.ui.theme\n\nimport android.os.Build\nimport android.view.WindowInsetsController.APPEARANCE_LIGHT_"
},
{
"path": "app/src/main/java/com/junkfood/seal/ui/theme/Type.kt",
"chars": 1604,
"preview": "@file:OptIn(ExperimentalTextApi::class, ExperimentalTextApi::class, ExperimentalTextApi::class)\n\npackage com.junkfood.se"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/DatabaseUtil.kt",
"chars": 5022,
"preview": "package com.junkfood.seal.util\n\nimport androidx.room.Room\nimport com.junkfood.seal.App.Companion.applicationScope\nimport"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/DateTimeUtil.kt",
"chars": 626,
"preview": "package com.junkfood.seal.util\n\nimport android.os.Build\nimport java.text.DateFormat\nimport java.text.SimpleDateFormat\nim"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/DownloadUtil.kt",
"chars": 41260,
"preview": "package com.junkfood.seal.util\n\nimport android.database.sqlite.SQLiteDatabase\nimport android.database.sqlite.SQLiteDatab"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/FileUtil.kt",
"chars": 8245,
"preview": "package com.junkfood.seal.util\n\nimport android.content.ClipData\nimport android.content.Context\nimport android.content.In"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/LanguageSettings.kt",
"chars": 3852,
"preview": "package com.junkfood.seal.util\n\nimport androidx.appcompat.app.AppCompatDelegate\nimport androidx.compose.runtime.Composab"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/NotificationUtil.kt",
"chars": 10333,
"preview": "package com.junkfood.seal.util\n\nimport android.annotation.SuppressLint\nimport android.app.Notification\nimport android.ap"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/PreferenceUtil.kt",
"chars": 21974,
"preview": "package com.junkfood.seal.util\n\nimport android.os.Build\nimport androidx.annotation.DeprecatedSinceApi\nimport androidx.co"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/SponsorData.kt",
"chars": 853,
"preview": "package com.junkfood.seal.util\n\nimport kotlinx.serialization.Serializable\n\n@Serializable data class SponsorData(val data"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/SponsorUtil.kt",
"chars": 1935,
"preview": "package com.junkfood.seal.util\n\nimport android.util.Base64\nimport android.util.Log\nimport androidx.annotation.CheckResul"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/TextUtil.kt",
"chars": 4758,
"preview": "package com.junkfood.seal.util\n\nimport android.content.Context\nimport android.widget.Toast\nimport androidx.annotation.Ma"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/UpdateUtil.kt",
"chars": 13688,
"preview": "package com.junkfood.seal.util\n\nimport android.content.Context\nimport android.content.Intent\nimport android.content.pm.P"
},
{
"path": "app/src/main/java/com/junkfood/seal/util/VideoInfo.kt",
"chars": 7661,
"preview": "package com.junkfood.seal.util\n\nimport kotlin.math.roundToInt\nimport kotlinx.serialization.SerialName\nimport kotlinx.ser"
},
{
"path": "app/src/main/res/drawable/ic_launcher_foreground.xml",
"chars": 4173,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"108dp\"\n android:height=\"108dp\"\n"
},
{
"path": "app/src/main/res/drawable/ic_launcher_monochrome.xml",
"chars": 3709,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"108dp\"\n android:height=\"108dp\"\n"
},
{
"path": "app/src/main/res/drawable/icons8_matrix.xml",
"chars": 1070,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "app/src/main/res/drawable/icons8_telegram_app.xml",
"chars": 1152,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "app/src/main/res/drawable/outline_cancel_24.xml",
"chars": 555,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "app/src/main/res/drawable/outline_content_copy_24.xml",
"chars": 482,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "app/src/main/res/drawable/seal.xml",
"chars": 3913,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"200dp\"\n android:height=\"200dp\"\n"
},
{
"path": "app/src/main/res/drawable-anydpi-v24/ic_stat_seal.xml",
"chars": 3897,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:width=\"24dp\"\n android:height=\"24dp\"\n "
},
{
"path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
"chars": 337,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
"chars": 337,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "app/src/main/res/resources.properties",
"chars": 26,
"preview": "unqualifiedResLocale=en-US"
},
{
"path": "app/src/main/res/values/ic_launcher_background.xml",
"chars": 120,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"ic_launcher_background\">#FFFFFF</color>\n</resources>"
},
{
"path": "app/src/main/res/values/strings.xml",
"chars": 31835,
"preview": "<resources>\n <string name=\"app_name\" translatable=\"false\">Seal</string>\n <string name=\"video_directory\">Video fold"
},
{
"path": "app/src/main/res/values/themes.xml",
"chars": 691,
"preview": "<resources>\n\n <style name=\"Theme.Seal\" parent=\"Theme.Material3.DayNight.NoActionBar\">\n <item name=\"android:sta"
},
{
"path": "app/src/main/res/values-ar/strings.xml",
"chars": 30754,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"extract_audio\">حفظ كملف صوت</string>\n <string na"
},
{
"path": "app/src/main/res/values-ar-rSA/strings.xml",
"chars": 3166,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"extract_audio\">طلع الصوت بس</string>\n <string na"
},
{
"path": "app/src/main/res/values-az/strings.xml",
"chars": 32431,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"video_directory\">Video qovluq</string>\n <string "
},
{
"path": "app/src/main/res/values-be/strings.xml",
"chars": 29981,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"download_settings_desc\">Асноўныя налады, фармат, ка"
},
{
"path": "app/src/main/res/values-bn/strings.xml",
"chars": 29315,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"video_directory\">ভিডিও ফোল্ডার</string>\n <string"
},
{
"path": "app/src/main/res/values-ca/strings.xml",
"chars": 30775,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"about\">Quant a</string>\n <string name=\"about_pag"
},
{
"path": "app/src/main/res/values-ckb/strings.xml",
"chars": 12069,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"advanced_settings\">پێشکەوتوو</string>\n <string n"
},
{
"path": "app/src/main/res/values-cs/strings.xml",
"chars": 32278,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"extract_audio\">Uložit jako zvuk</string>\n <strin"
},
{
"path": "app/src/main/res/values-da/strings.xml",
"chars": 19444,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"create_thumbnail\">Lagre som miniaturbilde</string>\n"
},
{
"path": "app/src/main/res/values-de/strings.xml",
"chars": 34092,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"create_thumbnail\">Miniaturansicht speichern</string"
},
{
"path": "app/src/main/res/values-el/strings.xml",
"chars": 30805,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"create_thumbnail\">Αποθήκευση Εξωφύλλου</string>\n "
},
{
"path": "app/src/main/res/values-es/strings.xml",
"chars": 34869,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"paste_desc\">Haz clic en el botón de «Pegar» para ob"
},
{
"path": "app/src/main/res/values-eu/strings.xml",
"chars": 4794,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"video_directory\">Bideoen kokapena</string>\n <str"
},
{
"path": "app/src/main/res/values-fa/strings.xml",
"chars": 31117,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"download\">بارگیری</string>\n <string name=\"video_"
},
{
"path": "app/src/main/res/values-fil/strings.xml",
"chars": 34830,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"extract_audio\">I-save bilang audio</string>\n <st"
},
{
"path": "app/src/main/res/values-fr/strings.xml",
"chars": 35273,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"video_directory\">Dossier vidéo</string>\n <string"
},
{
"path": "app/src/main/res/values-gl/strings.xml",
"chars": 6249,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"video_directory\">Cartafol dos videos</string>\n <"
},
{
"path": "app/src/main/res/values-hi/strings.xml",
"chars": 32363,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"video_directory\">वीडियो फ़ोल्डर</string>\n <strin"
},
{
"path": "app/src/main/res/values-hr/strings.xml",
"chars": 32087,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string name=\"settings\">Postavke</string>\n <string name=\"downl"
}
]
// ... and 165 more files (download for full content)
About this extraction
This page contains the full source code of the JunkFood02/Seal GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 365 files (2.9 MB), approximately 770.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.