Full Code of recloudstream/cloudstream for AI

master 19efb1ffc3f7 cached
1156 files
6.6 MB
1.8M tokens
1 requests
Download .txt
Showing preview only (7,161K chars total). Download the full file or copy to clipboard to get everything.
Repository: recloudstream/cloudstream
Branch: master
Commit: 19efb1ffc3f7
Files: 1156
Total size: 6.6 MB

Directory structure:
gitextract_bfixog4j/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── application-bug.yml
│   │   ├── config.yml
│   │   └── feature-request.yml
│   ├── locales.py
│   └── workflows/
│       ├── build_to_archive.yml
│       ├── generate_dokka.yml
│       ├── issue_action.yml
│       ├── prerelease.yml
│       ├── pull_request.yml
│       └── update_locales.yml
├── .gitignore
├── AI-POLICY.md
├── LICENSE
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle.kts
│   ├── lint.xml
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── com/
│       │           └── lagradost/
│       │               └── cloudstream3/
│       │                   └── ExampleInstrumentedTest.kt
│       ├── debug/
│       │   └── res/
│       │       ├── drawable/
│       │       │   └── ic_banner_foreground.xml
│       │       ├── drawable-anydpi-v24/
│       │       │   └── ic_stat_name.xml
│       │       ├── drawable-v24/
│       │       │   ├── ic_banner_background.xml
│       │       │   └── ic_launcher_foreground.xml
│       │       ├── mipmap-anydpi-v26/
│       │       │   ├── ic_banner.xml
│       │       │   ├── ic_launcher.xml
│       │       │   └── ic_launcher_round.xml
│       │       └── values/
│       │           ├── ic_launcher_background.xml
│       │           └── strings.xml
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── lagradost/
│       │   │           └── cloudstream3/
│       │   │               ├── AcraApplication.kt
│       │   │               ├── CloudStreamApp.kt
│       │   │               ├── CommonActivity.kt
│       │   │               ├── DownloaderTestImpl.kt
│       │   │               ├── MainActivity.kt
│       │   │               ├── actions/
│       │   │               │   ├── AlwaysAskAction.kt
│       │   │               │   ├── OpenInAppAction.kt
│       │   │               │   ├── VideoClickAction.kt
│       │   │               │   └── temp/
│       │   │               │       ├── Aria2Package.kt
│       │   │               │       ├── BiglyBTPackage.kt
│       │   │               │       ├── CloudStreamPackage.kt
│       │   │               │       ├── CopyClipboardAction.kt
│       │   │               │       ├── JustPlayerPackage.kt
│       │   │               │       ├── LibreTorrentPackage.kt
│       │   │               │       ├── MpvKtPackage.kt
│       │   │               │       ├── MpvPackage.kt
│       │   │               │       ├── NextPlayerPackage.kt
│       │   │               │       ├── PlayInBrowserAction.kt
│       │   │               │       ├── PlayMirrorAction.kt
│       │   │               │       ├── ViewM3U8Action.kt
│       │   │               │       ├── VlcPackage.kt
│       │   │               │       ├── WebVideoCastPackage.kt
│       │   │               │       └── fcast/
│       │   │               │           ├── FcastAction.kt
│       │   │               │           ├── FcastManager.kt
│       │   │               │           ├── FcastSession.kt
│       │   │               │           └── Packets.kt
│       │   │               ├── mvvm/
│       │   │               │   └── Lifecycle.kt
│       │   │               ├── network/
│       │   │               │   ├── CloudflareKiller.kt
│       │   │               │   ├── DdosGuardKiller.kt
│       │   │               │   ├── DohProviders.kt
│       │   │               │   └── RequestsHelper.kt
│       │   │               ├── plugins/
│       │   │               │   ├── Plugin.kt
│       │   │               │   ├── PluginManager.kt
│       │   │               │   ├── RepositoryManager.kt
│       │   │               │   └── VotingApi.kt
│       │   │               ├── receivers/
│       │   │               │   └── VideoDownloadRestartReceiver.kt
│       │   │               ├── services/
│       │   │               │   ├── BackupWorkManager.kt
│       │   │               │   ├── DownloadQueueService.kt
│       │   │               │   ├── PackageInstallerService.kt
│       │   │               │   ├── SubscriptionWorkManager.kt
│       │   │               │   └── VideoDownloadService.kt
│       │   │               ├── subtitles/
│       │   │               │   ├── AbstractSubProvider.kt
│       │   │               │   └── AbstractSubtitleEntities.kt
│       │   │               ├── syncproviders/
│       │   │               │   ├── AccountManager.kt
│       │   │               │   ├── AuthAPI.kt
│       │   │               │   ├── AuthRepo.kt
│       │   │               │   ├── BackupAPI.kt
│       │   │               │   ├── SubtitleAPI.kt
│       │   │               │   ├── SubtitleRepo.kt
│       │   │               │   ├── SyncAPI.kt
│       │   │               │   ├── SyncRepo.kt
│       │   │               │   └── providers/
│       │   │               │       ├── Addic7ed.kt
│       │   │               │       ├── AniListApi.kt
│       │   │               │       ├── KitsuApi.kt
│       │   │               │       ├── LocalList.kt
│       │   │               │       ├── MALApi.kt
│       │   │               │       ├── OpenSubtitlesApi.kt
│       │   │               │       ├── SimklApi.kt
│       │   │               │       ├── SubSource.kt
│       │   │               │       └── Subdl.kt
│       │   │               ├── ui/
│       │   │               │   ├── APIRepository.kt
│       │   │               │   ├── BaseAdapter.kt
│       │   │               │   ├── BaseFragment.kt
│       │   │               │   ├── ControllerActivity.kt
│       │   │               │   ├── CustomRecyclerViews.kt
│       │   │               │   ├── EasterEggMonkeFragment.kt
│       │   │               │   ├── MiniControllerFragment.kt
│       │   │               │   ├── NonFinalAdapterListUpdateCallback.kt
│       │   │               │   ├── WatchType.kt
│       │   │               │   ├── WebviewFragment.kt
│       │   │               │   ├── account/
│       │   │               │   │   ├── AccountAdapter.kt
│       │   │               │   │   ├── AccountHelper.kt
│       │   │               │   │   ├── AccountSelectActivity.kt
│       │   │               │   │   ├── AccountSelectLinearItemDecoration.kt
│       │   │               │   │   └── AccountViewModel.kt
│       │   │               │   ├── download/
│       │   │               │   │   ├── DownloadAdapter.kt
│       │   │               │   │   ├── DownloadButtonSetup.kt
│       │   │               │   │   ├── DownloadChildFragment.kt
│       │   │               │   │   ├── DownloadFragment.kt
│       │   │               │   │   ├── DownloadViewModel.kt
│       │   │               │   │   ├── button/
│       │   │               │   │   │   ├── BaseFetchButton.kt
│       │   │               │   │   │   ├── DownloadButton.kt
│       │   │               │   │   │   ├── PieFetchButton.kt
│       │   │               │   │   │   └── ProgressBarAnimation.kt
│       │   │               │   │   └── queue/
│       │   │               │   │       ├── DownloadQueueAdapter.kt
│       │   │               │   │       ├── DownloadQueueFragment.kt
│       │   │               │   │       └── DownloadQueueViewModel.kt
│       │   │               │   ├── home/
│       │   │               │   │   ├── HomeChildItemAdapter.kt
│       │   │               │   │   ├── HomeFragment.kt
│       │   │               │   │   ├── HomeParentItemAdapter.kt
│       │   │               │   │   ├── HomeParentItemAdapterPreview.kt
│       │   │               │   │   ├── HomeScrollAdapter.kt
│       │   │               │   │   ├── HomeScrollTransformer.kt
│       │   │               │   │   └── HomeViewModel.kt
│       │   │               │   ├── library/
│       │   │               │   │   ├── LibraryFragment.kt
│       │   │               │   │   ├── LibraryScrollTransformer.kt
│       │   │               │   │   ├── LibraryViewModel.kt
│       │   │               │   │   ├── LoadingPosterAdapter.kt
│       │   │               │   │   ├── PageAdapter.kt
│       │   │               │   │   └── ViewpagerAdapter.kt
│       │   │               │   ├── player/
│       │   │               │   │   ├── AbstractPlayerFragment.kt
│       │   │               │   │   ├── CS3IPlayer.kt
│       │   │               │   │   ├── CustomSubripParser.kt
│       │   │               │   │   ├── CustomSubtitleDecoderFactory.kt
│       │   │               │   │   ├── DownloadFileGenerator.kt
│       │   │               │   │   ├── DownloadedPlayerActivity.kt
│       │   │               │   │   ├── ExtractorLinkGenerator.kt
│       │   │               │   │   ├── FixedNextRenderersFactory.kt
│       │   │               │   │   ├── FullScreenPlayer.kt
│       │   │               │   │   ├── GeneratorPlayer.kt
│       │   │               │   │   ├── IGenerator.kt
│       │   │               │   │   ├── IPlayer.kt
│       │   │               │   │   ├── LinkGenerator.kt
│       │   │               │   │   ├── OfflinePlaybackHelper.kt
│       │   │               │   │   ├── OutlineSpan.kt
│       │   │               │   │   ├── PlayerGeneratorViewModel.kt
│       │   │               │   │   ├── PlayerPipHelper.kt
│       │   │               │   │   ├── PlayerSubtitleHelper.kt
│       │   │               │   │   ├── PreviewGenerator.kt
│       │   │               │   │   ├── RepoLinkGenerator.kt
│       │   │               │   │   ├── RoundedBackgroundColorSpan.kt
│       │   │               │   │   ├── SSLTrustManager.kt
│       │   │               │   │   ├── SubtitleOffsetItemAdapter.kt
│       │   │               │   │   ├── Torrent.kt
│       │   │               │   │   ├── UpdatedDefaultExtractorsFactory.kt
│       │   │               │   │   ├── UpdatedMatroskaExtractor.kt
│       │   │               │   │   └── source_priority/
│       │   │               │   │       ├── PriorityAdapter.kt
│       │   │               │   │       ├── ProfilesAdapter.kt
│       │   │               │   │       ├── QualityDataHelper.kt
│       │   │               │   │       ├── QualityProfileDialog.kt
│       │   │               │   │       └── SourcePriorityDialog.kt
│       │   │               │   ├── quicksearch/
│       │   │               │   │   └── QuickSearchFragment.kt
│       │   │               │   ├── result/
│       │   │               │   │   ├── ActorAdaptor.kt
│       │   │               │   │   ├── EpisodeAdapter.kt
│       │   │               │   │   ├── ImageAdapter.kt
│       │   │               │   │   ├── LinearListLayout.kt
│       │   │               │   │   ├── ResultFragment.kt
│       │   │               │   │   ├── ResultFragmentPhone.kt
│       │   │               │   │   ├── ResultFragmentTv.kt
│       │   │               │   │   ├── ResultTrailerPlayer.kt
│       │   │               │   │   ├── ResultViewModel2.kt
│       │   │               │   │   ├── SelectAdaptor.kt
│       │   │               │   │   └── SyncViewModel.kt
│       │   │               │   ├── search/
│       │   │               │   │   ├── SearchAdaptor.kt
│       │   │               │   │   ├── SearchFragment.kt
│       │   │               │   │   ├── SearchHelper.kt
│       │   │               │   │   ├── SearchHistoryAdaptor.kt
│       │   │               │   │   ├── SearchResultBuilder.kt
│       │   │               │   │   ├── SearchSuggestionAdapter.kt
│       │   │               │   │   ├── SearchSuggestionApi.kt
│       │   │               │   │   ├── SearchViewModel.kt
│       │   │               │   │   └── SyncSearchViewModel.kt
│       │   │               │   ├── settings/
│       │   │               │   │   ├── AccountAdapter.kt
│       │   │               │   │   ├── Globals.kt
│       │   │               │   │   ├── LogcatAdapter.kt
│       │   │               │   │   ├── SettingsAccount.kt
│       │   │               │   │   ├── SettingsFragment.kt
│       │   │               │   │   ├── SettingsGeneral.kt
│       │   │               │   │   ├── SettingsPlayer.kt
│       │   │               │   │   ├── SettingsProviders.kt
│       │   │               │   │   ├── SettingsUI.kt
│       │   │               │   │   ├── SettingsUpdates.kt
│       │   │               │   │   ├── extensions/
│       │   │               │   │   │   ├── ExtensionsFragment.kt
│       │   │               │   │   │   ├── ExtensionsViewModel.kt
│       │   │               │   │   │   ├── PluginAdapter.kt
│       │   │               │   │   │   ├── PluginDetailsFragment.kt
│       │   │               │   │   │   ├── PluginsFragment.kt
│       │   │               │   │   │   ├── PluginsViewModel.kt
│       │   │               │   │   │   └── RepoAdapter.kt
│       │   │               │   │   ├── testing/
│       │   │               │   │   │   ├── TestFragment.kt
│       │   │               │   │   │   ├── TestResultAdapter.kt
│       │   │               │   │   │   ├── TestView.kt
│       │   │               │   │   │   └── TestViewModel.kt
│       │   │               │   │   └── utils/
│       │   │               │   │       └── DirectoryPicker.kt
│       │   │               │   ├── setup/
│       │   │               │   │   ├── SetupFragmentExtensions.kt
│       │   │               │   │   ├── SetupFragmentLanguage.kt
│       │   │               │   │   ├── SetupFragmentLayout.kt
│       │   │               │   │   ├── SetupFragmentMedia.kt
│       │   │               │   │   └── SetupFragmentProviderLanguage.kt
│       │   │               │   └── subtitles/
│       │   │               │       ├── ChromecastSubtitlesFragment.kt
│       │   │               │       └── SubtitlesFragment.kt
│       │   │               ├── utils/
│       │   │               │   ├── AniSkip.kt
│       │   │               │   ├── AppContextUtils.kt
│       │   │               │   ├── BackPressedCallbackHelper.kt
│       │   │               │   ├── BackupUtils.kt
│       │   │               │   ├── BiometricAuthenticator.kt
│       │   │               │   ├── CastHelper.kt
│       │   │               │   ├── CastOptionsProvider.kt
│       │   │               │   ├── ConsistentLiveData.kt
│       │   │               │   ├── DataStore.kt
│       │   │               │   ├── DataStoreHelper.kt
│       │   │               │   ├── DownloadFileWorkManager.kt
│       │   │               │   ├── Event.kt
│       │   │               │   ├── FillerEpisodeCheck.kt
│       │   │               │   ├── IDisposable.kt
│       │   │               │   ├── ImageModuleCoil.kt
│       │   │               │   ├── ImageUtil.kt
│       │   │               │   ├── InAppUpdater.kt
│       │   │               │   ├── IntentHelpers.kt
│       │   │               │   ├── PackageInstaller.kt
│       │   │               │   ├── PercentageCropImageView.kt
│       │   │               │   ├── PowerManagerAPI.kt
│       │   │               │   ├── SingleSelectionHelper.kt
│       │   │               │   ├── SnackbarHelper.kt
│       │   │               │   ├── SubtitleUtils.kt
│       │   │               │   ├── SyncUtil.kt
│       │   │               │   ├── TestingUtils.kt
│       │   │               │   ├── TextUtil.kt
│       │   │               │   ├── TvChannelUtils.kt
│       │   │               │   ├── UIHelper.kt
│       │   │               │   ├── Vector2.kt
│       │   │               │   ├── VideoDownloadHelper.kt
│       │   │               │   └── downloader/
│       │   │               │       ├── DownloadFileManagement.kt
│       │   │               │       ├── DownloadManager.kt
│       │   │               │       ├── DownloadObjects.kt
│       │   │               │       ├── DownloadQueueManager.kt
│       │   │               │       └── DownloadUtils.kt
│       │   │               └── widget/
│       │   │                   ├── CenterZoomLayoutManager.kt
│       │   │                   ├── FlowLayout.kt
│       │   │                   └── LinearRecycleViewLayoutManager.kt
│       │   └── res/
│       │       ├── anim/
│       │       │   ├── enter_anim.xml
│       │       │   ├── exit_anim.xml
│       │       │   ├── go_left.xml
│       │       │   ├── go_right.xml
│       │       │   ├── pop_enter.xml
│       │       │   ├── pop_exit.xml
│       │       │   ├── rotate_around_center_point.xml
│       │       │   ├── rotate_left.xml
│       │       │   └── rotate_right.xml
│       │       ├── color/
│       │       │   ├── black_button_ripple.xml
│       │       │   ├── button_selector_color.xml
│       │       │   ├── check_selection_color.xml
│       │       │   ├── chip_color.xml
│       │       │   ├── chip_color_text.xml
│       │       │   ├── color_primary_transparent.xml
│       │       │   ├── item_select_color.xml
│       │       │   ├── item_select_color_tv.xml
│       │       │   ├── player_button_tv.xml
│       │       │   ├── player_on_button_tv.xml
│       │       │   ├── player_on_button_tv_attr.xml
│       │       │   ├── selectable_black.xml
│       │       │   ├── selectable_white.xml
│       │       │   ├── tag_stroke_color.xml
│       │       │   ├── text_selection_color.xml
│       │       │   ├── toggle_button.xml
│       │       │   ├── toggle_button_outline.xml
│       │       │   ├── toggle_button_text.xml
│       │       │   ├── toggle_selector.xml
│       │       │   ├── white_attr_20.xml
│       │       │   └── white_transparent_toggle.xml
│       │       ├── drawable/
│       │       │   ├── arrow_and_edge_24px.xml
│       │       │   ├── arrow_or_edge_24px.xml
│       │       │   ├── arrows_input_24px.xml
│       │       │   ├── background_shadow.xml
│       │       │   ├── baseline_description_24.xml
│       │       │   ├── baseline_downloading_24.xml
│       │       │   ├── baseline_fullscreen_24.xml
│       │       │   ├── baseline_fullscreen_exit_24.xml
│       │       │   ├── baseline_grid_view_24.xml
│       │       │   ├── baseline_headphones_24.xml
│       │       │   ├── baseline_help_outline_24.xml
│       │       │   ├── baseline_list_alt_24.xml
│       │       │   ├── baseline_network_ping_24.xml
│       │       │   ├── baseline_notifications_none_24.xml
│       │       │   ├── baseline_remove_24.xml
│       │       │   ├── baseline_restore_page_24.xml
│       │       │   ├── baseline_save_as_24.xml
│       │       │   ├── baseline_skip_previous_24.xml
│       │       │   ├── baseline_stop_24.xml
│       │       │   ├── baseline_sync_24.xml
│       │       │   ├── baseline_text_snippet_24.xml
│       │       │   ├── baseline_theaters_24.xml
│       │       │   ├── benene.xml
│       │       │   ├── bg_color_both.xml
│       │       │   ├── bg_color_bottom.xml
│       │       │   ├── bg_color_center.xml
│       │       │   ├── bg_color_top.xml
│       │       │   ├── bg_imdb_badge.xml
│       │       │   ├── bookmark_star_24px.xml
│       │       │   ├── circle_shape.xml
│       │       │   ├── circle_shape_dotted.xml
│       │       │   ├── circular_progress_bar.xml
│       │       │   ├── circular_progress_bar_clockwise.xml
│       │       │   ├── circular_progress_bar_counter_clockwise.xml
│       │       │   ├── circular_progress_bar_filled.xml
│       │       │   ├── circular_progress_bar_small_to_large.xml
│       │       │   ├── circular_progress_bar_top_to_bottom.xml
│       │       │   ├── clear_all_24px.xml
│       │       │   ├── cloud_2.xml
│       │       │   ├── cloud_2_gradient.xml
│       │       │   ├── cloud_2_gradient_beta.xml
│       │       │   ├── cloud_2_gradient_beta_old.xml
│       │       │   ├── cloud_2_gradient_debug.xml
│       │       │   ├── cloud_2_solid.xml
│       │       │   ├── custom_rating_bar.xml
│       │       │   ├── dashed_line_horizontal.xml
│       │       │   ├── default_cover.xml
│       │       │   ├── delete_all.xml
│       │       │   ├── dialog__window_background.xml
│       │       │   ├── download_icon_done.xml
│       │       │   ├── download_icon_error.xml
│       │       │   ├── download_icon_load.xml
│       │       │   ├── download_icon_pause.xml
│       │       │   ├── dub_bg_color.xml
│       │       │   ├── episodes_shadow.xml
│       │       │   ├── go_back_30.xml
│       │       │   ├── go_forward_30.xml
│       │       │   ├── home_alt.xml
│       │       │   ├── home_icon_filled_24.xml
│       │       │   ├── home_icon_outline_24.xml
│       │       │   ├── home_icon_selector.xml
│       │       │   ├── hourglass_24.xml
│       │       │   ├── ic_anilist_icon.xml
│       │       │   ├── ic_banner_foreground.xml
│       │       │   ├── ic_baseline_add_24.xml
│       │       │   ├── ic_baseline_arrow_back_24.xml
│       │       │   ├── ic_baseline_arrow_back_ios_24.xml
│       │       │   ├── ic_baseline_arrow_forward_24.xml
│       │       │   ├── ic_baseline_aspect_ratio_24.xml
│       │       │   ├── ic_baseline_autorenew_24.xml
│       │       │   ├── ic_baseline_bookmark_24.xml
│       │       │   ├── ic_baseline_bookmark_border_24.xml
│       │       │   ├── ic_baseline_brightness_1_24.xml
│       │       │   ├── ic_baseline_brightness_2_24.xml
│       │       │   ├── ic_baseline_brightness_3_24.xml
│       │       │   ├── ic_baseline_brightness_4_24.xml
│       │       │   ├── ic_baseline_brightness_5_24.xml
│       │       │   ├── ic_baseline_brightness_6_24.xml
│       │       │   ├── ic_baseline_brightness_7_24.xml
│       │       │   ├── ic_baseline_check_24.xml
│       │       │   ├── ic_baseline_check_24_listview.xml
│       │       │   ├── ic_baseline_clear_24.xml
│       │       │   ├── ic_baseline_close_24.xml
│       │       │   ├── ic_baseline_collections_bookmark_24.xml
│       │       │   ├── ic_baseline_color_lens_24.xml
│       │       │   ├── ic_baseline_construction_24.xml
│       │       │   ├── ic_baseline_delete_outline_24.xml
│       │       │   ├── ic_baseline_developer_mode_24.xml
│       │       │   ├── ic_baseline_discord_24.xml
│       │       │   ├── ic_baseline_dns_24.xml
│       │       │   ├── ic_baseline_edit_24.xml
│       │       │   ├── ic_baseline_equalizer_24.xml
│       │       │   ├── ic_baseline_exit_24.xml
│       │       │   ├── ic_baseline_extension_24.xml
│       │       │   ├── ic_baseline_fast_forward_24.xml
│       │       │   ├── ic_baseline_favorite_24.xml
│       │       │   ├── ic_baseline_favorite_border_24.xml
│       │       │   ├── ic_baseline_film_roll_24.xml
│       │       │   ├── ic_baseline_filter_list_24.xml
│       │       │   ├── ic_baseline_folder_open_24.xml
│       │       │   ├── ic_baseline_hd_24.xml
│       │       │   ├── ic_baseline_hearing_24.xml
│       │       │   ├── ic_baseline_keyboard_arrow_down_24.xml
│       │       │   ├── ic_baseline_keyboard_arrow_left_24.xml
│       │       │   ├── ic_baseline_keyboard_arrow_right_24.xml
│       │       │   ├── ic_baseline_language_24.xml
│       │       │   ├── ic_baseline_more_vert_24.xml
│       │       │   ├── ic_baseline_north_west_24.xml
│       │       │   ├── ic_baseline_notifications_active_24.xml
│       │       │   ├── ic_baseline_ondemand_video_24.xml
│       │       │   ├── ic_baseline_open_in_new_24.xml
│       │       │   ├── ic_baseline_pause_24.xml
│       │       │   ├── ic_baseline_people_24.xml
│       │       │   ├── ic_baseline_picture_in_picture_alt_24.xml
│       │       │   ├── ic_baseline_play_arrow_24.xml
│       │       │   ├── ic_baseline_playlist_play_24.xml
│       │       │   ├── ic_baseline_public_24.xml
│       │       │   ├── ic_baseline_remove_red_eye_24.xml
│       │       │   ├── ic_baseline_replay_24.xml
│       │       │   ├── ic_baseline_restart_24.xml
│       │       │   ├── ic_baseline_resume_arrow.xml
│       │       │   ├── ic_baseline_resume_arrow2.xml
│       │       │   ├── ic_baseline_skip_next_24.xml
│       │       │   ├── ic_baseline_skip_next_24_big.xml
│       │       │   ├── ic_baseline_skip_next_rounded_24.xml
│       │       │   ├── ic_baseline_sort_24.xml
│       │       │   ├── ic_baseline_speed_24.xml
│       │       │   ├── ic_baseline_star_24.xml
│       │       │   ├── ic_baseline_star_border_24.xml
│       │       │   ├── ic_baseline_storage_24.xml
│       │       │   ├── ic_baseline_subtitles_24.xml
│       │       │   ├── ic_baseline_system_update_24.xml
│       │       │   ├── ic_baseline_text_format_24.xml
│       │       │   ├── ic_baseline_thumb_down_24.xml
│       │       │   ├── ic_baseline_thumb_up_24.xml
│       │       │   ├── ic_baseline_touch_app_24.xml
│       │       │   ├── ic_baseline_tune_24.xml
│       │       │   ├── ic_baseline_tv_24.xml
│       │       │   ├── ic_baseline_visibility_off_24.xml
│       │       │   ├── ic_baseline_volume_down_24.xml
│       │       │   ├── ic_baseline_volume_mute_24.xml
│       │       │   ├── ic_baseline_volume_up_24.xml
│       │       │   ├── ic_baseline_warning_24.xml
│       │       │   ├── ic_battery.xml
│       │       │   ├── ic_cloudstream_monochrome.xml
│       │       │   ├── ic_cloudstream_monochrome_big.xml
│       │       │   ├── ic_cloudstreamlogotv.xml
│       │       │   ├── ic_cloudstreamlogotv_2.xml
│       │       │   ├── ic_cloudstreamlogotv_pre.xml
│       │       │   ├── ic_cloudstreamlogotv_pre_2.xml
│       │       │   ├── ic_dashboard_black_24dp.xml
│       │       │   ├── ic_filled_notifications_24dp.xml
│       │       │   ├── ic_fingerprint.xml
│       │       │   ├── ic_github_logo.xml
│       │       │   ├── ic_home_black_24dp.xml
│       │       │   ├── ic_launcher_background.xml
│       │       │   ├── ic_launcher_foreground.xml
│       │       │   ├── ic_mic.xml
│       │       │   ├── ic_network_stream.xml
│       │       │   ├── ic_notifications_black_24dp.xml
│       │       │   ├── ic_offline_pin_24.xml
│       │       │   ├── ic_outline_account_circle_24.xml
│       │       │   ├── ic_outline_home_24.xml
│       │       │   ├── ic_outline_info_24.xml
│       │       │   ├── ic_outline_notifications_24dp.xml
│       │       │   ├── ic_outline_remove_red_eye_24.xml
│       │       │   ├── ic_outline_settings_24.xml
│       │       │   ├── ic_outline_share_24.xml
│       │       │   ├── ic_outline_subtitles_24.xml
│       │       │   ├── ic_outline_voice_over_off_24.xml
│       │       │   ├── ic_refresh.xml
│       │       │   ├── indicator_background.xml
│       │       │   ├── kid_star_24px.xml
│       │       │   ├── kitsu_icon.xml
│       │       │   ├── library_icon.xml
│       │       │   ├── library_icon_filled.xml
│       │       │   ├── library_icon_selector.xml
│       │       │   ├── mal_logo.xml
│       │       │   ├── material_outline_background.xml
│       │       │   ├── monke_benene.xml
│       │       │   ├── monke_burrito.xml
│       │       │   ├── monke_coco.xml
│       │       │   ├── monke_cookie.xml
│       │       │   ├── monke_drink.xml
│       │       │   ├── monke_flusdered.xml
│       │       │   ├── monke_funny.xml
│       │       │   ├── monke_like.xml
│       │       │   ├── monke_party.xml
│       │       │   ├── monke_sob.xml
│       │       │   ├── netflix_download.xml
│       │       │   ├── netflix_download_batch.xml
│       │       │   ├── netflix_pause.xml
│       │       │   ├── netflix_play.xml
│       │       │   ├── netflix_skip_back.xml
│       │       │   ├── netflix_skip_forward.xml
│       │       │   ├── notifications_icon_selector.xml
│       │       │   ├── open_subtitles_icon.xml
│       │       │   ├── outline.xml
│       │       │   ├── outline_big_15_gray.xml
│       │       │   ├── outline_big_20.xml
│       │       │   ├── outline_big_20_gray.xml
│       │       │   ├── outline_big_25_gray.xml
│       │       │   ├── outline_big_35_gray.xml
│       │       │   ├── outline_bookmark_add_24.xml
│       │       │   ├── outline_card.xml
│       │       │   ├── outline_drawable.xml
│       │       │   ├── outline_drawable_forced.xml
│       │       │   ├── outline_drawable_forced_round.xml
│       │       │   ├── outline_drawable_less.xml
│       │       │   ├── outline_drawable_less_inset.xml
│       │       │   ├── outline_drawable_round_20.xml
│       │       │   ├── outline_less.xml
│       │       │   ├── pause_to_play.xml
│       │       │   ├── pin_ic.xml
│       │       │   ├── play_button.xml
│       │       │   ├── play_button_transparent.xml
│       │       │   ├── play_to_pause.xml
│       │       │   ├── player_button_tv.xml
│       │       │   ├── player_button_tv_attr.xml
│       │       │   ├── player_button_tv_attr_no_bg.xml
│       │       │   ├── player_gradient_tv.xml
│       │       │   ├── preview_seekbar_24.xml
│       │       │   ├── progress_drawable_vertical.xml
│       │       │   ├── question_mark_24.xml
│       │       │   ├── quick_novel_icon.xml
│       │       │   ├── rating_bg_color.xml
│       │       │   ├── rating_empty.xml
│       │       │   ├── rating_fill.xml
│       │       │   ├── rddone.xml
│       │       │   ├── rderror.xml
│       │       │   ├── rdload.xml
│       │       │   ├── rdpause.xml
│       │       │   ├── round_keyboard_arrow_up_24.xml
│       │       │   ├── rounded_dialog.xml
│       │       │   ├── rounded_outline.xml
│       │       │   ├── rounded_progress.xml
│       │       │   ├── rounded_select_ripple.xml
│       │       │   ├── screen_rotation.xml
│       │       │   ├── search_background.xml
│       │       │   ├── search_icon.xml
│       │       │   ├── settings_alt.xml
│       │       │   ├── settings_icon_filled.xml
│       │       │   ├── settings_icon_outline.xml
│       │       │   ├── settings_icon_selector.xml
│       │       │   ├── simkl_logo.xml
│       │       │   ├── solid_primary.xml
│       │       │   ├── speedup.xml
│       │       │   ├── splash_background.xml
│       │       │   ├── storage_bar_left.xml
│       │       │   ├── storage_bar_left_box.xml
│       │       │   ├── storage_bar_mid.xml
│       │       │   ├── storage_bar_mid_box.xml
│       │       │   ├── storage_bar_right.xml
│       │       │   ├── storage_bar_right_box.xml
│       │       │   ├── sub_bg_color.xml
│       │       │   ├── subdl_logo_big.xml
│       │       │   ├── subtitles_background_gradient.xml
│       │       │   ├── sun_1.xml
│       │       │   ├── sun_2.xml
│       │       │   ├── sun_3.xml
│       │       │   ├── sun_4.xml
│       │       │   ├── sun_5.xml
│       │       │   ├── sun_6.xml
│       │       │   ├── sun_7.xml
│       │       │   ├── sun_7_24.xml
│       │       │   ├── tab_selector.xml
│       │       │   ├── title_24px.xml
│       │       │   ├── title_shadow.xml
│       │       │   ├── type_bg_color.xml
│       │       │   ├── video_bottom_button.xml
│       │       │   ├── video_frame.xml
│       │       │   ├── video_locked.xml
│       │       │   ├── video_outline.xml
│       │       │   ├── video_pause.xml
│       │       │   ├── video_play.xml
│       │       │   ├── video_tap_button.xml
│       │       │   ├── video_tap_button_always_white.xml
│       │       │   ├── video_tap_button_skip.xml
│       │       │   └── video_unlocked.xml
│       │       ├── drawable-v24/
│       │       │   ├── ic_banner_background.xml
│       │       │   ├── ic_banner_foreground.xml
│       │       │   └── ic_launcher_foreground.xml
│       │       ├── font/
│       │       │   └── google_sans.xml
│       │       ├── layout/
│       │       │   ├── account_edit_dialog.xml
│       │       │   ├── account_list_item.xml
│       │       │   ├── account_list_item_add.xml
│       │       │   ├── account_list_item_edit.xml
│       │       │   ├── account_managment.xml
│       │       │   ├── account_select_linear.xml
│       │       │   ├── account_single.xml
│       │       │   ├── account_switch.xml
│       │       │   ├── activity_account_select.xml
│       │       │   ├── activity_main.xml
│       │       │   ├── activity_main_tv.xml
│       │       │   ├── add_account_input.xml
│       │       │   ├── add_remove_sites.xml
│       │       │   ├── add_repo_input.xml
│       │       │   ├── add_site_input.xml
│       │       │   ├── bottom_input_dialog.xml
│       │       │   ├── bottom_loading.xml
│       │       │   ├── bottom_resultview_preview.xml
│       │       │   ├── bottom_resultview_preview_tv.xml
│       │       │   ├── bottom_selection_dialog.xml
│       │       │   ├── bottom_selection_dialog_direct.xml
│       │       │   ├── bottom_text_dialog.xml
│       │       │   ├── cast_item.xml
│       │       │   ├── chromecast_subtitle_settings.xml
│       │       │   ├── confirm_exit_dialog.xml
│       │       │   ├── custom_preference_category_material.xml
│       │       │   ├── custom_preference_material.xml
│       │       │   ├── custom_preference_widget_seekbar.xml
│       │       │   ├── device_auth.xml
│       │       │   ├── dialog_loading.xml
│       │       │   ├── dialog_online_subtitles.xml
│       │       │   ├── download_button.xml
│       │       │   ├── download_button_layout.xml
│       │       │   ├── download_button_view.xml
│       │       │   ├── download_child_episode.xml
│       │       │   ├── download_header_episode.xml
│       │       │   ├── download_queue_item.xml
│       │       │   ├── empty_layout.xml
│       │       │   ├── extra_brightness_overlay.xml
│       │       │   ├── fragment_child_downloads.xml
│       │       │   ├── fragment_download_queue.xml
│       │       │   ├── fragment_downloads.xml
│       │       │   ├── fragment_easter_egg_monke.xml
│       │       │   ├── fragment_extensions.xml
│       │       │   ├── fragment_home.xml
│       │       │   ├── fragment_home_head.xml
│       │       │   ├── fragment_home_head_tv.xml
│       │       │   ├── fragment_home_tv.xml
│       │       │   ├── fragment_library.xml
│       │       │   ├── fragment_library_tv.xml
│       │       │   ├── fragment_player.xml
│       │       │   ├── fragment_player_tv.xml
│       │       │   ├── fragment_plugin_details.xml
│       │       │   ├── fragment_plugins.xml
│       │       │   ├── fragment_result.xml
│       │       │   ├── fragment_result_swipe.xml
│       │       │   ├── fragment_result_tv.xml
│       │       │   ├── fragment_search.xml
│       │       │   ├── fragment_search_tv.xml
│       │       │   ├── fragment_setup_extensions.xml
│       │       │   ├── fragment_setup_language.xml
│       │       │   ├── fragment_setup_layout.xml
│       │       │   ├── fragment_setup_media.xml
│       │       │   ├── fragment_setup_provider_languages.xml
│       │       │   ├── fragment_testing.xml
│       │       │   ├── fragment_trailer.xml
│       │       │   ├── fragment_webview.xml
│       │       │   ├── home_episodes_expanded.xml
│       │       │   ├── home_remove_grid.xml
│       │       │   ├── home_remove_grid_expanded.xml
│       │       │   ├── home_result_big_grid.xml
│       │       │   ├── home_result_grid.xml
│       │       │   ├── home_result_grid_expanded.xml
│       │       │   ├── home_scroll_view.xml
│       │       │   ├── home_scroll_view_tv.xml
│       │       │   ├── home_select_mainpage.xml
│       │       │   ├── homepage_parent.xml
│       │       │   ├── homepage_parent_emulator.xml
│       │       │   ├── homepage_parent_tv.xml
│       │       │   ├── item_logcat.xml
│       │       │   ├── library_viewpager_page.xml
│       │       │   ├── loading_downloads.xml
│       │       │   ├── loading_episode.xml
│       │       │   ├── loading_line.xml
│       │       │   ├── loading_line_short.xml
│       │       │   ├── loading_line_short_center.xml
│       │       │   ├── loading_list.xml
│       │       │   ├── loading_poster.xml
│       │       │   ├── loading_poster_dynamic.xml
│       │       │   ├── lock_pin_dialog.xml
│       │       │   ├── logcat.xml
│       │       │   ├── main_settings.xml
│       │       │   ├── options_popup_tv.xml
│       │       │   ├── player_custom_layout.xml
│       │       │   ├── player_custom_layout_tv.xml
│       │       │   ├── player_prioritize_item.xml
│       │       │   ├── player_quality_profile_dialog.xml
│       │       │   ├── player_quality_profile_item.xml
│       │       │   ├── player_select_source_and_subs.xml
│       │       │   ├── player_select_source_priority.xml
│       │       │   ├── player_select_tracks.xml
│       │       │   ├── provider_list.xml
│       │       │   ├── provider_test_item.xml
│       │       │   ├── quick_search.xml
│       │       │   ├── rail_footer.xml
│       │       │   ├── rail_header.xml
│       │       │   ├── repository_item.xml
│       │       │   ├── repository_item_tv.xml
│       │       │   ├── result_episode.xml
│       │       │   ├── result_episode_large.xml
│       │       │   ├── result_mini_image.xml
│       │       │   ├── result_poster.xml
│       │       │   ├── result_recommendations.xml
│       │       │   ├── result_selection.xml
│       │       │   ├── result_sync.xml
│       │       │   ├── result_tag.xml
│       │       │   ├── search_history_footer.xml
│       │       │   ├── search_history_item.xml
│       │       │   ├── search_result_compact.xml
│       │       │   ├── search_result_grid.xml
│       │       │   ├── search_result_grid_expanded.xml
│       │       │   ├── search_result_super_compact.xml
│       │       │   ├── search_suggestion_footer.xml
│       │       │   ├── search_suggestion_item.xml
│       │       │   ├── settings_title_top.xml
│       │       │   ├── sort_bottom_footer_add_choice.xml
│       │       │   ├── sort_bottom_sheet.xml
│       │       │   ├── sort_bottom_single_choice.xml
│       │       │   ├── sort_bottom_single_choice_color.xml
│       │       │   ├── sort_bottom_single_choice_double_text.xml
│       │       │   ├── sort_bottom_single_choice_no_checkmark.xml
│       │       │   ├── sort_bottom_single_provider_choice.xml
│       │       │   ├── speed_dialog.xml
│       │       │   ├── standard_toolbar.xml
│       │       │   ├── stream_input.xml
│       │       │   ├── subtitle_offset.xml
│       │       │   ├── subtitle_offset_item.xml
│       │       │   ├── subtitle_settings.xml
│       │       │   ├── subtitle_settings_dialog.xml
│       │       │   ├── toast.xml
│       │       │   ├── trailer_custom_layout.xml
│       │       │   ├── tvtypes_chips.xml
│       │       │   ├── tvtypes_chips_scroll.xml
│       │       │   └── view_test.xml
│       │       ├── layout-port/
│       │       │   ├── player_select_source_and_subs.xml
│       │       │   ├── player_select_source_priority.xml
│       │       │   └── subtitle_offset.xml
│       │       ├── menu/
│       │       │   ├── bottom_nav_menu.xml
│       │       │   ├── cast_expanded_controller_menu.xml
│       │       │   ├── download_queue.xml
│       │       │   ├── library_menu.xml
│       │       │   └── repository.xml
│       │       ├── mipmap-anydpi-v26/
│       │       │   ├── ic_banner.xml
│       │       │   ├── ic_launcher.xml
│       │       │   └── ic_launcher_round.xml
│       │       ├── navigation/
│       │       │   └── mobile_navigation.xml
│       │       ├── values/
│       │       │   ├── array.xml
│       │       │   ├── attrs.xml
│       │       │   ├── colors.xml
│       │       │   ├── dimens.xml
│       │       │   ├── donottranslate-strings.xml
│       │       │   ├── ic_launcher_background.xml
│       │       │   ├── strings.xml
│       │       │   └── styles.xml
│       │       ├── values-arz/
│       │       │   └── strings.xml
│       │       ├── values-b+af/
│       │       │   └── strings.xml
│       │       ├── values-b+am/
│       │       │   └── strings.xml
│       │       ├── values-b+apc/
│       │       │   └── strings.xml
│       │       ├── values-b+ar/
│       │       │   └── strings.xml
│       │       ├── values-b+ars/
│       │       │   └── strings.xml
│       │       ├── values-b+as/
│       │       │   └── strings.xml
│       │       ├── values-b+az/
│       │       │   └── strings.xml
│       │       ├── values-b+bg/
│       │       │   └── strings.xml
│       │       ├── values-b+bn/
│       │       │   └── strings.xml
│       │       ├── values-b+ckb/
│       │       │   └── strings.xml
│       │       ├── values-b+cs/
│       │       │   └── strings.xml
│       │       ├── values-b+de/
│       │       │   └── strings.xml
│       │       ├── values-b+el/
│       │       │   └── strings.xml
│       │       ├── values-b+eo/
│       │       │   └── strings.xml
│       │       ├── values-b+es/
│       │       │   ├── array.xml
│       │       │   └── strings.xml
│       │       ├── values-b+fa/
│       │       │   └── strings.xml
│       │       ├── values-b+fil/
│       │       │   └── strings.xml
│       │       ├── values-b+fr/
│       │       │   └── strings.xml
│       │       ├── values-b+gl/
│       │       │   └── strings.xml
│       │       ├── values-b+hi/
│       │       │   └── strings.xml
│       │       ├── values-b+hr/
│       │       │   └── strings.xml
│       │       ├── values-b+hu/
│       │       │   └── strings.xml
│       │       ├── values-b+in/
│       │       │   └── strings.xml
│       │       ├── values-b+it/
│       │       │   └── strings.xml
│       │       ├── values-b+iw/
│       │       │   └── strings.xml
│       │       ├── values-b+ja/
│       │       │   └── strings.xml
│       │       ├── values-b+kn/
│       │       │   └── strings.xml
│       │       ├── values-b+ko/
│       │       │   └── strings.xml
│       │       ├── values-b+lt/
│       │       │   └── strings.xml
│       │       ├── values-b+lv/
│       │       │   └── strings.xml
│       │       ├── values-b+mk/
│       │       │   └── strings.xml
│       │       ├── values-b+ml/
│       │       │   └── strings.xml
│       │       ├── values-b+ms/
│       │       │   └── strings.xml
│       │       ├── values-b+mt/
│       │       │   └── strings.xml
│       │       ├── values-b+my/
│       │       │   └── strings.xml
│       │       ├── values-b+ne/
│       │       │   └── strings.xml
│       │       ├── values-b+nl/
│       │       │   └── strings.xml
│       │       ├── values-b+nn/
│       │       │   └── strings.xml
│       │       ├── values-b+no/
│       │       │   └── strings.xml
│       │       ├── values-b+or/
│       │       │   └── strings.xml
│       │       ├── values-b+pl/
│       │       │   ├── array.xml
│       │       │   └── strings.xml
│       │       ├── values-b+pt/
│       │       │   └── strings.xml
│       │       ├── values-b+pt+BR/
│       │       │   └── strings.xml
│       │       ├── values-b+qt/
│       │       │   └── strings.xml
│       │       ├── values-b+ro/
│       │       │   └── strings.xml
│       │       ├── values-b+ru/
│       │       │   └── strings.xml
│       │       ├── values-b+sk/
│       │       │   └── strings.xml
│       │       ├── values-b+so/
│       │       │   └── strings.xml
│       │       ├── values-b+sv/
│       │       │   └── strings.xml
│       │       ├── values-b+ta/
│       │       │   └── strings.xml
│       │       ├── values-b+ti/
│       │       │   └── strings.xml
│       │       ├── values-b+tl/
│       │       │   └── strings.xml
│       │       ├── values-b+tr/
│       │       │   ├── array.xml
│       │       │   └── strings.xml
│       │       ├── values-b+uk/
│       │       │   └── strings.xml
│       │       ├── values-b+ur/
│       │       │   └── strings.xml
│       │       ├── values-b+vi/
│       │       │   ├── array.xml
│       │       │   └── strings.xml
│       │       ├── values-b+zh/
│       │       │   └── strings.xml
│       │       ├── values-b+zh+TW/
│       │       │   └── strings.xml
│       │       ├── values-be/
│       │       │   └── strings.xml
│       │       ├── values-ca/
│       │       │   └── strings.xml
│       │       └── xml/
│       │           ├── backup_descriptor.xml
│       │           ├── data_extraction_rules.xml
│       │           ├── provider_paths.xml
│       │           ├── settings_account.xml
│       │           ├── settings_general.xml
│       │           ├── settings_player.xml
│       │           ├── settings_providers.xml
│       │           ├── settings_ui.xml
│       │           └── settings_updates.xml
│       ├── prerelease/
│       │   └── res/
│       │       ├── drawable/
│       │       │   └── ic_banner_foreground.xml
│       │       ├── drawable-v24/
│       │       │   ├── ic_banner_background.xml
│       │       │   └── ic_launcher_foreground.xml
│       │       ├── mipmap-anydpi-v26/
│       │       │   ├── ic_banner.xml
│       │       │   ├── ic_launcher.xml
│       │       │   └── ic_launcher_round.xml
│       │       └── values/
│       │           ├── ic_launcher_background.xml
│       │           └── strings.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── lagradost/
│                       └── cloudstream3/
│                           ├── ProviderTests.kt
│                           └── SubtitleSelectionTest.kt
├── build.gradle.kts
├── discoverium.yml
├── docs/
│   ├── .gitignore
│   └── build.gradle.kts
├── fastlane/
│   └── metadata/
│       └── android/
│           ├── af/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── am/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── apc/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ar/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ar-SA/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── as/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── be/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── bg/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ca/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ckb/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── cs-CZ/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── de-DE/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── el-GR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── en-US/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── es-AR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── es-ES/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── fa-IR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── fr-FR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── hi-IN/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── hr/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── hu-HU/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── id/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── it-IT/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ja-JP/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ko-KR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── lt/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── lv/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── mk-MK/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ml-IN/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── mt/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── nl-NL/
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── no-NO/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── or/
│           │   └── changelogs/
│           │       └── 2.txt
│           ├── pa/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── pl-PL/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── pt/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── pt-BR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ro/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ru-RU/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── sk/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── sv-SE/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ta-IN/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── tr-TR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── uk/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ur/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── vi/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── zh-CN/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           └── zh-TW/
│               ├── changelogs/
│               │   └── 2.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
├── jitpack.yml
├── library/
│   ├── .gitignore
│   ├── build.gradle.kts
│   ├── lint.xml
│   └── src/
│       ├── androidMain/
│       │   ├── AndroidManifest.xml
│       │   └── kotlin/
│       │       └── com/
│       │           └── lagradost/
│       │               ├── api/
│       │               │   ├── ContextHelper.android.kt
│       │               │   └── Log.kt
│       │               └── cloudstream3/
│       │                   ├── network/
│       │                   │   └── WebViewResolver.android.kt
│       │                   └── utils/
│       │                       └── Coroutines.android.kt
│       ├── commonMain/
│       │   └── kotlin/
│       │       └── com/
│       │           └── lagradost/
│       │               ├── api/
│       │               │   ├── ContextHelper.kt
│       │               │   └── Log.kt
│       │               └── cloudstream3/
│       │                   ├── MainAPI.kt
│       │                   ├── MainActivity.kt
│       │                   ├── ParCollections.kt
│       │                   ├── extractors/
│       │                   │   ├── Acefile.kt
│       │                   │   ├── Bigwarp.kt
│       │                   │   ├── Blogger.kt
│       │                   │   ├── ByseSX.kt
│       │                   │   ├── Cda.kt
│       │                   │   ├── CineMMRedirect.kt
│       │                   │   ├── CloudMailRuExtractor.kt
│       │                   │   ├── ContentXExtractor.kt
│       │                   │   ├── Dailymotion.kt
│       │                   │   ├── DoodExtractor.kt
│       │                   │   ├── Embedgram.kt
│       │                   │   ├── EmturbovidExtractor.kt
│       │                   │   ├── Evolaod.kt
│       │                   │   ├── Fastream.kt
│       │                   │   ├── Filemoon.kt
│       │                   │   ├── Filesim.kt
│       │                   │   ├── GDMirrorbot.kt
│       │                   │   ├── GUpload.kt
│       │                   │   ├── GamoVideo.kt
│       │                   │   ├── Gdriveplayer.kt
│       │                   │   ├── GenericM3U8.kt
│       │                   │   ├── Gofile.kt
│       │                   │   ├── GoodstreamExtractor.kt
│       │                   │   ├── HDMomPlayerExtractor.kt
│       │                   │   ├── HDPlayerSystemExtractor.kt
│       │                   │   ├── HDStreamAbleExtractor.kt
│       │                   │   ├── HotlingerExtractor.kt
│       │                   │   ├── HubCloud.kt
│       │                   │   ├── Hxfile.kt
│       │                   │   ├── InternetArchive.kt
│       │                   │   ├── JWPlayer.kt
│       │                   │   ├── Jeniusplay.kt
│       │                   │   ├── Krakenfiles.kt
│       │                   │   ├── Linkbox.kt
│       │                   │   ├── LuluStream.kt
│       │                   │   ├── M3u8Manifest.kt
│       │                   │   ├── MailRuExtractor.kt
│       │                   │   ├── Maxstream.kt
│       │                   │   ├── Mediafire.kt
│       │                   │   ├── Minoplres.kt
│       │                   │   ├── MixDrop.kt
│       │                   │   ├── Moviehab.kt
│       │                   │   ├── Mp4Upload.kt
│       │                   │   ├── MultiQuality.kt
│       │                   │   ├── Mvidoo.kt
│       │                   │   ├── OdnoklassnikiExtractor.kt
│       │                   │   ├── OkRuExtractor.kt
│       │                   │   ├── PeaceMakerstExtractor.kt
│       │                   │   ├── Pelisplus.kt
│       │                   │   ├── PixelDrainExtractor.kt
│       │                   │   ├── PlayLtXyz.kt
│       │                   │   ├── PlayerVoxzer.kt
│       │                   │   ├── Rabbitstream.kt
│       │                   │   ├── RapidVidExtractor.kt
│       │                   │   ├── SBPlay.kt
│       │                   │   ├── SecvideoOnline.kt
│       │                   │   ├── Sendvid.kt
│       │                   │   ├── SibNetExtractor.kt
│       │                   │   ├── SobreatsesuypExtractor.kt
│       │                   │   ├── StreamEmbed.kt
│       │                   │   ├── StreamSB.kt
│       │                   │   ├── StreamSilk.kt
│       │                   │   ├── StreamTape.kt
│       │                   │   ├── StreamWishExtractor.kt
│       │                   │   ├── Streamhub.kt
│       │                   │   ├── Streamlare.kt
│       │                   │   ├── StreamoUpload.kt
│       │                   │   ├── Streamplay.kt
│       │                   │   ├── Streamup.kt
│       │                   │   ├── Supervideo.kt
│       │                   │   ├── TRsTXExtractor.kt
│       │                   │   ├── Tantifilm.kt
│       │                   │   ├── TauVideoExtractor.kt
│       │                   │   ├── Up4Stream.kt
│       │                   │   ├── UpstreamExtractor.kt
│       │                   │   ├── Uqload.kt
│       │                   │   ├── Userload.kt
│       │                   │   ├── Userscloud.kt
│       │                   │   ├── Uservideo.kt
│       │                   │   ├── Vicloud.kt
│       │                   │   ├── VidHidePro.kt
│       │                   │   ├── VidMoxyExtractor.kt
│       │                   │   ├── VidNest.kt
│       │                   │   ├── VidStack.kt
│       │                   │   ├── Videa.kt
│       │                   │   ├── VideoSeyredExtractor.kt
│       │                   │   ├── VidhideExtractor.kt
│       │                   │   ├── Vidmoly.kt
│       │                   │   ├── Vido.kt
│       │                   │   ├── Vidoza.kt
│       │                   │   ├── Vidsonic.kt
│       │                   │   ├── Vidstream.kt
│       │                   │   ├── Vinovo.kt
│       │                   │   ├── VkExtractor.kt
│       │                   │   ├── Voe.kt
│       │                   │   ├── Vtbe.kt
│       │                   │   ├── WatchSB.kt
│       │                   │   ├── Wibufile.kt
│       │                   │   ├── XStreamCdn.kt
│       │                   │   ├── YourUpload.kt
│       │                   │   ├── YoutubeExtractor.kt
│       │                   │   ├── Zplayer.kt
│       │                   │   └── helper/
│       │                   │       ├── AesHelper.kt
│       │                   │       ├── AsianEmbedHelper.kt
│       │                   │       ├── CryptoJSHelper.kt
│       │                   │       ├── GogoHelper.kt
│       │                   │       ├── NineAnimeHelper.kt
│       │                   │       ├── VstreamhubHelper.kt
│       │                   │       └── WcoHelper.kt
│       │                   ├── metaproviders/
│       │                   │   ├── CrossTmdbProvider.kt
│       │                   │   ├── MyDramaList.kt
│       │                   │   ├── SyncRedirector.kt
│       │                   │   ├── TmdbProvider.kt
│       │                   │   └── TraktProvider.kt
│       │                   ├── mvvm/
│       │                   │   └── ArchComponentExt.kt
│       │                   ├── network/
│       │                   │   └── WebViewResolver.kt
│       │                   ├── plugins/
│       │                   │   ├── BasePlugin.kt
│       │                   │   └── CloudstreamPlugin.kt
│       │                   ├── syncproviders/
│       │                   │   └── SyncAPI.kt
│       │                   └── utils/
│       │                       ├── AppDebug.kt
│       │                       ├── AppUtils.kt
│       │                       ├── Coroutines.kt
│       │                       ├── ExtractorApi.kt
│       │                       ├── HlsPlaylistParser.kt
│       │                       ├── JsHunter.kt
│       │                       ├── JsUnpacker.kt
│       │                       ├── M3u8Helper.kt
│       │                       ├── StringUtils.kt
│       │                       ├── SubtitleHelper.kt
│       │                       └── UnshortenUrl.kt
│       └── jvmMain/
│           └── kotlin/
│               └── com/
│                   └── lagradost/
│                       ├── api/
│                       │   ├── ContextHelper.jvm.kt
│                       │   └── Log.kt
│                       └── cloudstream3/
│                           ├── network/
│                           │   └── WebViewResolver.jvm.kt
│                           └── utils/
│                               └── Coroutines.jvm.kt
└── settings.gradle.kts

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/application-bug.yml
================================================
name: 🐞 Application Issue Report
description: Report a issue in CloudStream
labels: [bug]
body:

  - type: textarea
    id: reproduce-steps
    attributes:
      label: Steps to reproduce
      description: Provide an example of the issue.
      placeholder: |
        Example:
          1. First step
          2. Second step
          3. Issue here
    validations:
      required: true

  - type: textarea
    id: expected-behavior
    attributes:
      label: Expected behavior
      placeholder: |
        Example:
          "This should happen..."
    validations:
      required: true

  - type: textarea
    id: actual-behavior
    attributes:
      label: Actual behavior
      placeholder: |
        Example:
          "This happened instead..."
    validations:
      required: true

  - type: input
    id: cloudstream-version
    attributes:
      label: Cloudstream version and commit hash
      description: |
        You can find your Cloudstream version in **Settings**. Commit hash is the 7 character string next to the version.
      placeholder: |
        Example: "2.8.16 a49f466"
    validations:
      required: true

  - type: input
    id: android-version
    attributes:
      label: Android version
      description: |
        You can find this somewhere in your Android settings.
      placeholder: |
        Example: "Android 12"
    validations:
      required: true
   
  - type: textarea
    id: logcat
    attributes:
      label: Logcat
      placeholder: |
        To get logcat please go to Settings > Updates and backup > Show logcat 🐈.
        You can attach a file or link to some pastebin service if the file is too big.
      render: java

  - type: textarea
    id: other-details
    attributes:
      label: Other details
      placeholder: |
        Additional details and attachments.

  - type: checkboxes
    id: acknowledgements
    attributes:
      label: Acknowledgements
      description: Your issue will be closed if you haven't done these steps.
      options:
        - label: I am sure my issue is related to the app and **NOT some extension**.
          required: true
        - label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
          required: true
        - label: I have written a short but informative title.
          required: true
        - label: I have updated the app to pre-release version **[Latest](https://github.com/recloudstream/cloudstream/releases)**.
          required: true
        - label: I will fill out all of the requested information in this form.
          required: true


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
  - name: Request a new provider or report bug with an existing provider
    url: https://github.com/recloudstream
    about: EXTREMELY IMPORTANT - Please do not report any provider bugs here or request new providers. This repository does not contain any providers. Please find the appropriate repository and report your issue there or join the discord.
  - name: Discord
    url: https://discord.gg/5Hus6fM
    about: Join our discord for faster support on smaller issues.


================================================
FILE: .github/ISSUE_TEMPLATE/feature-request.yml
================================================
name: ⭐ Feature request
description: Suggest a feature to improve the app
labels: [enhancement]
body:

  - type: textarea
    id: feature-description
    attributes:
      label: Describe your suggested feature
      description: How can an existing source be improved?
      placeholder: |
        Example:
          "It should work like this..."
    validations:
      required: true

  - type: textarea
    id: other-details
    attributes:
      label: Other details
      placeholder: |
        Additional details and attachments.

  - type: checkboxes
    id: acknowledgements
    attributes:
      label: Acknowledgements
      description: Your issue will be closed if you haven't done these steps.
      options:
        - label: My suggestion is **NOT** about adding a new provider
          required: true
        - label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
          required: true

================================================
FILE: .github/locales.py
================================================
import re
import glob
import requests
import lxml.etree as ET  # builtin library doesn't preserve comments


SETTINGS_PATH = "app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsGeneral.kt"
START_MARKER = "/* begin language list */"
END_MARKER = "/* end language list */"
XML_NAME = "app/src/main/res/values-b+"
ISO_MAP_URL = "https://raw.githubusercontent.com/haliaeetus/iso-639/master/data/iso_639-1.min.json"
INDENT = " "*4

iso_map = requests.get(ISO_MAP_URL, timeout=300).json()

# Load settings file
src = open(SETTINGS_PATH, "r", encoding='utf-8').read()
before_src, rest = src.split(START_MARKER)
rest, after_src = rest.split(END_MARKER)

# Load already added langs
languages = {}
for lang in re.finditer(r'Pair\("(.*)", "(.*)"\)', rest):
    name, iso = lang.groups()
    languages[iso] = name

# Add not yet added langs
for folder in glob.glob(f"{XML_NAME}*"):
    iso = folder[len(XML_NAME):].replace("+", "-")
    if iso not in languages.keys():
        entry = iso_map.get(iso.lower(), {'nativeName':iso}) # fallback to iso code if not found
        languages[iso] = entry['nativeName'].split(',')[0] # first name if there are multiple

# Create pairs
pairs = []
for iso in sorted(languages, key=lambda iso: languages[iso].lower()): # sort by language name
    name = languages[iso]
    pairs.append(f'{INDENT}Pair("{name}", "{iso}"),')

# Update settings file
open(SETTINGS_PATH, "w+",encoding='utf-8').write(
    before_src +
    START_MARKER +
    "\n" +
    "\n".join(pairs) +
    "\n" +
    END_MARKER +
    after_src
)

# Go through each values.xml file and fix escaped \@string
for file in glob.glob(f"{XML_NAME}*/strings.xml"):
    try:
        tree = ET.parse(file)
        for child in tree.getroot():
            if not child.text:
                continue
            if child.text.startswith("\\@string/"):
                print(f"[{file}] fixing {child.attrib['name']}")
                child.text = child.text.replace("\\@string/", "@string/")
        with open(file, 'wb') as fp:
            fp.write(b'<?xml version="1.0" encoding="utf-8"?>\n')
            tree.write(fp, encoding="utf-8", method="xml", pretty_print=True, xml_declaration=False)
    except ET.ParseError as ex:
        print(f"[{file}] {ex}")


================================================
FILE: .github/workflows/build_to_archive.yml
================================================
name: Archive build

on:
  push:
    branches: [ master ]
    paths-ignore:
      - '*.md'
      - '*.json'
      - '**/wcokey.txt'
  workflow_dispatch:

concurrency:
  group: "Archive-build"
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Generate access token
      id: generate_token
      uses: tibdex/github-app-token@v2
      with:
        app_id: ${{ secrets.GH_APP_ID }}
        private_key: ${{ secrets.GH_APP_KEY }}
        repository: "recloudstream/secrets"

    - name: Generate access token (archive)
      id: generate_archive_token
      uses: tibdex/github-app-token@v2
      with:
        app_id: ${{ secrets.GH_APP_ID }}
        private_key: ${{ secrets.GH_APP_KEY }}
        repository: "recloudstream/cloudstream-archive"

    - uses: actions/checkout@v6

    - name: Set up JDK 17
      uses: actions/setup-java@v5
      with:
        distribution: temurin
        java-version: 17

    - name: Grant execute permission for gradlew
      run: chmod +x gradlew

    - name: Fetch keystore
      id: fetch_keystore
      run: |
        TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
        mkdir -p "${TMP_KEYSTORE_FILE_PATH}"
        curl -H "Authorization: token ${{ steps.generate_token.outputs.token }}" -o "${TMP_KEYSTORE_FILE_PATH}/prerelease_keystore.keystore" "https://raw.githubusercontent.com/recloudstream/secrets/master/keystore.jks"
        curl -H "Authorization: token ${{ steps.generate_token.outputs.token }}" -o "keystore_password.txt" "https://raw.githubusercontent.com/recloudstream/secrets/master/keystore_password.txt"
        KEY_PWD="$(cat keystore_password.txt)"
        echo "::add-mask::${KEY_PWD}"
        echo "key_pwd=$KEY_PWD" >> $GITHUB_OUTPUT

    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@v5
      with:
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

    - name: Run Gradle
      run: ./gradlew assemblePrerelease
      env:
        SIGNING_KEY_ALIAS: "key0"
        SIGNING_KEY_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }}
        SIGNING_STORE_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }}
        SIMKL_CLIENT_ID: ${{ secrets.SIMKL_CLIENT_ID }}
        SIMKL_CLIENT_SECRET: ${{ secrets.SIMKL_CLIENT_SECRET }}

    - uses: actions/checkout@v6
      with:
        repository: "recloudstream/cloudstream-archive"
        token: ${{ steps.generate_archive_token.outputs.token }}
        path: "archive"

    - name: Move build
      run: cp app/build/outputs/apk/prerelease/release/*.apk "archive/$(git rev-parse --short HEAD).apk"

    - name: Push archive
      run: |
        cd $GITHUB_WORKSPACE/archive
        git config --local user.email "actions@github.com"
        git config --local user.name "GitHub Actions"
        git add .
        git commit --amend -m "Build $GITHUB_SHA" || exit 0   # do not error if nothing to commit
        git push --force


================================================
FILE: .github/workflows/generate_dokka.yml
================================================
name: Dokka

on:
  push:
    branches: [ master ]
    paths-ignore:
      - '*.md'

concurrency:
  group: "dokka"
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Generate access token
        id: generate_token
        uses: tibdex/github-app-token@v2
        with:
          app_id: ${{ secrets.GH_APP_ID }}
          private_key: ${{ secrets.GH_APP_KEY }}
          repository: "recloudstream/dokka"

      - name: Checkout
        uses: actions/checkout@v6
        with:
          path: "src"

      - name: Checkout dokka
        uses: actions/checkout@v6
        with:
          repository: "recloudstream/dokka"
          path: "dokka"
          token: ${{ steps.generate_token.outputs.token }}

      - name: Clean old builds
        run: |
          cd $GITHUB_WORKSPACE/dokka/
          rm -rf "./app"
          rm -rf "./library"

      - name: Set up JDK 17
        uses: actions/setup-java@v5
        with:
          distribution: temurin
          java-version: 17

      - name: Setup Gradle
        uses: gradle/actions/setup-gradle@v5
        with:
          cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

      - name: Set up Android SDK
        uses: android-actions/setup-android@v3

      - name: Generate Dokka
        run: |
          cd $GITHUB_WORKSPACE/src/
          chmod +x gradlew
          ./gradlew docs:dokkaGeneratePublicationHtml

      - name: Copy Dokka
        run: cp -r $GITHUB_WORKSPACE/src/docs/build/dokka/html/* $GITHUB_WORKSPACE/dokka/

      - name: Push builds
        run: |
          cd $GITHUB_WORKSPACE/dokka
          touch .nojekyll
          git config --local user.email "111277985+recloudstream[bot]@users.noreply.github.com"
          git config --local user.name "recloudstream[bot]"
          git add .
          git commit --amend -m "Generate dokka for recloudstream/cloudstream@${GITHUB_SHA}" || exit 0   # do not error if nothing to commit
          git push --force


================================================
FILE: .github/workflows/issue_action.yml
================================================
name: Issue automatic actions

on:
  issues:
    types: [opened]

jobs:
  issue-moderator:
    runs-on: ubuntu-latest
    steps:
      - name: Generate access token
        id: generate_token
        uses: tibdex/github-app-token@v2
        with:
          app_id: ${{ secrets.GH_APP_ID }}
          private_key: ${{ secrets.GH_APP_KEY }}

      - name: Similarity analysis
        id: similarity
        uses: actions-cool/issues-similarity-analysis@v1
        with:
          token: ${{ steps.generate_token.outputs.token }}
          filter-threshold: 0.60
          title-excludes: ''
          comment-title: |
            ### Your issue looks similar to these issues:
            Please close if duplicate.
          comment-body: '${index}. ${similarity} #${number}'

      - name: Label if possible duplicate
        if: steps.similarity.outputs.similar-issues-found =='true'
        uses: actions/github-script@v8
        with:
          github-token: ${{ steps.generate_token.outputs.token }}
          script: |
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ["possible duplicate"]
            })

      - uses: actions/checkout@v6

      - name: Automatically close issues that dont follow the issue template
        uses: lucasbento/auto-close-issues@v1.0.2
        with:
          github-token: ${{ steps.generate_token.outputs.token }}
          issue-close-message: |
            @${issue.user.login}: hello! :wave:
            This issue is being automatically closed because it does not follow the issue template." 
          closed-issues-label: "invalid"

      - name: Check if issue mentions a provider
        id: provider_check
        env:
          GH_TEXT: "${{ github.event.issue.title }} ${{ github.event.issue.body }}"
        run: |
          wget --output-document check_issue.py "https://raw.githubusercontent.com/recloudstream/.github/master/.github/check_issue.py"
          pip3 install httpx
          RES="$(python3 ./check_issue.py)"
          echo "name=${RES}" >> $GITHUB_OUTPUT

      - name: Comment if issue mentions a provider
        if: steps.provider_check.outputs.name != 'none'
        uses: actions-cool/issues-helper@v3
        with:
          actions: 'create-comment'
          token: ${{ steps.generate_token.outputs.token }}
          body: |
            Hello ${{ github.event.issue.user.login }}. 
            Please do not report any provider bugs here. This repository does not contain any providers. Please find the appropriate repository and report your issue there or join the [discord](https://discord.gg/5Hus6fM).
            
            Found provider name: `${{ steps.provider_check.outputs.name }}`

      - name: Label if mentions provider
        if: steps.provider_check.outputs.name != 'none'
        uses: actions/github-script@v8
        with:
          github-token: ${{ steps.generate_token.outputs.token }}
          script: |
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ["possible provider issue"]
            })

      - name: Add eyes reaction to all issues
        uses: actions-cool/emoji-helper@v1.0.0
        with:
          type: 'issue'
          token: ${{ steps.generate_token.outputs.token }}
          emoji: 'eyes'


================================================
FILE: .github/workflows/prerelease.yml
================================================
name: Pre-release

on:
  push:
    branches: [ master ]
    paths-ignore:
      - '*.md'
      - '*.json'
      - '**/wcokey.txt'

concurrency:
  group: "pre-release"
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Generate access token
      id: generate_token
      uses: tibdex/github-app-token@v2
      with:
        app_id: ${{ secrets.GH_APP_ID }}
        private_key: ${{ secrets.GH_APP_KEY }}
        repository: "recloudstream/secrets"

    - uses: actions/checkout@v6

    - name: Set up JDK 17
      uses: actions/setup-java@v5
      with:
        distribution: temurin
        java-version: 17

    - name: Grant execute permission for gradlew
      run: chmod +x gradlew

    - name: Fetch keystore
      id: fetch_keystore
      run: |
        TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
        mkdir -p "${TMP_KEYSTORE_FILE_PATH}"
        curl -H "Authorization: token ${{ steps.generate_token.outputs.token }}" -o "${TMP_KEYSTORE_FILE_PATH}/prerelease_keystore.keystore" "https://raw.githubusercontent.com/recloudstream/secrets/master/keystore.jks"
        curl -H "Authorization: token ${{ steps.generate_token.outputs.token }}" -o "keystore_password.txt" "https://raw.githubusercontent.com/recloudstream/secrets/master/keystore_password.txt"
        KEY_PWD="$(cat keystore_password.txt)"
        echo "::add-mask::${KEY_PWD}"
        echo "key_pwd=$KEY_PWD" >> $GITHUB_OUTPUT

    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@v5
      with:
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

    - name: Run Gradle
      run: ./gradlew assemblePrerelease build androidSourcesJar makeJar
      env:
        SIGNING_KEY_ALIAS: "key0"
        SIGNING_KEY_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }}
        SIGNING_STORE_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }}
        SIMKL_CLIENT_ID: ${{ secrets.SIMKL_CLIENT_ID }}
        SIMKL_CLIENT_SECRET: ${{ secrets.SIMKL_CLIENT_SECRET }}
        MDL_API_KEY: ${{ secrets.MDL_API_KEY }}

    - name: Create pre-release
      uses: marvinpinto/action-automatic-releases@latest
      with:
        repo_token: "${{ secrets.GITHUB_TOKEN }}"
        automatic_release_tag: "pre-release"
        prerelease: true
        title: "Pre-release Build"
        files: |
          app/build/outputs/apk/prerelease/release/*.apk
          app/build/libs/app-sources.jar
          app/build/classes.jar


================================================
FILE: .github/workflows/pull_request.yml
================================================
name: Artifact Build

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v6

    - name: Set up JDK 17
      uses: actions/setup-java@v5
      with:
        distribution: temurin
        java-version: 17

    - name: Grant execute permission for gradlew
      run: chmod +x gradlew

    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@v5
      with:
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
        cache-read-only: false

    - name: Run Gradle
      run: ./gradlew assemblePrereleaseDebug lint

    - name: Upload Artifact
      uses: actions/upload-artifact@v6
      with:
        name: pull-request-build
        path: "app/build/outputs/apk/prerelease/debug/*.apk"


================================================
FILE: .github/workflows/update_locales.yml
================================================
name: Fix locale issues

on:
  push:
    branches: [ master ]
    paths:
      - '**.xml'
  workflow_dispatch:

concurrency:
  group: "locale"
  cancel-in-progress: true

jobs:
  create:
    runs-on: ubuntu-latest
    steps:
    - name: Generate access token
      id: generate_token
      uses: tibdex/github-app-token@v2
      with:
        app_id: ${{ secrets.GH_APP_ID }}
        private_key: ${{ secrets.GH_APP_KEY }}
        repository: "recloudstream/cloudstream"

    - uses: actions/checkout@v6
      with:
        token: ${{ steps.generate_token.outputs.token }}

    - name: Install dependencies
      run: pip3 install lxml requests

    - name: Edit files
      run: python3 .github/locales.py

    - name: Commit to the repo
      run: |
        git config --local user.email "111277985+recloudstream[bot]@users.noreply.github.com"
        git config --local user.name "recloudstream[bot]"
        git add .
        # "echo" returns true so the build succeeds, even if no changed files
        git commit -m 'chore(locales): fix locale issues' || echo
        git push


================================================
FILE: .gitignore
================================================
/local.properties
/.idea/caches
/.idea/misc.xml
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.cxx
.kotlin/*

# Created by https://www.toptal.com/developers/gitignore/api/kotlin,java,android,androidstudio,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=kotlin,java,android,androidstudio,visualstudiocode

### Android ###
# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof

### Android Patch ###
gen-external-apklibs

# Replacement of .externalNativeBuild directories introduced
# with Android Studio 3.5.

### Java ###
# Compiled class file
*.class

# Log file

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Kotlin ###
# Compiled class file

# Log file

# BlueJ files

# Mobile Tools for Java (J2ME)

# Package Files #

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml

### VisualStudioCode ###
.vscode/*

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.

# Built application files
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files

# Generated files
bin/
gen/
out/

# Gradle files
.gradle

# Signing files
.signing/

# Local configuration file (sdk path, etc)

# Proguard folder generated by Eclipse
proguard/

# Log Files

# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
.navigation/
*.ipr
*~
*.swp

# Keystore files

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Android Patch

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# NDK
obj/

# IntelliJ IDEA
*.iws
/out/

# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/assetWizardSettings.xml
.idea/gradle.xml
.idea/jarRepositories.xml
.idea/navEditor.xml

# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/

# Mobile Tools for Java (J2ME)

# Package Files #

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar

# End of https://www.toptal.com/developers/gitignore/api/kotlin,java,android,androidstudio,visualstudiocode


================================================
FILE: AI-POLICY.md
================================================
# AI Policy

AI is a great tool. However, we want you to follow these rules regarding usage of AI in order to ensure the quality of both code and discussions.

1. Always state any AI usage in pull requests and issues. 

2. Always test code before making a pull request. We do not want to test your AI generated code. 

3. Listen to humans over computers. Contributors to CloudStream know this codebase better than an AI. 

4. You should be able to explain and fix any code you submit. We do in-depth reviews and will reject low effort contributions.


================================================
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
================================================
# CloudStream

**⚠️ Warning: By default, this app doesn't provide any video sources; you have to install extensions to add functionality to the app.**

[![Discord](https://invidget.switchblade.xyz/5Hus6fM)](https://discord.gg/5Hus6fM)


## Table of Contents: 
+ [About Us:](#about_us)
+ [Installation Steps:](#install_rules)
+ [Contributing:](#contributing)
+ [Issues:](#issues)
  + [Bugs Reports:](#bug_report)
  + [Enhancement:](#enhancment)
+ [Extension Development:](#extensions)
+ [Language Support:](#languages)
+ [Further Sources](#contact_and_sources)


<a id="about_us"></a>

## About us: 

**CloudStream is a media center that prioritizes and emphasizes complete freedom and flexibility for users and developers.** 

CloudStream is an extension-based multimedia player with tracking support. There are extensions to view videos from: 

+ [Librevox (audio-books)](https://librivox.org/) 
+ [Youtube](https://www.youtube.com/)
+ [Twitch](https://www.twitch.tv/)
+ [iptv-org (A collection of publicly available IPTV (Internet Protocol television) channels from all over the world.)](https://github.com/iptv-org/iptv) 
+ [nginx](https://nginx.org/)
+ And more... 


**Please don't create illegal extensions or use any that host any copyrighted media.** For more details about our stance on the DMCA and EUCD, you can read about it on our organization: [reCloudStream](https://github.com/recloudstream)

#### Important Copyright Note: 

Our documentation is unmaintained and open to contributions; therefore, apps and sources, extensions in recommended sources, and recommended apps are not officially moderated or endorsed by CloudStream; if you or another copyright owner identify an extension that breaches your copyright, please let us know. 


#### Features:
+ **AdFree**, No ads whatsoever
+ No tracking/analytics
+ Bookmarks
+ Phone and TV support
+ Chromecast
+ Extension system for personal customization


<a id="install_rules"></a>

## Installation: 

Our documentation provides the steps to install and configure CloudStream for your streaming needs.

[Getting Started With CloudStream:](https://recloudstream.github.io/csdocs/)

<a id="contributing"></a>

## Contributing:
We **happily** accept any contributions to our project. To find out where you can start contributing towards the project, please look [at our issues tab](/cloudstream/issues)



<a id="issues"></a> 
 
### Issues: 
While we **actively** accept issues and pull requests, we do require you fill out an [template](https://github.com/recloudstream/cloudstream/issues/new/choose) for issues. These include the following:

<a id="bug_report"></a>

- [Bug Report Template: ](https://github.com/recloudstream/cloudstream/issues/new?assignees=&labels=bug&projects=&template=application-bug.yml)
  - For bug reports, we want as much info as possible, including your downloaded version of CloudeStream, device and updated version (if possible, current API),
    expected behavior of the program, and the actual behavior that the program did, most importantly we require clear, reproducible steps of the bug. If your bug can't be       reproduced, it is unlikely we'll work on your issue.
    
<a id="enhancment"></a>
  
- [Feature Request Template: ](https://github.com/recloudstream/cloudstream/issues/new?assignees=&labels=enhancement&projects=&template=feature-request.yml)
  - Before adding a feature request, please check to see if a feature request already has been requested.  


### Extensions:
 
**Further details on creating extensions for CloudStream are found in our documentation.**

[Guide: For Extension Developers](https://recloudstream.github.io/csdocs/devs/gettingstarted/) 

<a id="contact_and_sources"></a>

## Further Sources: 

As well as providing clear install steps, our [website](https://dweb.link/ipns/cloudstream.on.fleek.co/) includes a wide variety of other tools, such as: 
- [Troubleshooting](https://recloudstream.github.io/csdocs/troubleshooting/)
- [Further CloudStream Repositories](https://recloudstream.github.io/csdocs/repositories/) 
- Set-Up for other devices, such as:
  - [Android TV](https://recloudstream.github.io/csdocs/other-devices/tv/)
  - [Windows](https://recloudstream.github.io/csdocs/other-devices/windows/)
  - [Linux](https://recloudstream.github.io/csdocs/other-devices/linux/)
- And more...

<a id="languages"> </a>  

### Supported languages:

Even if you can't contribute to the code or documentation, we always look for those who can contribute to translation and language support. Your contribution is exceptionally appreciated; you can check our translation from the figure below. 

<a href="https://hosted.weblate.org/engage/cloudstream/">
  <img src="https://hosted.weblate.org/widgets/cloudstream/-/app/multi-auto.svg" alt="Translation status" />
</a>


================================================
FILE: app/.gitignore
================================================
/build

================================================
FILE: app/build.gradle.kts
================================================
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import org.jetbrains.dokka.gradle.engine.parameters.KotlinPlatform
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.dokka)
    alias(libs.plugins.kotlin.android)
}

val javaTarget = JvmTarget.fromTarget(libs.versions.jvmTarget.get())
val tmpFilePath = System.getProperty("user.home") + "/work/_temp/keystore/"
val prereleaseStoreFile: File? = File(tmpFilePath).listFiles()?.first()

fun getGitCommitHash(): String {
    return try {
        val headFile = file("${project.rootDir}/.git/HEAD")

        // Read the commit hash from .git/HEAD
        if (headFile.exists()) {
            val headContent = headFile.readText().trim()
            if (headContent.startsWith("ref:")) {
                val refPath = headContent.substring(5) // e.g., refs/heads/main
                val commitFile = file("${project.rootDir}/.git/$refPath")
                if (commitFile.exists()) commitFile.readText().trim() else ""
            } else headContent // If it's a detached HEAD (commit hash directly)
        } else {
            "" // If .git/HEAD doesn't exist
        }.take(7) // Return the short commit hash
    } catch (_: Throwable) {
        "" // Just return an empty string if any exception occurs
    }
}

android {
    @Suppress("UnstableApiUsage")
    testOptions {
        unitTests.isReturnDefaultValues = true
    }

    viewBinding {
        enable = true
    }

    signingConfigs {
        if (prereleaseStoreFile != null) {
            create("prerelease") {
                storeFile = file(prereleaseStoreFile)
                storePassword = System.getenv("SIGNING_STORE_PASSWORD")
                keyAlias = System.getenv("SIGNING_KEY_ALIAS")
                keyPassword = System.getenv("SIGNING_KEY_PASSWORD")
            }
        }
    }

    compileSdk = libs.versions.compileSdk.get().toInt()

    defaultConfig {
        applicationId = "com.lagradost.cloudstream3"
        minSdk = libs.versions.minSdk.get().toInt()
        targetSdk = libs.versions.targetSdk.get().toInt()
        versionCode = 67
        versionName = "4.6.2"

        resValue("string", "commit_hash", getGitCommitHash())

        manifestPlaceholders["target_sdk_version"] = libs.versions.targetSdk.get()

        // Reads local.properties
        val localProperties = gradleLocalProperties(rootDir, project.providers)

        buildConfigField(
            "long",
            "BUILD_DATE",
            "${System.currentTimeMillis()}"
        )
        buildConfigField(
            "String",
            "SIMKL_CLIENT_ID",
            "\"" + (System.getenv("SIMKL_CLIENT_ID") ?: localProperties["simkl.id"]) + "\""
        )
        buildConfigField(
            "String",
            "SIMKL_CLIENT_SECRET",
            "\"" + (System.getenv("SIMKL_CLIENT_SECRET") ?: localProperties["simkl.secret"]) + "\""
        )
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isDebuggable = false
            isMinifyEnabled = false
            isShrinkResources = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
        debug {
            isDebuggable = true
            applicationIdSuffix = ".debug"
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }

    flavorDimensions.add("state")
    productFlavors {
        create("stable") {
            dimension = "state"
        }
        create("prerelease") {
            dimension = "state"
            applicationIdSuffix = ".prerelease"
            if (signingConfigs.names.contains("prerelease")) {
                signingConfig = signingConfigs.getByName("prerelease")
            } else {
                logger.warn("No prerelease signing config!")
            }
            versionNameSuffix = "-PRE"
            versionCode = (System.currentTimeMillis() / 60000).toInt()
        }
    }

    compileOptions {
        isCoreLibraryDesugaringEnabled = true
        sourceCompatibility = JavaVersion.toVersion(javaTarget.target)
        targetCompatibility = JavaVersion.toVersion(javaTarget.target)
    }

    java {
	    // Use Java 17 toolchain even if a higher JDK runs the build.
        // We still use Java 8 for now which higher JDKs have deprecated.
	    toolchain {
		    languageVersion.set(JavaLanguageVersion.of(libs.versions.jdkToolchain.get()))
    	}
    }

    lint {
        abortOnError = false
        checkReleaseBuilds = false
    }

    buildFeatures {
        buildConfig = true
        resValues = true
    }

    packaging {
        jniLibs {
            // Enables legacy JNI packaging to reduce APK size (similar to builds before minSdk 23).
            // Note: This may increase app startup time slightly.
            useLegacyPackaging = true
        }
    }

    namespace = "com.lagradost.cloudstream3"
}

dependencies {
    // Testing
    testImplementation(libs.junit)
    testImplementation(libs.json)
    androidTestImplementation(libs.core)
    implementation(libs.junit.ktx)
    androidTestImplementation(libs.ext.junit)
    androidTestImplementation(libs.espresso.core)

    // Android Core & Lifecycle
    implementation(libs.core.ktx)
    implementation(libs.activity.ktx)
    implementation(libs.appcompat)
    implementation(libs.fragment.ktx)
    implementation(libs.bundles.lifecycle)
    implementation(libs.bundles.navigation)

    // Design & UI
    implementation(libs.preference.ktx)
    implementation(libs.material)
    implementation(libs.constraintlayout)

    // Coil Image Loading
    implementation(libs.bundles.coil)

    // Media 3 (ExoPlayer)
    implementation(libs.bundles.media3)
    implementation(libs.video)

    // FFmpeg Decoding
    implementation(libs.bundles.nextlib)

    // PlayBack
    implementation(libs.colorpicker) // Subtitle Color Picker
    implementation(libs.newpipeextractor) // For Trailers
    implementation(libs.juniversalchardet) // Subtitle Decoding

    // UI Stuff
    implementation(libs.shimmer) // Shimmering Effect (Loading Skeleton)
    implementation(libs.palette.ktx) // Palette for Images -> Colors
    implementation(libs.tvprovider)
    implementation(libs.overlappingpanels) // Gestures
    implementation(libs.biometric) // Fingerprint Authentication
    implementation(libs.previewseekbar.media3) // SeekBar Preview
    implementation(libs.qrcode.kotlin) // QR Code for PIN Auth on TV

    // Extensions & Other Libs
    implementation(libs.jsoup) // HTML Parser
    implementation(libs.rhino) // Run JavaScript
    implementation(libs.fuzzywuzzy) // Library/Ext Searching with Levenshtein Distance
    implementation(libs.safefile) // To Prevent the URI File Fu*kery
    coreLibraryDesugaring(libs.desugar.jdk.libs.nio) // NIO Flavor Needed for NewPipeExtractor
    implementation(libs.conscrypt.android) // To Fix SSL Fu*kery on Android 9
    implementation(libs.jackson.module.kotlin) // JSON Parser
    implementation(libs.zipline)

    // Torrent Support
    implementation(libs.torrentserver)

    // Downloading & Networking
    implementation(libs.work.runtime.ktx)
    implementation(libs.nicehttp) // HTTP Lib

    implementation(project(":library"))
}

tasks.register<Jar>("androidSourcesJar") {
    archiveClassifier.set("sources")
    from(android.sourceSets.getByName("main").java.directories) // Full Sources
}

tasks.register<Copy>("copyJar") {
    dependsOn("build", ":library:jvmJar")
    from(
        "build/intermediates/compile_app_classes_jar/prereleaseDebug/bundlePrereleaseDebugClassesToCompileJar",
        "../library/build/libs"
    )
    into("build/app-classes")
    include("classes.jar", "library-jvm*.jar")
    // Remove the version
    rename("library-jvm.*.jar", "library-jvm.jar")
}

// Merge the app classes and the library classes into classes.jar
tasks.register<Jar>("makeJar") {
    // Duplicates cause hard to catch errors, better to fail at compile time.
    duplicatesStrategy = DuplicatesStrategy.FAIL
    dependsOn(tasks.getByName("copyJar"))
    from(
        zipTree("build/app-classes/classes.jar"),
        zipTree("build/app-classes/library-jvm.jar")
    )
    destinationDirectory.set(layout.buildDirectory)
    archiveBaseName = "classes"
}

tasks.withType<KotlinJvmCompile> {
    compilerOptions {
        jvmTarget.set(javaTarget)
        jvmDefault.set(JvmDefaultMode.ENABLE)
        freeCompilerArgs.add("-Xannotation-default-target=param-property")
        optIn.addAll(
            "com.lagradost.cloudstream3.InternalAPI",
            "com.lagradost.cloudstream3.Prerelease",
        )
    }
}

dokka {
    moduleName = "App"
    dokkaSourceSets {
        main {
            analysisPlatform = KotlinPlatform.JVM
            documentedVisibilities(
                VisibilityModifier.Public,
                VisibilityModifier.Protected
            )

            sourceLink {
                localDirectory = file("..")
                remoteUrl("https://github.com/recloudstream/cloudstream/tree/master")
                remoteLineSuffix = "#L"
            }
        }
    }
}


================================================
FILE: app/lint.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <!-- ByteOrderMark has errors in values-b+ja/strings.xml, but it's handled by weblate so we don't really care. -->
    <issue id="ByteOrderMark" severity="ignore" />

    <!-- We don't care about MissingTranslation since it's handled by weblate. -->
    <issue id="MissingTranslation" severity="ignore" />
</lint>


================================================
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.kts.
#
# 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

================================================
FILE: app/src/androidTest/java/com/lagradost/cloudstream3/ExampleInstrumentedTest.kt
================================================
package com.lagradost.cloudstream3

import android.app.Activity
import android.os.Bundle
import android.os.PersistableBundle
import android.view.LayoutInflater
import androidx.test.core.app.ActivityScenario
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.viewbinding.ViewBinding
import com.lagradost.cloudstream3.databinding.BottomResultviewPreviewBinding
import com.lagradost.cloudstream3.databinding.FragmentHomeBinding
import com.lagradost.cloudstream3.databinding.FragmentHomeTvBinding
import com.lagradost.cloudstream3.databinding.FragmentLibraryBinding
import com.lagradost.cloudstream3.databinding.FragmentLibraryTvBinding
import com.lagradost.cloudstream3.databinding.FragmentPlayerBinding
import com.lagradost.cloudstream3.databinding.FragmentPlayerTvBinding
import com.lagradost.cloudstream3.databinding.FragmentResultBinding
import com.lagradost.cloudstream3.databinding.FragmentResultTvBinding
import com.lagradost.cloudstream3.databinding.FragmentSearchBinding
import com.lagradost.cloudstream3.databinding.FragmentSearchTvBinding
import com.lagradost.cloudstream3.databinding.HomeResultGridBinding
import com.lagradost.cloudstream3.databinding.HomepageParentBinding
import com.lagradost.cloudstream3.databinding.HomepageParentEmulatorBinding
import com.lagradost.cloudstream3.databinding.HomepageParentTvBinding
import com.lagradost.cloudstream3.databinding.PlayerCustomLayoutBinding
import com.lagradost.cloudstream3.databinding.PlayerCustomLayoutTvBinding
import com.lagradost.cloudstream3.databinding.RepositoryItemBinding
import com.lagradost.cloudstream3.databinding.RepositoryItemTvBinding
import com.lagradost.cloudstream3.databinding.SearchResultGridBinding
import com.lagradost.cloudstream3.databinding.SearchResultGridExpandedBinding
import com.lagradost.cloudstream3.databinding.TrailerCustomLayoutBinding
import com.lagradost.cloudstream3.utils.SubtitleHelper
import com.lagradost.cloudstream3.utils.TestingUtils
import kotlinx.coroutines.runBlocking
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).
 */
class TestApplication : Activity() {
    override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
        super.onCreate(savedInstanceState, persistentState)
    }
}

@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
    private fun getAllProviders(): Array<MainAPI> {
        println("Providers: ${APIHolder.allProviders.size}")
        return APIHolder.allProviders.toTypedArray() //.filter { !it.usesWebView }
    }

    @Test
    fun providersExist() {
        Assert.assertTrue(getAllProviders().isNotEmpty())
        println("Done providersExist")
    }

    @Throws
    private inline fun <reified T : ViewBinding> testAllLayouts(
        activity: Activity,
       vararg layouts: Int
    ) {

        val bind = T::class.java.methods.first { it.name == "bind" }
        val inflater = LayoutInflater.from(activity)
        for (layout in layouts) {
            val root = inflater.inflate(layout, null, false)
            bind.invoke(null, root)
        }
    }

    @Test
    @Throws
    fun layoutTest() {
        ActivityScenario.launch(MainActivity::class.java).use { scenario ->
            scenario.onActivity { activity: MainActivity ->
                // FragmentHomeHeadBinding and FragmentHomeHeadTvBinding CANT be the same
                //testAllLayouts<FragmentHomeHeadBinding>(activity, R.layout.fragment_home_head, R.layout.fragment_home_head_tv)
                //testAllLayouts<FragmentHomeHeadTvBinding>(activity, R.layout.fragment_home_head, R.layout.fragment_home_head_tv)

                // main cant be tested
               // testAllLayouts<ActivityMainTvBinding>(activity,R.layout.activity_main, R.layout.activity_main_tv)
               // testAllLayouts<ActivityMainBinding>(activity,R.layout.activity_main, R.layout.activity_main_tv)
                //testAllLayouts<ActivityMainBinding>(activity, R.layout.activity_main_tv)

                testAllLayouts<BottomResultviewPreviewBinding>(activity, R.layout.bottom_resultview_preview,R.layout.bottom_resultview_preview_tv)

                testAllLayouts<FragmentPlayerBinding>(activity, R.layout.fragment_player,R.layout.fragment_player_tv)
                testAllLayouts<FragmentPlayerTvBinding>(activity, R.layout.fragment_player,R.layout.fragment_player_tv)

               // testAllLayouts<FragmentResultBinding>(activity, R.layout.fragment_result,R.layout.fragment_result_tv)
               // testAllLayouts<FragmentResultTvBinding>(activity, R.layout.fragment_result,R.layout.fragment_result_tv)

                testAllLayouts<PlayerCustomLayoutBinding>(activity, R.layout.player_custom_layout,R.layout.player_custom_layout_tv, R.layout.trailer_custom_layout)
                testAllLayouts<PlayerCustomLayoutTvBinding>(activity, R.layout.player_custom_layout,R.layout.player_custom_layout_tv, R.layout.trailer_custom_layout)
                testAllLayouts<TrailerCustomLayoutBinding>(activity, R.layout.player_custom_layout,R.layout.player_custom_layout_tv, R.layout.trailer_custom_layout)

                testAllLayouts<RepositoryItemBinding>(activity, R.layout.repository_item_tv, R.layout.repository_item)
                testAllLayouts<RepositoryItemTvBinding>(activity, R.layout.repository_item_tv, R.layout.repository_item)

                testAllLayouts<RepositoryItemBinding>(activity, R.layout.repository_item_tv, R.layout.repository_item)
                testAllLayouts<RepositoryItemTvBinding>(activity, R.layout.repository_item_tv, R.layout.repository_item)

                testAllLayouts<FragmentHomeBinding>(activity, R.layout.fragment_home_tv, R.layout.fragment_home)
                testAllLayouts<FragmentHomeTvBinding>(activity, R.layout.fragment_home_tv, R.layout.fragment_home)

                testAllLayouts<FragmentSearchBinding>(activity, R.layout.fragment_search_tv, R.layout.fragment_search)
                testAllLayouts<FragmentSearchTvBinding>(activity, R.layout.fragment_search_tv, R.layout.fragment_search)

                testAllLayouts<HomeResultGridBinding>(activity, R.layout.home_result_grid_expanded, R.layout.home_result_grid)
                //testAllLayouts<HomeResultGridExpandedBinding>(activity, R.layout.home_result_grid_expanded, R.layout.home_result_grid) ??? fails ???

                testAllLayouts<SearchResultGridExpandedBinding>(activity, R.layout.search_result_grid, R.layout.search_result_grid_expanded)
                testAllLayouts<SearchResultGridBinding>(activity, R.layout.search_result_grid, R.layout.search_result_grid_expanded)


               // testAllLayouts<HomeScrollViewBinding>(activity, R.layout.home_scroll_view, R.layout.home_scroll_view_tv)
               // testAllLayouts<HomeScrollViewTvBinding>(activity, R.layout.home_scroll_view, R.layout.home_scroll_view_tv)

                testAllLayouts<HomepageParentTvBinding>(activity, R.layout.homepage_parent_tv, R.layout.homepage_parent_emulator, R.layout.homepage_parent)
                testAllLayouts<HomepageParentEmulatorBinding>(activity, R.layout.homepage_parent_tv, R.layout.homepage_parent_emulator, R.layout.homepage_parent)
                testAllLayouts<HomepageParentBinding>(activity, R.layout.homepage_parent_tv, R.layout.homepage_parent_emulator, R.layout.homepage_parent)

                testAllLayouts<FragmentLibraryTvBinding>(activity, R.layout.fragment_library_tv, R.layout.fragment_library)
                testAllLayouts<FragmentLibraryBinding>(activity, R.layout.fragment_library_tv, R.layout.fragment_library)
            }
        }
    }

    @Test
    @Throws(AssertionError::class)
    fun providerCorrectData() {
        val langTagsIETF = SubtitleHelper.languages.map { it.IETF_tag }
        Assert.assertFalse("IETFTagNames does not contain any languages", langTagsIETF.isNullOrEmpty())
        for (api in getAllProviders()) {
            Assert.assertTrue("Api does not contain a mainUrl", api.mainUrl != "NONE")
            Assert.assertTrue("Api does not contain a name", api.name != "NONE")
            Assert.assertTrue(
                "Api ${api.name} does not contain a valid language code",
                langTagsIETF.contains(api.lang)
            )
            Assert.assertTrue(
                "Api ${api.name} does not contain any supported types",
                api.supportedTypes.isNotEmpty()
            )
        }
        println("Done providerCorrectData")
    }

    @Test
    fun providerCorrectHomepage() {
        runBlocking {
            getAllProviders().toList().amap { api ->
                TestingUtils.testHomepage(api, TestingUtils.Logger())
            }
        }
        println("Done providerCorrectHomepage")
    }

    @Test
    fun testAllProvidersCorrect() {
        runBlocking {
            TestingUtils.getDeferredProviderTests(
                this,
                getAllProviders(),
            ) { _, _ -> }
        }
    }
}


================================================
FILE: app/src/debug/res/drawable/ic_banner_foreground.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="320dp"
    android:height="180dp"
    android:viewportWidth="320"
    android:viewportHeight="180">
  <group android:scaleX="0.6666667"
      android:scaleY="0.6666667"
      android:translateX="53.333332"
      android:translateY="30">
    <group android:scaleX="0"
        android:scaleY="0"
        android:translateX="160"
        android:translateY="90">
      <group android:translateY="155.39062">
        <path android:pathData="M81.84375,-4.53125Q70.671875,2,54,2Q32.484375,2,19.546875,-11.953125Q6.609375,-25.921875,6.609375,-48.59375Q6.609375,-72.953125,21.15625,-87.96875Q35.71875,-103,58.078125,-103Q72.421875,-103,81.84375,-98.59375L81.84375,-86Q71.015625,-92,57.9375,-92Q40.578125,-92,29.78125,-80.375Q18.984375,-68.765625,18.984375,-49.34375Q18.984375,-30.890625,29.078125,-19.9375Q39.171875,-9,55.546875,-9Q70.734375,-9,81.84375,-16L81.84375,-4.53125Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M112.203125,0L100.671875,0L100.671875,-107L112.203125,-107L112.203125,0Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M165.76562,2Q149.8125,2,140.28125,-8.171875Q130.75,-18.34375,130.75,-35.15625Q130.75,-53.4375,140.65625,-63.71875Q150.57812,-74,167.45312,-74Q183.5625,-74,192.59375,-64Q201.625,-54,201.625,-36.28125Q201.625,-18.921875,191.89062,-8.453125Q182.15625,2,165.76562,2ZM166.60938,-64Q155.5,-64,149.03125,-56.4375Q142.5625,-48.875,142.5625,-35.578125Q142.5625,-22.78125,149.09375,-15.390625Q155.64062,-8,166.60938,-8Q177.79688,-8,183.79688,-15.25Q189.8125,-22.5,189.8125,-35.859375Q189.8125,-49.359375,183.79688,-56.671875Q177.79688,-64,166.60938,-64Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M277.89062,0L266.35938,0L266.35938,-11.375L266.07812,-11.375Q258.90625,2,243.85938,2Q218.125,2,218.125,-28.78125L218.125,-72L229.59375,-72L229.59375,-30.78125Q229.59375,-8,247.03125,-8Q255.46875,-8,260.90625,-14.21875Q266.35938,-20.453125,266.35938,-30.5L266.35938,-72L277.89062,-72L277.89062,0Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M363.125,0L351.59375,0L351.59375,-12.21875L351.3125,-12.21875Q343.29688,2,326.5625,2Q313,2,304.875,-7.75Q296.75,-17.5,296.75,-34.296875Q296.75,-52.3125,305.75,-63.15625Q314.75,-74,329.73438,-74Q344.5625,-74,351.3125,-62.03125L351.59375,-62.03125L351.59375,-107L363.125,-107L363.125,0ZM351.59375,-32.546875L351.59375,-43.171875Q351.59375,-51.90625,345.82812,-57.953125Q340.0625,-64,331.20312,-64Q320.65625,-64,314.60938,-56.25Q308.5625,-48.515625,308.5625,-34.875Q308.5625,-22.421875,314.35938,-15.203125Q320.17188,-8,329.9375,-8Q339.57812,-8,345.57812,-14.953125Q351.59375,-21.921875,351.59375,-32.546875Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M383.51562,-4.078125L383.51562,-18Q385.90625,-15.90625,389.23438,-14.234375Q392.57812,-12.5625,396.26562,-11.40625Q399.96875,-10.25,403.6875,-9.625Q407.42188,-9,410.57812,-9Q421.48438,-9,426.85938,-13Q432.23438,-17,432.23438,-24.5Q432.23438,-28.609375,430.4375,-31.65625Q428.65625,-34.703125,425.48438,-37.21875Q422.32812,-39.734375,418,-42.03125Q413.67188,-44.328125,408.6875,-46.890625Q403.40625,-49.578125,398.82812,-52.34375Q394.26562,-55.109375,390.89062,-58.4375Q387.51562,-61.765625,385.57812,-65.96875Q383.65625,-70.1875,383.65625,-75.859375Q383.65625,-82.796875,386.67188,-87.9375Q389.70312,-93.078125,394.625,-96.40625Q399.54688,-99.734375,405.82812,-101.359375Q412.125,-103,418.67188,-103Q433.57812,-103,440.39062,-99.296875L440.39062,-86Q431.46875,-92,417.46875,-92Q413.60938,-92,409.73438,-91.1875Q405.875,-90.390625,402.84375,-88.578125Q399.82812,-86.765625,397.92188,-83.90625Q396.03125,-81.046875,396.03125,-76.921875Q396.03125,-73.03125,397.46875,-70.1875Q398.90625,-67.359375,401.71875,-65.015625Q404.53125,-62.6875,408.57812,-60.484375Q412.625,-58.28125,417.89062,-55.671875Q423.3125,-52.96875,428.15625,-50Q433.01562,-47.03125,436.67188,-43.40625Q440.32812,-39.796875,442.46875,-35.40625Q444.60938,-31.015625,444.60938,-25.34375Q444.60938,-17.828125,441.6875,-12.625Q438.78125,-7.421875,433.8125,-4.15625Q428.85938,-0.90625,422.39062,0.546875Q415.92188,2,408.75,2Q406.35938,2,402.84375,1.59375Q399.32812,1.1875,395.67188,0.40625Q392.01562,-0.375,388.75,-1.515625Q385.48438,-2.671875,383.51562,-4.078125Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M497.07812,-0.234375Q493,2,486.3125,2Q467.40625,2,467.40625,-19.1875L467.40625,-62L455.03125,-62L455.03125,-72L467.40625,-72L467.40625,-89.328125L478.9375,-93L478.9375,-72L497.07812,-72L497.07812,-62L478.9375,-62L478.9375,-21.4375Q478.9375,-14.1875,481.39062,-11.09375Q483.85938,-8,489.54688,-8Q493.90625,-8,497.07812,-10L497.07812,-0.234375Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M550.21875,-60Q547.2031,-62,541.5,-62Q534.125,-62,529.15625,-55.109375Q524.2031,-48.21875,524.2031,-36.328125L524.2031,0L512.6719,0L512.6719,-72L524.2031,-72L524.2031,-56.515625L524.4844,-56.515625Q526.9531,-64.296875,532.0156,-68.640625Q537.0781,-73,543.3281,-73Q547.8281,-73,550.21875,-72.015625L550.21875,-60Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M620.5469,-33L569.7031,-33Q569.9844,-21.03125,576.1719,-14.515625Q582.3594,-8,593.1875,-8Q605.3594,-8,615.5469,-16L615.5469,-5Q606.0625,2,590.4531,2Q575.1875,2,566.46875,-7.890625Q557.75,-17.78125,557.75,-35.71875Q557.75,-52.65625,567.28125,-63.328125Q576.8125,-74,590.9375,-74Q605.0781,-74,612.8125,-64.765625Q620.5469,-55.53125,620.5469,-39.109375L620.5469,-33ZM608.7344,-43Q608.65625,-52.9375,603.90625,-58.46875Q599.1719,-64,590.7344,-64Q582.5781,-64,576.875,-58.1875Q571.1875,-52.375,569.84375,-43L608.7344,-43Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M689.21875,0L677.6875,0L677.6875,-11.234375L677.40625,-11.234375Q669.875,2,655.25,2Q644.5,2,638.40625,-3.765625Q632.3281,-9.546875,632.3281,-19.109375Q632.3281,-39.578125,656.09375,-42.9375L677.6875,-46Q677.6875,-64,662.84375,-64Q649.84375,-64,639.3594,-55L639.3594,-67.09375Q649.9844,-74,663.8281,-74Q689.21875,-74,689.21875,-47.03125L689.21875,0ZM677.6875,-37L660.3125,-34.5625Q652.2969,-33.40625,648.21875,-30.5Q644.1406,-27.59375,644.1406,-20.203125Q644.1406,-14.8125,647.90625,-11.40625Q651.6719,-8,657.9219,-8Q666.5,-8,672.09375,-14.140625Q677.6875,-20.28125,677.6875,-29.671875L677.6875,-37Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M812.90625,0L801.375,0L801.375,-41.359375Q801.375,-53.3125,797.6875,-58.65625Q794,-64,785.28125,-64Q777.8906,-64,772.71875,-57.25Q767.5625,-50.5,767.5625,-41.078125L767.5625,0L756.03125,0L756.03125,-42.765625Q756.03125,-64,739.6406,-64Q732.0469,-64,727.125,-57.625Q722.2031,-51.265625,722.2031,-41.078125L722.2031,0L710.6719,0L710.6719,-72L722.2031,-72L722.2031,-60.625L722.4844,-60.625Q730.15625,-74,744.84375,-74Q752.2344,-74,757.71875,-69.796875Q763.2031,-65.609375,765.2344,-58.796875Q773.25,-74,789.1406,-74Q812.90625,-74,812.90625,-44.5625L812.90625,0Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M875.21875,0L875.21875,-101L903.0625,-101Q956.3594,-101,956.3594,-51.765625Q956.3594,-28.390625,941.5625,-14.1875Q926.7656,0,901.9375,0L875.21875,0ZM887.03125,-90L887.03125,-11L902.0781,-11Q921.90625,-11,932.9375,-21.546875Q943.9844,-32.109375,943.9844,-51.484375Q943.9844,-90,902.78125,-90L887.03125,-90Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M1032.5469,-33L981.7031,-33Q981.9844,-21.03125,988.1719,-14.515625Q994.3594,-8,1005.1875,-8Q1017.3594,-8,1027.5469,-16L1027.5469,-5Q1018.0625,2,1002.4531,2Q987.1875,2,978.46875,-7.890625Q969.75,-17.78125,969.75,-35.71875Q969.75,-52.65625,979.28125,-63.328125Q988.8125,-74,1002.9375,-74Q1017.0781,-74,1024.8125,-64.765625Q1032.5469,-55.53125,1032.5469,-39.109375L1032.5469,-33ZM1020.7344,-43Q1020.65625,-52.9375,1015.90625,-58.46875Q1011.1719,-64,1002.7344,-64Q994.5781,-64,988.875,-58.1875Q983.1875,-52.375,981.84375,-43L1020.7344,-43Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M1061.4844,-10.390625L1061.2031,-10.390625L1061.2031,0L1049.6719,0L1049.6719,-107L1061.2031,-107L1061.2031,-59.359375L1061.4844,-59.359375Q1070,-74,1086.375,-74Q1100.2344,-74,1108.0625,-64.25Q1115.9062,-54.5,1115.9062,-38.125Q1115.9062,-19.90625,1107.1094,-8.953125Q1098.3281,2,1083.0781,2Q1068.7969,2,1061.4844,-10.390625ZM1061.2031,-39.453125L1061.2031,-29.390625Q1061.2031,-20.453125,1067,-14.21875Q1072.8125,-8,1081.7344,-8Q1092.2188,-8,1098.1562,-16.015625Q1104.0938,-24.046875,1104.0938,-38.328125Q1104.0938,-50.359375,1098.5312,-57.171875Q1092.9844,-64,1083.5,-64Q1073.4375,-64,1067.3125,-57Q1061.2031,-50,1061.2031,-39.453125Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M1192.8906,0L1181.3594,0L1181.3594,-11.375L1181.0781,-11.375Q1173.9062,2,1158.8594,2Q1133.125,2,1133.125,-28.78125L1133.125,-72L1144.5938,-72L1144.5938,-30.78125Q1144.5938,-8,1162.0312,-8Q1170.4688,-8,1175.9062,-14.21875Q1181.3594,-20.453125,1181.3594,-30.5L1181.3594,-72L1192.8906,-72L1192.8906,0Z"
            android:fillColor="#FFFFFF"/>
        <path android:pathData="M1278.125,-5.703125Q1278.125,34,1240.1562,34Q1226.7969,34,1216.8125,28.8125L1216.8125,17Q1228.9844,24,1240.0156,24Q1266.5938,24,1266.5938,-4.21875L1266.5938,-12.078125L1266.3125,-12.078125Q1258.0938,2,1241.5625,2Q1228.1406,2,1219.9375,-7.671875Q1211.75,-17.359375,1211.75,-33.65625Q1211.75,-52.171875,1220.5781,-63.078125Q1229.4062,-74,1244.7344,-74Q1259.2812,-74,1266.3125,-62.03125L1266.5938,-62.03125L1266.5938,-72L1278.125,-72L1278.125,-5.703125ZM1266.5938,-32.546875L1266.5938,-43.171875Q1266.5938,-51.765625,1260.7969,-57.875Q1255,-64,1246.3438,-64Q1235.6562,-64,1229.6094,-56.21875Q1223.5625,-48.453125,1223.5625,-34.453125Q1223.5625,-22.421875,1229.3594,-15.203125Q1235.1719,-8,1244.7344,-8Q1254.4375,-8,1260.5156,-14.890625Q1266.5938,-21.78125,1266.5938,-32.546875Z"
            android:fillColor="#FFFFFF"/>
      </group>
    </group>
  </group>
</vector>

================================================
FILE: app/src/debug/res/drawable-anydpi-v24/ic_stat_name.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24"
    android:tint="#FFFFFF"
    android:name="vector">
  <group android:scaleX="0.0780212"
      android:scaleY="0.0780212"
      android:translateX="0.96"
      android:translateY="0.96">
      <path android:name="path"
            android:pathData="M 245.05 148.63 C 242.249 148.627 239.463 149.052 236.79 149.89 C 235.151 141.364 230.698 133.63 224.147 127.931 C 217.597 122.233 209.321 118.893 200.65 118.45 C 195.913 105.431 186.788 94.458 174.851 87.427 C 162.914 80.396 148.893 77.735 135.21 79.905 C 121.527 82.074 109.017 88.941 99.84 99.32 C 89.871 95.945 79.051 96.024 69.133 99.545 C 59.215 103.065 50.765 109.826 45.155 118.73 C 39.545 127.634 37.094 138.174 38.2 148.64 L 37.94 148.64 C 30.615 148.64 23.582 151.553 18.403 156.733 C 13.223 161.912 10.31 168.945 10.31 176.27 C 10.31 183.595 13.223 190.628 18.403 195.807 C 23.582 200.987 30.615 203.9 37.94 203.9 L 245.05 203.9 C 252.375 203.9 259.408 200.987 264.587 195.807 C 269.767 190.628 272.68 183.595 272.68 176.27 C 272.68 168.945 269.767 161.912 264.587 156.733 C 259.408 151.553 252.375 148.64 245.05 148.64 Z"
            android:fillColor="#2309db" android:strokeWidth="1"
            tools:ignore="VectorPath"/>
      <path android:name="path_1" android:pathData="M 208.61 125 C 208.61 123.22 208.55 121.45 208.48 119.69 C 205.919 119.01 203.296 118.595 200.65 118.45 C 195.913 105.431 186.788 94.458 174.851 87.427 C 162.914 80.396 148.893 77.735 135.21 79.905 C 121.527 82.074 109.017 88.941 99.84 99.32 C 89.871 95.945 79.051 96.024 69.133 99.545 C 59.215 103.065 50.765 109.826 45.155 118.73 C 39.545 127.634 37.094 138.174 38.2 148.64 L 37.94 148.64 C 30.615 148.64 23.582 151.553 18.403 156.733 C 13.223 161.912 10.31 168.945 10.31 176.27 C 10.31 183.595 13.223 190.628 18.403 195.807 C 23.582 200.987 30.615 203.9 37.94 203.9 L 179 203.9 C 198.116 182.073 208.646 154.015 208.61 125 Z"
            android:fillColor="#2149d8" android:strokeWidth="1"/>
      <path android:name="path_2" android:pathData="M 99.84 99.32 C 89.871 95.945 79.051 96.024 69.133 99.545 C 59.215 103.065 50.765 109.826 45.155 118.73 C 39.545 127.634 37.094 138.174 38.2 148.64 L 37.94 148.64 C 30.783 148.665 23.909 151.471 18.779 156.461 C 13.648 161.452 10.653 168.246 10.43 175.399 C 10.207 182.553 12.773 189.52 17.583 194.82 C 22.392 200.121 29.079 203.349 36.22 203.82 C 67.216 202.93 96.673 189.98 118.284 167.742 C 139.895 145.504 151.997 115.689 152 84.68 C 152 83 151.94 81.33 151.87 79.68 C 149.443 79.361 146.998 79.194 144.55 79.18 C 136.095 79.171 127.735 80.962 120.026 84.434 C 112.317 87.907 105.435 92.982 99.84 99.32 Z"
            android:fillColor="#5c89f7" android:strokeWidth="1"/>
  </group>
</vector>

================================================
FILE: app/src/debug/res/drawable-v24/ic_banner_background.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="320dp"
    android:height="180dp"
    android:viewportWidth="320"
    android:viewportHeight="180">
  <group android:scaleX="0.6666667"
      android:scaleY="0.6666667"
      android:translateX="53.333332"
      android:translateY="30">
    <group android:scaleX="0.35277516"
        android:scaleY="0.35277516"
        android:translateX="5.879586E-4">
      <path
          android:strokeWidth="1"
          android:pathData="M-20.09,-10.91h949.79v534.26h-949.79z"
          android:fillColor="#121212"
          android:strokeColor="#fff"/>
      <path
              android:pathData="M273.68,250.58a18.79,18.79 0,0 0,-5.64 0.86,26.56 26.56,0 0,0 -24.73,-21.51 40.83,40.83 0,0 0,-68.95 -13.08A32.07,32.07 0,0 0,132 247.24a30.92,30.92 0,0 0,0.18 3.35H132a18.9,18.9 0,0 0,0 37.8H273.68a18.9,18.9 0,0 0,0 -37.8Z">
        <aapt:attr name="android:fillColor">
          <gradient
                  android:startY="245.72"
                  android:startX="113.12"
                  android:endY="245.72"
                  android:endX="292.58"
                  android:type="linear">
            <item android:offset="0" android:color="#3FAA11"/>
            <item android:offset="1" android:color="#39A11D"/>
          </gradient>
        </aapt:attr>
      </path>
      <path
              android:pathData="M248.76,234.41c0,-1.22 0,-2.42 -0.09,-3.63a27,27 0,0 0,-5.36 -0.85,40.83 40.83,0 0,0 -68.95,-13.08A32.07,32.07 0,0 0,132 247.24a30.92,30.92 0,0 0,0.18 3.35H132a18.9,18.9 0,0 0,0 37.8H228.5A81.75,81.75 0,0 0,248.76 234.41Z">
        <aapt:attr name="android:fillColor">
          <gradient
                  android:startY="245.72"
                  android:startX="113.12"
                  android:endY="245.72"
                  android:endX="248.76"
                  android:type="linear">
            <item android:offset="0" android:color="#37DB25"/>
            <item android:offset="1" android:color="#11DD6D"/>
          </gradient>
        </aapt:attr>
      </path>
      <path
              android:pathData="M174.36,216.85A32.07,32.07 0,0 0,132 247.24a30.92,30.92 0,0 0,0.18 3.35H132a18.89,18.89 0,0 0,-1.18 37.74A81.53,81.53 0,0 0,210 206.83c0,-1.15 0,-2.29 -0.09,-3.43a41.33,41.33 0,0 0,-5 -0.33A40.71,40.71 0,0 0,174.36 216.85Z">
        <aapt:attr name="android:fillColor">
          <gradient
                  android:startY="245.69"
                  android:startX="113.12"
                  android:endY="245.69"
                  android:endX="210.03"
                  android:type="linear">
            <item android:offset="0" android:color="#40F15D"/>
            <item android:offset="1" android:color="#42C54F"/>
          </gradient>
        </aapt:attr>
      </path>

      <path
              android:pathData="M358.81,285q-13.53,0 -22.64,-9.1t-9,-22.72q0,-13.62 9,-22.64 9,-9.18 22.64,-9.19 13.79,0 22.38,10l-5.62,5.44a20.82,20.82 0,0 0,-16.76 -7.91,23 23,0 0,0 -16.94,6.81q-6.72,6.72 -6.72,17.53t6.72,17.53a23,23 0,0 0,16.94 6.81q10.63,0 18.46,-8.94l5.7,5.53a29.57,29.57 0,0 1,-10.63 8A32.44,32.44 0,0 1,358.81 285Z"
              android:fillColor="#39A11D"/>
      <path
              android:pathData="M397.78,222.69v60.93H390V222.69Z"
              android:fillColor="#39A11D"/>
      <path
              android:pathData="M404.5,262.77q0,-9.61 6,-15.91a20.6,20.6 0,0 1,15.41 -6.3,20.31 20.31,0 0,1 15.31,6.3 21.87,21.87 0,0 1,6.13 15.91q0,9.71 -6.13,15.92A20.3,20.3 0,0 1,426 285a20.6,20.6 0,0 1,-15.41 -6.29Q404.5,272.39 404.5,262.77ZM412.33,262.77a15.31,15.31 0,0 0,3.91 10.9,13.38 13.38,0 0,0 19.41,0 17,17 0,0 0,0 -21.7,13.18 13.18,0 0,0 -19.41,0A15.18,15.18 0,0 0,412.33 262.77Z"
              android:fillColor="#39A11D"/>
      <path
              android:pathData="M490.7,283.62h-7.48v-5.78h-0.35a13.86,13.86 0,0 1,-5.48 5.1,15.77 15.77,0 0,1 -7.7,2q-7.67,0 -11.79,-4.38t-4.13,-12.47v-26.2h7.83v25.69q0.25,10.22 10.3,10.22a9.81,9.81 0,0 0,7.83 -3.79,13.7 13.7,0 0,0 3.14,-9.06V241.93h7.83Z"
              android:fillColor="#39A11D"/>
      <path
              android:pathData="M517.25,285a18.34,18.34 0,0 1,-14 -6.46,24.34 24.34,0 0,1 0,-31.49 18.35,18.35 0,0 1,14 -6.47,18.07 18.07,0 0,1 8.39,2 14.84,14.84 0,0 1,5.83 5.19h0.34l-0.34,-5.78L531.47,222.69h7.82v60.93h-7.48v-5.78h-0.34a14.84,14.84 0,0 1,-5.83 5.19A18.07,18.07 0,0 1,517.25 285ZM518.53,277.86a12,12 0,0 0,9.45 -4.17q3.82,-4.17 3.83,-10.9A15.54,15.54 0,0 0,528 252a12.05,12.05 0,0 0,-9.45 -4.26,12.19 12.19,0 0,0 -9.44,4.26 15.5,15.5 0,0 0,-3.83 10.8,15.32 15.32,0 0,0 3.83,10.81A12.19,12.19 0,0 0,518.53 277.84Z"
              android:fillColor="#39A11D"/>
      <path
              android:pathData="M587.8,267.33a15.91,15.91 0,0 1,-5.87 12.88A22.43,22.43 0,0 1,567.46 285a21.39,21.39 0,0 1,-13.36 -4.42,22.65 22.65,0 0,1 -8,-12.08l7.49,-3.07a19.3,19.3 0,0 0,2.13 4.94,15.72 15.72,0 0,0 3.19,3.78 14.25,14.25 0,0 0,4 2.47,12.26 12.26,0 0,0 4.68,0.9 13.47,13.47 0,0 0,8.76 -2.77,9 9,0 0,0 3.41,-7.36 8.8,8.8 0,0 0,-2.81 -6.55q-2.64,-2.64 -9.87,-5.11 -7.32,-2.64 -9.11,-3.57 -9.69,-4.94 -9.7,-14.55a14.84,14.84 0,0 1,5.37 -11.49A19.53,19.53 0,0 1,567 221.33a20.5,20.5 0,0 1,12.09 3.58,16.67 16.67,0 0,1 6.8,8.76l-7.31,3.06a10.84,10.84 0,0 0,-4 -5.65,13.1 13.1,0 0,0 -15.11,0.28 7.41,7.41 0,0 0,-3.15 6.19,7.14 7.14,0 0,0 2.47,5.42q2.73,2.29 11.83,5.42 9.27,3.17 13.23,7.72A16.53,16.53 0,0 1,587.8 267.33Z"
              android:fillColor="#68C671"/>
      <path
              android:pathData="M610.26,284.3a11.88,11.88 0,0 1,-8.46 -3.15c-2.25,-2.09 -3.4,-5 -3.45,-8.76V249.07H591v-7.14h7.32V229.16h7.83v12.77h10.21v7.14H606.18v20.77c0,2.78 0.54,4.66 1.61,5.66a5.27,5.27 0,0 0,3.66 1.48,7.9 7.9,0 0,0 1.83,-0.21 9,9 0,0 0,1.66 -0.55l2.47,7A21.23,21.23 0,0 1,610.26 284.3Z"
              android:fillColor="#68C671"/>
      <path
              android:pathData="M631.71,283.62h-7.83V241.93h7.48v6.8h0.35a11.31,11.31 0,0 1,4.89 -5.66,13.66 13.66,0 0,1 7.27,-2.34 14.7,14.7 0,0 1,5.79 1l-2.38,7.57a12.93,12.93 0,0 0,-4.6 -0.6,10.11 10.11,0 0,0 -7.7,3.58 12,12 0,0 0,-3.27 8.34Z"
              android:fillColor="#68C671"/>
      <path
              android:pathData="M670.93,285a19.93,19.93 0,0 1,-15.14 -6.29q-6,-6.3 -6,-15.92a22.65,22.65 0,0 1,5.79 -15.87,19.15 19.15,0 0,1 14.8,-6.34q9.29,0 14.77,6t5.49,16.81l-0.09,0.85L657.83,264.24a13.56,13.56 0,0 0,4.08 9.87,13.06 13.06,0 0,0 9.36,3.75q7.49,0 11.75,-7.49l7,3.4a20.69,20.69 0,0 1,-7.78 8.25A21.51,21.51 0,0 1,670.93 285ZM658.42,257.77h23.92a10.43,10.43 0,0 0,-3.53 -7.19,12.38 12.38,0 0,0 -8.56,-2.85 11.34,11.34 0,0 0,-7.61 2.72A13.09,13.09 0,0 0,658.42 257.75Z"
              android:fillColor="#68C671"/>
      <path
              android:pathData="M714.08,240.56q8.67,0 13.7,4.64c3.34,3.1 5,7.33 5,12.72v25.7h-7.49v-5.78H725Q720.11,285 712,285a16.83,16.83 0,0 1,-11.53 -4.08,13 13,0 0,1 -4.63,-10.21 12.38,12.38 0,0 1,4.89 -10.3q4.89,-3.83 13.06,-3.83a23.16,23.16 0,0 1,11.49 2.55v-1.78a8.9,8.9 0,0 0,-3.24 -6.94,11.08 11.08,0 0,0 -7.57,-2.85 12,12 0,0 0,-10.38 5.53l-6.89,-4.34Q702.93,240.57 714.08,240.56ZM704,270.86a6.24,6.24 0,0 0,2.59 5.1,9.57 9.57,0 0,0 6.09,2.05 12.5,12.5 0,0 0,8.81 -3.66,11.47 11.47,0 0,0 3.87,-8.6q-3.66,-2.88 -10.21,-2.89a13.22,13.22 0,0 0,-8 2.3A6.81,6.81 0,0 0,704 270.86Z"
              android:fillColor="#68C671"/>
      <path
              android:pathData="M749.47,283.62h-7.82V241.93h7.48v5.78h0.34a14,14 0,0 1,5.49 -5.1,15.06 15.06,0 0,1 7.36,-2.05 15.22,15.22 0,0 1,8.09 2.13,12.56 12.56,0 0,1 5.1,5.87q5.19,-8 14.39,-8 7.23,0 11.14,4.43T805,257.58v26h-7.83V258.77q0,-5.86 -2.13,-8.46t-7.15,-2.6a9.35,9.35 0,0 0,-7.57 3.83,14 14,0 0,0 -3.06,9v23.06h-7.83V258.77q0,-5.86 -2.13,-8.46t-7.15,-2.6a9.35,9.35 0,0 0,-7.57 3.83,14 14,0 0,0 -3.07,9Z"
              android:fillColor="#68C671"/>
      <path
          android:pathData="M-13.76,555.76c10.3,-20.89 58.91,-113.94 157.31,-139.7C261.3,385.24 405.9,462.43 469.89,613.28">
        <aapt:attr name="android:fillColor">
          <gradient
                  android:startY="252.3"
                  android:startX="194.11"
                  android:endY="252.3"
                  android:endX="373.57"
                  android:type="linear">
            <item android:offset="0" android:color="#68C671"/>
            <item android:offset="0.45" android:color="#11DD6D"/>
            <item android:offset="1" android:color="#39A11D"/>
          </gradient>
        </aapt:attr>
      </path>
      <path
          android:pathData="M318.2,592.15c52.89,-55.46 139,-131.3 263,-187.83 223.69,-102 495.29,-119.94 515.35,-62.21 13,37.39 -73.5,124.43 -496.69,339.65">
        <aapt:attr name="android:fillColor">
          <gradient
                  android:startX="400.11"
                  android:endX="900"
                  android:type="linear">
            <item android:offset="0" android:color="#68C671"/>
            <item android:offset="0.45" android:color="#11DD6D"/>
            <item android:offset="1" android:color="#39A11D"/>
          </gradient>
        </aapt:attr>
      </path>
      <path
          android:pathData="M-57.58,195c206.91,86.6 494,-219.13 453.91,-347.48C353.52,-289.67 -103.15,-353.41 -203.15,-176 -265.5,-65.35 -189.57,139.73 -57.58,195Z">
        <aapt:attr name="android:fillColor">
          <gradient
                  android:startY="252.3"
                  android:startX="-100"
                  android:endY="252.3"
                  android:endX="373.57"
                  android:type="linear">
            <item android:offset="0" android:color="#68C671"/>
            <item android:offset="0.45" android:color="#11DD6D"/>
            <item android:offset="1" android:color="#39A11D"/>
          </gradient>
        </aapt:attr>
      </path>
      <path
          android:pathData="M698.42,648.89C625.71,546 764,320.79 920.68,218.45c46.61,-30.44 110.17,-72 164.35,-50.08 102.25,41.28 158.19,303.22 28.17,446.08C996.65,742.52 762.64,739.78 698.42,648.89Z">
        <aapt:attr name="android:fillColor">
          <gradient
                  android:startX="700.11"
                  android:endX="900.57"
                  android:type="linear">
            <item android:offset="0" android:color="#68C671"/>
            <item android:offset="0.45" android:color="#11DD6D"/>
            <item android:offset="1" android:color="#39A11D"/>
          </gradient>
        </aapt:attr>
      </path>
      <path
          android:pathData="M339.91,-42.46a246.52,141.46 0,1 0,493.04 0a246.52,141.46 0,1 0,-493.04 0z">
        <aapt:attr name="android:fillColor">
          <gradient
                  android:startX="400.11"
                  android:endX="800.57"
                  android:type="linear">
            <item android:offset="0" android:color="#68C671"/>
            <item android:offset="0.45" android:color="#11DD6D"/>
            <item android:offset="1" android:color="#39A11D"/>
          </gradient>
        </aapt:attr>
      </path>
    </group>
  </group>
</vector>


================================================
FILE: app/src/debug/res/drawable-v24/ic_launcher_foreground.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108"
    android:name="vector">
  <group android:scaleX="0.1755477"
      android:scaleY="0.1755477"
      android:translateX="29.16"
      android:translateY="29.16">
      <path android:name="path"
            android:pathData="M 245.05 148.63 C 242.249 148.627 239.463 149.052 236.79 149.89 C 235.151 141.364 230.698 133.63 224.147 127.931 C 217.597 122.233 209.321 118.893 200.65 118.45 C 195.913 105.431 186.788 94.458 174.851 87.427 C 162.914 80.396 148.893 77.735 135.21 79.905 C 121.527 82.074 109.017 88.941 99.84 99.32 C 89.871 95.945 79.051 96.024 69.133 99.545 C 59.215 103.065 50.765 109.826 45.155 118.73 C 39.545 127.634 37.094 138.174 38.2 148.64 L 37.94 148.64 C 30.615 148.64 23.582 151.553 18.403 156.733 C 13.223 161.912 10.31 168.945 10.31 176.27 C 10.31 183.595 13.223 190.628 18.403 195.807 C 23.582 200.987 30.615 203.9 37.94 203.9 L 245.05 203.9 C 252.375 203.9 259.408 200.987 264.587 195.807 C 269.767 190.628 272.68 183.595 272.68 176.27 C 272.68 168.945 269.767 161.912 264.587 156.733 C 259.408 151.553 252.375 148.64 245.05 148.64 Z"
            android:strokeWidth="1"
            tools:ignore="VectorPath">
          <aapt:attr name="android:fillColor">
              <gradient
                      android:startY="0"
                      android:startX="200"
                      android:endY="0"
                      android:endX="300"
                      android:type="linear">
                  <item android:offset="0" android:color="#3FAA11"/>
                  <item android:offset="1" android:color="#39A11D"/>
              </gradient>
          </aapt:attr>
      </path>

      <path android:name="path_1" android:pathData="M 208.61 125 C 208.61 123.22 208.55 121.45 208.48 119.69 C 205.919 119.01 203.296 118.595 200.65 118.45 C 195.913 105.431 186.788 94.458 174.851 87.427 C 162.914 80.396 148.893 77.735 135.21 79.905 C 121.527 82.074 109.017 88.941 99.84 99.32 C 89.871 95.945 79.051 96.024 69.133 99.545 C 59.215 103.065 50.765 109.826 45.155 118.73 C 39.545 127.634 37.094 138.174 38.2 148.64 L 37.94 148.64 C 30.615 148.64 23.582 151.553 18.403 156.733 C 13.223 161.912 10.31 168.945 10.31 176.27 C 10.31 183.595 13.223 190.628 18.403 195.807 C 23.582 200.987 30.615 203.9 37.94 203.9 L 179 203.9 C 198.116 182.073 208.646 154.015 208.61 125 Z"
            android:strokeWidth="1">
      <aapt:attr name="android:fillColor">
          <gradient
                  android:startY="0"
                  android:startX="200"
                  android:endY="0"
                  android:endX="000"
                  android:type="linear">
              <item android:offset="0" android:color="#37DB25"/>
              <item android:offset="1" android:color="#11DD6D"/>
          </gradient>
      </aapt:attr>
      </path>

      <path android:name="path_2" android:pathData="M 99.84 99.32 C 89.871 95.945 79.051 96.024 69.133 99.545 C 59.215 103.065 50.765 109.826 45.155 118.73 C 39.545 127.634 37.094 138.174 38.2 148.64 L 37.94 148.64 C 30.783 148.665 23.909 151.471 18.779 156.461 C 13.648 161.452 10.653 168.246 10.43 175.399 C 10.207 182.553 12.773 189.52 17.583 194.82 C 22.392 200.121 29.079 203.349 36.22 203.82 C 67.216 202.93 96.673 189.98 118.284 167.742 C 139.895 145.504 151.997 115.689 152 84.68 C 152 83 151.94 81.33 151.87 79.68 C 149.443 79.361 146.998 79.194 144.55 79.18 C 136.095 79.171 127.735 80.962 120.026 84.434 C 112.317 87.907 105.435 92.982 99.84 99.32 Z"
             android:strokeWidth="1">
      <aapt:attr name="android:fillColor">
          <gradient
                  android:startY="0"
                  android:startX="150"
                  android:endY="0"
                  android:endX="000"
                  android:type="linear">
              <item android:offset="0" android:color="#40F15D"/>
              <item android:offset="1" android:color="#42C54F"/>
          </gradient>
      </aapt:attr>
  </path>
  </group>
</vector>

================================================
FILE: app/src/debug/res/mipmap-anydpi-v26/ic_banner.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_banner_background"/>
</adaptive-icon>

================================================
FILE: app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
    <monochrome android:drawable="@drawable/ic_cloudstream_monochrome"/>
</adaptive-icon>

================================================
FILE: app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background"/>
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
    <monochrome android:drawable="@drawable/ic_cloudstream_monochrome"/>
</adaptive-icon>

================================================
FILE: app/src/debug/res/values/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="ic_launcher_background">#000000</color>
</resources>

================================================
FILE: app/src/debug/res/values/strings.xml
================================================
<resources>
    <string name="app_name">CloudStream Debug</string>
</resources>

================================================
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" /> <!-- I dont remember, probs has to do with downloads -->
    <uses-permission android:name="android.permission.INTERNET" /> <!-- unless you only use cs3 as a player for downloaded stuff, you need this -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- Downloads -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- Downloads on low api devices -->
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" /> <!-- Plugin API -->
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <!-- Used for player vertical slide -->
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <!-- Used for app update -->
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <!-- Used for app notifications on Android 13+ -->
    <uses-permission android:name="com.android.providers.tv.permission.WRITE_EPG_DATA" /> <!-- Used for Android TV watch next -->
    <uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" /> <!-- Used for updates without prompt -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- Used for update service -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
    <uses-permission android:name="android.permission.USE_BIOMETRIC" />
    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> <!-- We can use this directly as CS3 is not on Play Store -->
    <uses-permission android:name="com.android.providers.tv.permission.READ_EPG_DATA" />  <!-- We can use to read the tv channel list -->
    <!-- Required for OpenInAppAction and getting arbitrary Aniyomi packages  -->
    <uses-permission
        android:name="android.permission.QUERY_ALL_PACKAGES"
        tools:ignore="QueryAllPackagesPermission" />

    <!-- Fixes android tv fuckery -->
    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />
    <uses-feature
        android:name="android.software.leanback"
        android:required="false" />

    <!-- Without the large heap Exoplayer buffering gets reset due to OOM. -->
    <!--TODO https://stackoverflow.com/questions/41799732/chromecast-button-not-visible-in-android-->
    <application
        android:name=".CloudStreamApp"
        android:allowBackup="true"
        android:appCategory="video"
        android:banner="@mipmap/ic_banner"
        android:fullBackupContent="@xml/backup_descriptor"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:pageSizeCompat="enabled"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:targetApi="${target_sdk_version}">

        <meta-data
            android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"
            android:value="com.lagradost.cloudstream3.utils.CastOptionsProvider" />

        <profileable
            android:shell="true"
            tools:targetApi="q" />

        <activity
            android:name=".ui.player.DownloadedPlayerActivity"
            android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|navigation"
            android:exported="true"
            android:resizeableActivity="true"
            android:screenOrientation="userLandscape"
            android:supportsPictureInPicture="true"
            android:taskAffinity="com.lagradost.cloudstream3.downloadedplayer"
            android:launchMode="singleTask"
            tools:ignore="DiscouragedApi">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="content" />
                <data android:mimeType="video/*" />
            </intent-filter>

            <!-- I dont think this label can be translated, but idk -->
            <intent-filter android:label="@string/play_with_app_name">
                <action android:name="android.intent.action.SEND" />

                <category android:name="android.intent.category.DEFAULT" />

                <data android:mimeType="*/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.SEND" />
                <action android:name="android.intent.action.OPEN_DOCUMENT" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="magnet" />
            </intent-filter>
            <!--<intent-filter tools:ignore="AppLinkUrlError">
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.SEND" />
                <action android:name="android.intent.action.OPEN_DOCUMENT" />

                <category android:name="android.intent.category.DEFAULT" />

                <data android:mimeType="application/x-bittorrent" />
            </intent-filter>-->
        </activity>
        <!--
        android:launchMode="singleTask"
        is a bit experimental, it makes loading repositories from browser still stay on the same page
        no idea about side effects
        -->
        <activity
            android:name=".MainActivity"
            android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|navigation|uiMode"
            android:exported="true"
            android:launchMode="singleTask"
            android:resizeableActivity="true"
            android:supportsPictureInPicture="true">

            <!-- cloudstreamplayer://encodedUrl?name=Dune -->
            <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="cloudstreamplayer" />
            </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="cloudstreamapp" />
            </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="cloudstreamrepo" />
            </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="csshare" />
            </intent-filter>
            <!-- Allow searching with intents: cloudstreamsearch://Your%20Name -->
            <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="cloudstreamsearch" />
            </intent-filter>

            <!--
            Allow opening from continue watching with intents: cloudstreamsearch://1234
            Used on Android TV Watch Next
             -->
            <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="cloudstreamcontinuewatching" />
            </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:host="cs.repo"
                    android:pathPrefix="/"
                    android:scheme="https" />
            </intent-filter>
        </activity>

        <activity
            android:name=".ui.account.AccountSelectActivity"
            android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden"
            android:exported="true">
            <intent-filter android:exported="true">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <receiver
            android:name=".receivers.VideoDownloadRestartReceiver"
            android:enabled="false"
            android:exported="false">
            <intent-filter android:exported="false">
                <action android:name="restart_service" />
            </intent-filter>
        </receiver>

        <service
            android:name=".services.VideoDownloadService"
            android:enabled="true"
            android:foregroundServiceType="dataSync"
            android:exported="false" />

        <service
            android:name=".services.DownloadQueueService"
            android:enabled="true"
            android:foregroundServiceType="dataSync"
            android:exported="false" />

        <!-- Necessary for WorkManager services: https://stackoverflow.com/a/77186316 -->
        <service
            android:name="androidx.work.impl.foreground.SystemForegroundService"
            android:foregroundServiceType="dataSync"
            tools:node="merge" />

        <activity
            android:name=".ui.ControllerActivity"
            android:exported="false" />

        <service
            android:name=".services.PackageInstallerService"
            android:foregroundServiceType="dataSync"
            android:exported="false" />

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:enabled="true"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>
    </application>
    
</manifest>


================================================
FILE: app/src/main/java/com/lagradost/cloudstream3/AcraApplication.kt
================================================
package com.lagradost.cloudstream3

import android.content.Context
import com.lagradost.api.setContext
import com.lagradost.cloudstream3.utils.DataStore.getKey
import com.lagradost.cloudstream3.utils.DataStore.removeKeys
import com.lagradost.cloudstream3.utils.DataStore.setKey
import java.lang.ref.WeakReference

/**
 * Deprecated alias for CloudStreamApp for backwards compatibility with plugins.
 * Use CloudStreamApp instead.
 */
// Deprecate after next stable
/*@Deprecated(
    message = "AcraApplication is deprecated, use CloudStreamApp instead",
    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp"),
    level = DeprecationLevel.WARNING
)*/
class AcraApplication {
	// All methods here can be changed to be a wrapper around CloudStream app
	// without a seperate deprecation after next stable. All methods should
	// also be deprecated at that time.
	companion object {

		// This can be removed without deprecation after next stable
		private var _context: WeakReference<Context>? = null
		/*@Deprecated(
		    message = "AcraApplication is deprecated, use CloudStreamApp instead",
		    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp.context"),
		    level = DeprecationLevel.WARNING
		)*/
		var context
		get() = _context?.get()
		internal set(value) {
			_context = WeakReference(value)
			setContext(WeakReference(value))
		}

		/*@Deprecated(
		    message = "AcraApplication is deprecated, use CloudStreamApp instead",
		    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp.removeKeys(folder)"),
		    level = DeprecationLevel.WARNING
		)*/
		fun removeKeys(folder: String): Int? {
            return context?.removeKeys(folder)
        }

		/*@Deprecated(
		    message = "AcraApplication is deprecated, use CloudStreamApp instead",
		    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp.setKey(path, value)"),
		    level = DeprecationLevel.WARNING
		)*/
		fun <T> setKey(path: String, value: T) {
			context?.setKey(path, value)
		}

		/*@Deprecated(
		    message = "AcraApplication is deprecated, use CloudStreamApp instead",
		    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp.setKey(folder, path, value)"),
		    level = DeprecationLevel.WARNING
		)*/
		fun <T> setKey(folder: String, path: String, value: T) {
			context?.setKey(folder, path, value)
		}

		/*@Deprecated(
		    message = "AcraApplication is deprecated, use CloudStreamApp instead",
		    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp.getKey(path, defVal)"),
		    level = DeprecationLevel.WARNING
		)*/
		inline fun <reified T : Any> getKey(path: String, defVal: T?): T? {
			return context?.getKey(path, defVal)
		}

		/*@Deprecated(
		    message = "AcraApplication is deprecated, use CloudStreamApp instead",
		    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp.getKey(path)"),
		    level = DeprecationLevel.WARNING
		)*/
		inline fun <reified T : Any> getKey(path: String): T? {
			return context?.getKey(path)
		}

		/*@Deprecated(
		    message = "AcraApplication is deprecated, use CloudStreamApp instead",
		    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp.getKey(folder, path)"),
		    level = DeprecationLevel.WARNING
		)*/
		inline fun <reified T : Any> getKey(folder: String, path: String): T? {
			return context?.getKey(folder, path)
		}

		/*@Deprecated(
		    message = "AcraApplication is deprecated, use CloudStreamApp instead",
		    replaceWith = ReplaceWith("com.lagradost.cloudstream3.CloudStreamApp.getKey(folder, path, defVal)"),
		    level = DeprecationLevel.WARNING
		)*/
		inline fun <reified T : Any> getKey(folder: String, path: String, defVal: T?): T? {
			return context?.getKey(folder, path, defVal)
		}
	}
}


================================================
FILE: app/src/main/java/com/lagradost/cloudstream3/CloudStreamApp.kt
================================================
package com.lagradost.cloudstream3

import android.app.Activity
import android.app.Application
import android.content.Context
import android.content.ContextWrapper
import android.content.Intent
import android.os.Build
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import coil3.ImageLoader
import coil3.PlatformContext
import coil3.SingletonImageLoader
import com.lagradost.api.setContext
import com.lagradost.cloudstream3.BuildConfig
import com.lagradost.cloudstream3.mvvm.safe
import com.lagradost.cloudstream3.mvvm.safeAsync
import com.lagradost.cloudstream3.plugins.PluginManager
import com.lagradost.cloudstream3.ui.settings.Globals.EMULATOR
import com.lagradost.cloudstream3.ui.settings.Globals.TV
import com.lagradost.cloudstream3.ui.settings.Globals.isLayout
import com.lagradost.cloudstream3.utils.AppContextUtils.openBrowser
import com.lagradost.cloudstream3.utils.AppDebug
import com.lagradost.cloudstream3.utils.Coroutines.runOnMainThread
import com.lagradost.cloudstream3.utils.DataStore.getKey
import com.lagradost.cloudstream3.utils.DataStore.getKeys
import com.lagradost.cloudstream3.utils.DataStore.removeKey
import com.lagradost.cloudstream3.utils.DataStore.removeKeys
import com.lagradost.cloudstream3.utils.DataStore.setKey
import com.lagradost.cloudstream3.utils.ImageLoader.buildImageLoader
import kotlinx.coroutines.runBlocking
import java.io.File
import java.io.FileNotFoundException
import java.io.PrintStream
import java.lang.ref.WeakReference
import java.util.Locale
import kotlin.concurrent.thread
import kotlin.system.exitProcess

class ExceptionHandler(
    val errorFile: File,
    val onError: (() -> Unit)
) : Thread.UncaughtExceptionHandler {

    override fun uncaughtException(thread: Thread, error: Throwable) {
        try {
            val threadId = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA) {
                thread.threadId()
            } else {
                @Suppress("DEPRECATION")
                thread.id
            }

            PrintStream(errorFile).use { ps ->
                ps.println("Currently loading extension: ${PluginManager.currentlyLoading ?: "none"}")
                ps.println("Fatal exception on thread ${thread.name} ($threadId)")
                error.printStackTrace(ps)
            }
        } catch (_: FileNotFoundException) {
        }
        try {
            onError()
        } catch (_: Exception) {
        }
        exitProcess(1)
    }
}

@Prerelease
class CloudStreamApp : Application(), SingletonImageLoader.Factory {

    override fun onCreate() {
        super.onCreate()
        // If we want to initialize Coil as early as possible, maybe when
        // loading an image or GIF in a splash screen activity.
        // buildImageLoader(applicationContext)

        ExceptionHandler(filesDir.resolve("last_error")) {
            val intent = context!!.packageManager.getLaunchIntentForPackage(context!!.packageName)
            startActivity(Intent.makeRestartActivityTask(intent!!.component))
        }.also {
            exceptionHandler = it
            Thread.setDefaultUncaughtExceptionHandler(it)
        }

        AppDebug.isDebug = BuildConfig.DEBUG
    }

    override fun attachBaseContext(base: Context?) {
        super.attachBaseContext(base)
        context = base
        // This can be removed without deprecation after next stable
        AcraApplication.context = context
    }

    override fun newImageLoader(context: PlatformContext): ImageLoader {
        // Coil module will be initialized globally when first loadImage() is invoked.
        return buildImageLoader(applicationContext)
    }

    companion object {
        var exceptionHandler: ExceptionHandler? = null

        /** Use to get Activity from Context. */
        tailrec fun Context.getActivity(): Activity? {
            return when (this) {
                is Activity -> this
                is ContextWrapper -> baseContext.getActivity()
                else -> null
            }
        }

        private var _context: WeakReference<Context>? = null
        var context
            get() = _context?.get()
            private set(value) {
                _context = WeakReference(value)
                setContext(WeakReference(value))
            }

        fun <T : Any> getKeyClass(path: String, valueType: Class<T>): T? {
            return context?.getKey(path, valueType)
        }

        fun <T : Any> setKeyClass(path: String, value: T) {
            context?.setKey(path, value)
        }

        fun removeKeys(folder: String): Int? {
            return context?.removeKeys(folder)
        }

        fun <T> setKey(path: String, value: T) {
            context?.setKey(path, value)
        }

        fun <T> setKey(folder: String, path: String, value: T) {
            context?.setKey(folder, path, value)
        }

        inline fun <reified T : Any> getKey(path: String, defVal: T?): T? {
            return context?.getKey(path, defVal)
        }

        inline fun <reified T : Any> getKey(path: String): T? {
            return context?.getKey(path)
        }

        inline fun <reified T : Any> getKey(folder: String, path: String): T? {
            return context?.getKey(folder, path)
        }

        inline fun <reified T : Any> getKey(folder: String, path: String, defVal: T?): T? {
            return context?.getKey(folder, path, defVal)
        }

        fun getKeys(folder: String): List<String>? {
            return context?.getKeys(folder)
        }

        fun removeKey(folder: String, path: String) {
            context?.removeKey(folder, path)
        }

        fun removeKey(path: String) {
            context?.removeKey(path)
        }

        /** If fallbackWebView is true and a fragment is supplied then it will open a WebView with the URL if the browser fails. */
        fun openBrowser(url: String, fallbackWebView: Boolean = false, fragment: Fragment? = null) {
            context?.openBrowser(url, fallbackWebView, fragment)
        }

        /** Will fall back to WebView if in TV or emulator layout. */
        fun openBrowser(url: String, activity: FragmentActivity?) {
            openBrowser(
                url,
                isLayout(TV or EMULATOR),
                activity?.supportFragmentManager?.fragments?.lastOrNull()
            )
        }
    }
}


================================================
FILE: app/src/main/java/com/lagradost/cloudstream3/CommonActivity.kt
================================================
package com.lagradost.cloudstream3

import android.annotation.SuppressLint
import android.app.Activity
import android.app.PictureInPictureParams
import android.content.Context
import android.content.pm.PackageManager
import android.content.res.Configuration
import android.content.res.Resources
import android.Manifest
import android.os.Build
import android.util.DisplayMetrics
import android.util.Log
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.View.NO_ID
import android.view.ViewGroup
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.MainThread
import androidx.annotation.StringRes
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.SearchView
import androidx.core.content.ContextCompat
import androidx.core.view.children
import androidx.core.view.isNotEmpty
import androidx.preference.PreferenceManager
import com.google.android.gms.cast.framework.CastSession
import com.google.android.material.chip.ChipGroup
import com.google.android.material.navigationrail.NavigationRailView
import com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey
import com.lagradost.cloudstream3.CloudStreamApp.Companion.removeKey
import com.lagradost.cloudstream3.actions.OpenInAppAction
import com.lagradost.cloudstream3.actions.VideoClickActionHolder
import com.lagradost.cloudstream3.databinding.ToastBinding
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.syncproviders.AccountManager
import com.lagradost.cloudstream3.ui.home.HomeChildItemAdapter
import com.lagradost.cloudstream3.ui.home.ParentItemAdapter
import com.lagradost.cloudstream3.ui.player.PlayerEventType
import com.lagradost.cloudstream3.ui.player.PlayerPipHelper.isPIPPossible
import com.lagradost.cloudstream3.ui.player.Torrent
import com.lagradost.cloudstream3.ui.result.ActorAdaptor
import com.lagradost.cloudstream3.ui.result.EpisodeAdapter
import com.lagradost.cloudstream3.ui.result.ImageAdapter
import com.lagradost.cloudstream3.ui.search.SearchAdapter
import com.lagradost.cloudstream3.ui.settings.Globals.isLayout
import com.lagradost.cloudstream3.ui.settings.Globals.TV
import com.lagradost.cloudstream3.ui.settings.Globals.updateTv
import com.lagradost.cloudstream3.ui.settings.extensions.PluginAdapter
import com.lagradost.cloudstream3.utils.AppContextUtils.isRtl
import com.lagradost.cloudstream3.utils.Coroutines.ioSafe
import com.lagradost.cloudstream3.utils.Event
import com.lagradost.cloudstream3.utils.UIHelper.showInputMethod
import com.lagradost.cloudstream3.utils.UIHelper.toPx
import com.lagradost.cloudstream3.utils.UiText
import java.lang.ref.WeakReference
import java.util.Locale
import kotlin.math.max
import kotlin.math.min
import org.schabi.newpipe.extractor.NewPipe

enum class FocusDirection {
    Start,
    End,
    Up,
    Down,
}

object CommonActivity {

    private var _activity: WeakReference<Activity>? = null
    var activity
        get() = _activity?.get()
        private set(value) {
            _activity = WeakReference(value)
        }

    @MainThread
    fun setActivityInstance(newActivity: Activity?) {
        activity = newActivity
    }

    @MainThread
    fun Activity?.getCastSession(): CastSession? {
        return (this as MainActivity?)?.mSessionManager?.currentCastSession
    }

    val displayMetrics: DisplayMetrics = Resources.getSystem().displayMetrics

    // screenWidth and screenHeight does always
    // refer to the screen while in landscape mode
    val screenWidth: Int
        get() {
            return max(displayMetrics.widthPixels, displayMetrics.heightPixels)
        }
    val screenHeight: Int
        get() {
            return min(displayMetrics.widthPixels, displayMetrics.heightPixels)
        }
    val screenWidthWithOrientation: Int
        get() {
            return displayMetrics.widthPixels
        }
    val screenHeightWithOrientation: Int
        get() {
            return displayMetrics.heightPixels
        }

    var isPipDesired: Boolean = false
    var isInPIPMode: Boolean = false

    val onColorSelectedEvent = Event<Pair<Int, Int>>()
    val onDialogDismissedEvent = Event<Int>()

    var playerEventListener: ((PlayerEventType) -> Unit)? = null
    var keyEventListener: ((Pair<KeyEvent?, Boolean>) -> Boolean)? = null
    var appliedTheme: Int = 0
    var appliedColor: Int = 0

    private var currentToast: Toast? = null

    fun showToast(@StringRes message: Int, duration: Int? = null) {
        val act = activity ?: return
        act.runOnUiThread {
            showToast(act, act.getString(message), duration)
        }
    }

    fun showToast(message: String?, duration: Int? = null) {
        val act = activity ?: return
        act.runOnUiThread {
            showToast(act, message, duration)
        }
    }

    fun showToast(message: UiText?, duration: Int? = null) {
        val act = activity ?: return
        if (message == null) return
        act.runOnUiThread {
            showToast(act, message.asString(act), duration)
        }
    }


    @MainThread
    fun showToast(act: Activity?, text: UiText, duration: Int) {
        if (act == null) return
        text.asStringNull(act)?.let {
            showToast(act, it, duration)
        }
    }

    /** duration is Toast.LENGTH_SHORT if null*/
    @MainThread
    fun showToast(act: Activity?, @StringRes message: Int, duration: Int? = null) {
        if (act == null) return
        showToast(act, act.getString(message), duration)
    }

    const val TAG = "COMPACT"

    /** duration is Toast.LENGTH_SHORT if null*/
    @MainThread
    fun showToast(act: Activity?, message: String?, duration: Int? = null) {
        if (act == null || message == null) {
            Log.w(TAG, "invalid showToast act = $act message = $message")
            return
        }
        Log.i(TAG, "showToast = $message")

        try {
            currentToast?.cancel()
        } catch (e: Exception) {
            logError(e)
        }

        try {
            val binding = ToastBinding.inflate(act.layoutInflater)
            binding.text.text = message.trim()

            // custom toasts are deprecated and won't appear when cs3 sets minSDK to api30 (A11)
            val toast = Toast(act)
            toast.duration = duration ?: Toast.LENGTH_SHORT
            toast.setGravity(Gravity.CENTER_HORIZONTAL or Gravity.BOTTOM, 0, 5.toPx)
            @Suppress("DEPRECATION")
            toast.view =
                binding.root // FIXME Find an alternative using default Toasts since custom toasts are deprecated and won't appear with api30 set as minSDK version.
            currentToast = toast
            toast.show()

        } catch (e: Exception) {
            logError(e)
        }
    }

    /**
     * Set locale
     * @param languageTag shall a IETF BCP 47 conformant tag.
     * Check [com.lagradost.cloudstream3.utils.SubtitleHelper].
     *
     * See locales on:
     * https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-core/availableLocales.json
     * https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
     * https://android.googlesource.com/platform/frameworks/base/+/android-16.0.0_r2/core/res/res/values/locale_config.xml
     * https://iso639-3.sil.org/code_tables/639/data/all
     */
    fun setLocale(context: Context?, languageTag: String?) {
        if (context == null || languageTag == null) return
        val locale = Locale.forLanguageTag(languageTag)
        val resources: Resources = context.resources
        val config = resources.configuration
        Locale.setDefault(locale)
        config.setLocale(locale)

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
            context.createConfigurationContext(config)

        @Suppress("DEPRECATION")
        resources.updateConfiguration(
            config,
            resources.displayMetrics
        ) // FIXME this should be replaced
    }

    fun Context.updateLocale() {
        val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
        val localeCode = settingsManager.getString(getString(R.string.locale_key), null)
        setLocale(this, localeCode)
    }

    fun init(act: Activity) {
        setActivityInstance(act)
        ioSafe { Torrent.deleteAllFiles() }
        val componentActivity = activity as? ComponentActivity ?: return

        componentActivity.updateLocale()
        componentActivity.updateTv()
        AccountManager.initMainAPI()
        NewPipe.init(DownloaderTestImpl.getInstance())

        MainActivity.activityResultLauncher =
            componentActivity.registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
                if (result.resultCode == AppCompatActivity.RESULT_OK) {
                    val actionUid =
                        getKey<String>("last_click_action") ?: return@registerForActivityResult
                    Log.d(TAG, "Loading action $actionUid result handler")
                    val action = VideoClickActionHolder.getByUniqueId(actionUid) as? OpenInAppAction
                        ?: return@registerForActivityResult
                    action.onResultSafe(act, result.data)
                    removeKey("last_click_action")
                    removeKey("last_opened")
                }
            }

        // Ask for notification permissions on Android 13
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
            ContextCompat.checkSelfPermission(
                componentActivity,
                Manifest.permission.POST_NOTIFICATIONS
            ) != PackageManager.PERMISSION_GRANTED
        ) {
            val requestPermissionLauncher = componentActivity.registerForActivityResult(
                ActivityResultContracts.RequestPermission()
            ) { isGranted: Boolean ->
                Log.d(TAG, "Notification permission: $isGranted")
            }
            requestPermissionLauncher.launch(
                Manifest.permission.POST_NOTIFICATIONS
            )
        }
    }

    /** Enters pip mode if it is both possible and desired to do so*/
    private fun Activity.enterPIPMode() {
        if (!isPipDesired || !this.isPIPPossible()) return

        try {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                try {
                    enterPictureInPictureMode(PictureInPictureParams.Builder().build())
                } catch (_: Exception) {
                    // Use fallback just in case
                    @Suppress("DEPRECATION")
                    enterPictureInPictureMode()
                }
            } else {
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
                    @Suppress("DEPRECATION")
                    enterPictureInPictureMode()
                }
            }
        } catch (e: Exception) {
            logError(e)
        }
    }

    fun onUserLeaveHint(act: Activity) {
        // On Android 12 and later we use setAutoEnterEnabled() instead.
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) return
        act.enterPIPMode()
    }

    fun updateTheme(act: Activity) {
        val settingsManager = PreferenceManager.getDefaultSharedPreferences(act)
        if (settingsManager
                .getString(act.getString(R.string.app_theme_key), "AmoledLight") == "System"
            && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
        ) {
            loadThemes(act)
        }
    }

    private fun mapSystemTheme(act: Activity): Int {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
            val currentNightMode =
                act.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
            return when (currentNightMode) {
                Configuration.UI_MODE_NIGHT_NO -> R.style.LightMode // Night mode is not active, we're using the light theme
                else -> R.style.AppTheme // Night mode is active, we're using dark theme
            }
        } else {
            return R.style.AppTheme
        }
    }

    fun loadThemes(act: Activity?) {
        if (act == null) return
        val settingsManager = PreferenceManager.getDefaultSharedPreferences(act)

        val currentTheme =
            when (settingsManager.getString(act.getString(R.string.app_theme_key), "AmoledLight")) {
                "System" -> mapSystemTheme(act)
                "Black" -> R.style.AppTheme
                "Light" -> R.style.LightMode
                "Amoled" -> R.style.AmoledMode
                "AmoledLight" -> R.style.AmoledModeLight
                "Monet" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
                    R.style.MonetMode else R.style.AppTheme

                "Dracula" -> R.style.DraculaMode
                "Lavender" -> R.style.LavenderMode
                "SilentBlue" -> R.style.SilentBlueMode

                else -> R.style.AppTheme
            }

        val currentOverlayTheme =
            when (settingsManager.getString(act.getString(R.string.primary_color_key), "Normal")) {
                "Normal" -> R.style.OverlayPrimaryColorNormal
                "DandelionYellow" -> R.style.OverlayPrimaryColorDandelionYellow
                "CarnationPink" -> R.style.OverlayPrimaryColorCarnationPink
                "Orange" -> R.style.OverlayPrimaryColorOrange
                "DarkGreen" -> R.style.OverlayPrimaryColorDarkGreen
                "Maroon" -> R.style.OverlayPrimaryColorMaroon
                "NavyBlue" -> R.style.OverlayPrimaryColorNavyBlue
                "Grey" -> R.style.OverlayPrimaryColorGrey
                "White" -> R.style.OverlayPrimaryColorWhite
                "CoolBlue" -> R.style.OverlayPrimaryColorCoolBlue
                "Brown" -> R.style.OverlayPrimaryColorBrown
                "Purple" -> R.style.OverlayPrimaryColorPurple
                "Green" -> R.style.OverlayPrimaryColorGreen
                "GreenApple" -> R.style.OverlayPrimaryColorGreenApple
                "Red" -> R.style.OverlayPrimaryColorRed
                "Banana" -> R.style.OverlayPrimaryColorBanana
                "Party" -> R.style.OverlayPrimaryColorParty
                "Pink" -> R.style.OverlayPrimaryColorPink
                "Lavender" -> R.style.OverlayPrimaryColorLavender
                "Monet" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
                    R.style.OverlayPrimaryColorMonet else R.style.OverlayPrimaryColorNormal

                "Monet2" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
                    R.style.OverlayPrimaryColorMonetTwo else R.style.OverlayPrimaryColorNormal

                else -> R.style.OverlayPrimaryColorNormal
            }

        act.theme.applyStyle(currentTheme, true)
        act.theme.applyStyle(currentOverlayTheme, true)
        appliedTheme = currentTheme
        appliedColor = currentOverlayTheme
        act.updateTv()
        if (isLayout(TV)) act.theme.applyStyle(R.style.AppThemeTvOverlay, true)
        act.theme.applyStyle(
            R.style.LoadedStyle,
            true
        ) // THEME IS SET BEFORE VIEW IS CREATED TO APPLY THE THEME TO THE MAIN VIEW
    }

    /** because we want closes find, aka when multiple have the same id, we go to parent
    until the correct one is found */
    private fun localLook(from: View, id: Int): View? {
        if (id == NO_ID) return null
        var currentLook: View = from
        // limit to 15 look depth
        for (i in 0..15) {
            currentLook.findViewById<View?>(id)?.let { return it }
            currentLook = (currentLook.parent as? View) ?: break
        }
        return null
    }
    /*var currentLook: View = view
    while (true) {
        val tmpNext = currentLook.findViewById<View?>(nextId)
        if (tmpNext != null) {
            next = tmpNext
            break
        }
        currentLook = currentLook.parent as? View ?: break
    }*/

    private fun View.hasContent(): Boolean {
        return isShown && when (this) {
            is ViewGroup -> this.isNotEmpty()
            else -> true
        }
    }

    /** skips the initial stage of searching for an id using the view, see getNextFocus for specification */
    fun continueGetNextFocus(
        root: Any?,
        view: View,
        direction: FocusDirection,
        nextId: Int,
        depth: Int = 0
    ): View? {
        if (nextId == NO_ID) return null

        // do an initial search for the view, in case the localLook is too deep we can use this as
        // an early break and backup view
        var next =
            when (root) {
                is Activity -> root.findViewById(nextId)
                is View -> root.rootView.findViewById<View?>(nextId)
                else -> null
            } ?: return null

        next = localLook(view, nextId) ?: next
        val shown = next.hasContent()

        // if cant focus but visible then break and let android decide
        // the exception if is the view is a parent and has children that wants focus
        val hasChildrenThatWantsFocus = (next as? ViewGroup)?.let { parent ->
            parent.descendantFocusability == ViewGroup.FOCUS_AFTER_DESCENDANTS && parent.isNotEmpty()
        } ?: false
        if (!next.isFocusable && shown && !hasChildrenThatWantsFocus) return null

        // if not shown then continue because we will "skip" over views to get to a replacement
        if (!shown) {
            // we don't want a while true loop, so we let android decide if we find a recursive view
            if (next == view) return null
            return getNextFocus(root, next, direction, depth + 1)
        }

        (when (next) {
            is ChipGroup -> {
                next.children.firstOrNull { it.isFocusable && it.isShown }
            }

            is NavigationRailView -> {
                next.findViewById(next.selectedItemId) ?: next.findViewById(R.id.navigation_home)
            }

            else -> null
        })?.let {
            return it
        }

        // nothing wrong with the view found, return it
        return next
    }

    /** recursively looks for a next focus up to a depth of 10,
     * this is used to override the normal shit focus system
     * because this application has a lot of invisible views that messes with some tv devices*/
    fun getNextFocus(
        root: Any?,
        view: View?,
        direction: FocusDirection,
        depth: Int = 0
    ): View? {
        // if input is invalid let android decide + depth test to not crash if loop is found
        if (view == null || depth >= 10 || root == null) {
            return null
        }

        var nextId = when (direction) {
            FocusDirection.Start -> {
                if (view.isRtl())
                    view.nextFocusRightId
                else
                    view.nextFocusLeftId
            }

            FocusDirection.Up -> {
                view.nextFocusUpId
            }

            FocusDirection.End -> {
                if (view.isRtl())
                    view.nextFocusLeftId
                else
                    view.nextFocusRightId
            }

            FocusDirection.Down -> {
                view.nextFocusDownId
            }
        }

        if (nextId == NO_ID) {
            // if not specified then use forward id
            nextId = view.nextFocusForwardId
            // if view is still not found to next focus then return and let android decide
            if (nextId == NO_ID)
                return null
        }
        return continueGetNextFocus(root, view, direction, nextId, depth)
    }


    fun onKeyDown(act: Activity?, keyCode: Int, event: KeyEvent?): Boolean? {

        // 149 keycode_numpad 5
        val playerEvent = when (keyCode) {
            KeyEvent.KEYCODE_FORWARD, KeyEvent.KEYCODE_D, KeyEvent.KEYCODE_MEDIA_SKIP_FORWARD, KeyEvent.KEYCODE_MEDIA_FAST_FORWARD -> {
                PlayerEventType.SeekForward
            }

            KeyEvent.KEYCODE_A, KeyEvent.KEYCODE_MEDIA_SKIP_BACKWARD, KeyEvent.KEYCODE_MEDIA_REWIND -> {
                PlayerEventType.SeekBack
            }

            KeyEvent.KEYCODE_MEDIA_NEXT, KeyEvent.KEYCODE_BUTTON_R1, KeyEvent.KEYCODE_N, KeyEvent.KEYCODE_NUMPAD_2, KeyEvent.KEYCODE_CHANNEL_UP -> {
                PlayerEventType.NextEpisode
            }

            KeyEvent.KEYCODE_MEDIA_PREVIOUS, KeyEvent.KEYCODE_BUTTON_L1, KeyEvent.KEYCODE_B, KeyEvent.KEYCODE_NUMPAD_1, KeyEvent.KEYCODE_CHANNEL_DOWN -> {
                PlayerEventType.PrevEpisode
            }

            KeyEvent.KEYCODE_MEDIA_PAUSE -> {
                PlayerEventType.Pause
            }

            KeyEvent.KEYCODE_MEDIA_PLAY, KeyEvent.KEYCODE_BUTTON_START -> {
                PlayerEventType.Play
            }

            KeyEvent.KEYCODE_L, KeyEvent.KEYCODE_NUMPAD_7, KeyEvent.KEYCODE_7 -> {
                PlayerEventType.Lock
            }

            KeyEvent.KEYCODE_H, KeyEvent.KEYCODE_MENU -> {
                PlayerEventType.ToggleHide
            }

            KeyEvent.KEYCODE_M, KeyEvent.KEYCODE_VOLUME_MUTE -> {
                PlayerEventType.ToggleMute
            }

            KeyEvent.KEYCODE_S, KeyEvent.KEYCODE_NUMPAD_9, KeyEvent.KEYCODE_9 -> {
                PlayerEventType.ShowMirrors
            }
            // OpenSubtitles shortcut
            KeyEvent.KEYCODE_O, KeyEvent.KEYCODE_NUMPAD_8, KeyEvent.KEYCODE_8 -> {
                PlayerEventType.SearchSubtitlesOnline
            }

            KeyEvent.KEYCODE_E, KeyEvent.KEYCODE_NUMPAD_3, KeyEvent.KEYCODE_3 -> {
                PlayerEventType.ShowSpeed
            }

            KeyEvent.KEYCODE_R, KeyEvent.KEYCODE_NUMPAD_0, KeyEvent.KEYCODE_0 -> {
                PlayerEventType.Resize
            }

            KeyEvent.KEYCODE_C, KeyEvent.KEYCODE_NUMPAD_4, KeyEvent.KEYCODE_4 -> {
                PlayerEventType.SkipOp
            }

            KeyEvent.KEYCODE_V, KeyEvent.KEYCODE_NUMPAD_5, KeyEvent.KEYCODE_5 -> {
                PlayerEventType.SkipCurrentChapter
            }

            KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, KeyEvent.KEYCODE_P, KeyEvent.KEYCODE_SPACE, KeyEvent.KEYCODE_NUMPAD_ENTER, KeyEvent.KEYCODE_ENTER -> { // space is not captured due to navigation
                PlayerEventType.PlayPauseToggle
            }

            else -> return null
        }
        val listener = playerEventListener
        if (listener != null) {
            listener.invoke(playerEvent)
            return true
        }
        return null

        //when (keyCode) {
        //    KeyEvent.KEYCODE_DPAD_CENTER -> {
        //        println("DPAD PRESSED")
        //    }
        //}
    }

    /** overrides focus and custom key events */
    fun dispatchKeyEvent(act: Activity?, event: KeyEvent?): Boolean? {
        if (act == null) return null
        val currentFocus = act.currentFocus

        event?.keyCode?.let { keyCode ->
            if (currentFocus == null || event.action != KeyEvent.ACTION_DOWN) return@let
            val nextView = when (keyCode) {
                KeyEvent.KEYCODE_DPAD_LEFT -> getNextFocus(
                    act,
                    currentFocus,
                    FocusDirection.Start
                )

                KeyEvent.KEYCODE_DPAD_RIGHT -> getNextFocus(
                    act,
                    currentFocus,
                    FocusDirection.End
                )

                KeyEvent.KEYCODE_DPAD_UP -> getNextFocus(
                    act,
                    currentFocus,
                    FocusDirection.Up
                )

                KeyEvent.KEYCODE_DPAD_DOWN -> getNextFocus(
                    act,
                    currentFocus,
                    FocusDirection.Down
                )

                else -> null
            }

            // println("NEXT FOCUS : $nextView")
            if (nextView != null) {
                nextView.requestFocus()
                keyEventListener?.invoke(Pair(event, true))
                return true
            }

            // TODO: Figure out why removing the check for SearchAutoComplete seems
            // to break focus on TV as it shouldn't need to be used.
            @SuppressLint("RestrictedApi")
            if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER &&
                (act.currentFocus is SearchView || act.currentFocus is SearchView.SearchAutoComplete)
            ) {
                showInputMethod(act.currentFocus?.findFocus())
            }

            //println("Keycode: $keyCode")
            //showToast(
            //    this,
            //    "Got Keycode $keyCode | ${KeyEvent.keyCodeToString(keyCode)} \n ${event?.action}",
            //    Toast.LENGTH_LONG
            //)
        }

        // if someone else want to override the focus then don't handle the event as it is already
        // consumed. used in video player
        if (keyEventListener?.invoke(Pair(event, false)) == true) {
            return true
        }
        return null
    }
}

================================================
FILE: app/src/main/java/com/lagradost/cloudstream3/DownloaderTestImpl.kt
================================================
package com.lagradost.cloudstream3

import okhttp3.OkHttpClient
import okhttp3.RequestBody
import okhttp3.RequestBody.Companion.toRequestBody
import org.schabi.newpipe.extractor.downloader.Downloader
import org.schabi.newpipe.extractor.downloader.Request
import org.schabi.newpipe.extractor.downloader.Response
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException
import java.util.concurrent.TimeUnit


class DownloaderTestImpl private constructor(builder: OkHttpClient.Builder) : Downloader() {
    private val client: OkHttpClient = builder.readTimeout(30, TimeUnit.SECONDS).build()
    override fun execute(request: Request): Response {
        val httpMethod: String = request.httpMethod()
        val url: String = request.url()
        val headers: Map<String, List<String>> = request.headers()
        val dataToSend: ByteArray? = request.dataToSend()
        var requestBody: RequestBody? = null
        if (dataToSend != null) {
            requestBody = dataToSend.toRequestBody(null, 0, dataToSend.size)
        }
        val requestBuilder: okhttp3.Request.Builder = okhttp3.Request.Builder()
            .method(httpMethod, requestBody).url(url)
            .addHeader("User-Agent", USER_AGENT)

        for ((headerName, headerValueList) in headers) {
            if (headerValueList.size > 1) {
                requestBuilder.removeHeader(headerName)
                for (headerValue in headerValueList) {
                    requestBuilder.addHeader(headerName, headerValue)
                }
            } else if (headerValueList.size == 1) {
                requestBuilder.header(headerName, headerValueList[0])
            }
        }
        val response = client.newCall(requestBuilder.build()).execute()
        if (response.code == 429) {
            response.close()
            throw ReCaptchaException("reCaptcha Challenge requested", url)
        }
        val body = response.body
        val responseBodyToReturn: String = body.string()
        val latestUrl = response.request.url.toString()
        return Response(
            response.code, response.message, response.headers.toMultimap(),
            responseBodyToReturn, latestUrl
        )
    }

    companion object {
        private const val USER_AGENT =
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
        private var instance: DownloaderTestImpl? = null

        /**
         * It's recommended to call exactly once in the entire lifetime of the application.
         *
         * @param builder if null, default builder will be used
         * @return a new instance of [DownloaderTestImpl]
         */
        fun init(builder: OkHttpClient.Builder?): DownloaderTestImpl? {
            instance = DownloaderTestImpl(
                builder ?: OkHttpClient.Builder()
            )
            return instance
        }

        fun getInstance(): DownloaderTestImpl? {
            if (instance == null) {
                init(null)
            }
            return instance
        }
    }
}

================================================
FILE: app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt
================================================
package com.lagradost.cloudstream3

import android.animation.ValueAnimator
import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.content.res.ColorStateList
import android.content.res.Configuration
import android.graphics.Rect
import android.os.Bundle
import android.util.AttributeSet
import android.util.Log
import android.view.Gravity
import android.view.KeyEvent
import android.view.Menu
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.widget.CheckBox
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher
import androidx.annotation.IdRes
import androidx.annotation.MainThread
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.cardview.widget.CardView
import androidx.core.content.edit
import androidx.core.net.toUri
import androidx.core.view.children
import androidx.core.view.get
import androidx.core.view.isGone
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import androidx.core.view.marginStart
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.ViewModelProvider
import androidx.navigation.NavController
import androidx.navigation.NavDestination
import androidx.navigation.NavDestination.Companion.hierarchy
import androidx.navigation.NavGraph.Companion.findStartDestination
import androidx.navigation.NavOptions
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController
import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearSnapHelper
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager2.widget.ViewPager2
import com.google.android.gms.cast.framework.CastContext
import com.google.android.gms.cast.framework.Session
import com.google.android.gms.cast.framework.SessionManager
import com.google.android.gms.cast.framework.SessionManagerListener
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.navigationrail.NavigationRailView
import com.google.android.material.snackbar.Snackbar
import com.google.common.collect.Comparators.min
import com.jaredrummler.android.colorpicker.ColorPickerDialogListener
import com.lagradost.cloudstream3.APIHolder.allProviders
import com.lagradost.cloudstream3.APIHolder.apis
import com.lagradost.cloudstream3.APIHolder.initAll
import com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey
import com.lagradost.cloudstream3.CloudStreamApp.Companion.removeKey
import com.lagradost.cloudstream3.CloudStreamApp.Companion.setKey
import com.lagradost.cloudstream3.CommonActivity.loadThemes
import com.lagradost.cloudstream3.CommonActivity.onColorSelectedEvent
import com.lagradost.cloudstream3.CommonActivity.onDialogDismissedEvent
import com.lagradost.cloudstream3.CommonActivity.onUserLeaveHint
import com.lagradost.cloudstream3.CommonActivity.screenHeight
import com.lagradost.cloudstream3.CommonActivity.setActivityInstance
import com.lagradost.cloudstream3.CommonActivity.showToast
import com.lagradost.cloudstream3.CommonActivity.updateLocale
import com.lagradost.cloudstream3.CommonActivity.updateTheme
import com.lagradost.cloudstream3.actions.temp.fcast.FcastManager
import com.lagradost.cloudstream3.databinding.ActivityMainBinding
import com.lagradost.cloudstream3.databinding.ActivityMainTvBinding
import com.lagradost.cloudstream3.databinding.BottomResultviewPreviewBinding
import com.lagradost.cloudstream3.mvvm.Resource
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.mvvm.safe
import com.lagradost.cloudstream3.mvvm.observe
import com.lagradost.cloudstream3.mvvm.observeNullable
import com.lagradost.cloudstream3.network.initClient
import com.lagradost.cloudstream3.plugins.PluginManager
import com.lagradost.cloudstream3.plugins.PluginManager.___DO_NOT_CALL_FROM_A_PLUGIN_loadAllOnlinePlugins
import com.lagradost.cloudstream3.plugins.PluginManager.loadSinglePlugin
import com.lagradost.cloudstream3.receivers.VideoDownloadRestartReceiver
import com.lagradost.cloudstream3.services.SubscriptionWorkManager
import com.lagradost.cloudstream3.syncproviders.AccountManager
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.APP_STRING
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.APP_STRING_PLAYER
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.APP_STRING_REPO
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.APP_STRING_RESUME_WATCHING
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.APP_STRING_SEARCH
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.APP_STRING_SHARE
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.localListApi
import com.lagradost.cloudstream3.syncproviders.SyncAPI
import com.lagradost.cloudstream3.ui.APIRepository
import com.lagradost.cloudstream3.ui.SyncWatchType
import com.lagradost.cloudstream3.ui.WatchType
import com.lagradost.cloudstream3.ui.account.AccountHelper.showAccountSelectLinear
import com.lagradost.cloudstream3.ui.download.DOWNLOAD_NAVIGATE_TO
import com.lagradost.cloudstream3.ui.home.HomeViewModel
import com.lagradost.cloudstream3.ui.library.LibraryViewModel
import com.lagradost.cloudstream3.ui.player.BasicLink
import com.lagradost.cloudstream3.ui.player.GeneratorPlayer
import com.lagradost.cloudstream3.ui.player.LinkGenerator
import com.lagradost.cloudstream3.ui.result.LinearListLayout
import com.lagradost.cloudstream3.ui.result.ResultViewModel2
import com.lagradost.cloudstream3.ui.result.START_ACTION_RESUME_LATEST
import com.lagradost.cloudstream3.ui.result.SyncViewModel
import com.lagradost.cloudstream3.ui.search.SearchFragment
import com.lagradost.cloudstream3.ui.search.SearchResultBuilder
import com.lagradost.cloudstream3.ui.settings.Globals.EMULATOR
import com.lagradost.cloudstream3.ui.settings.Globals.PHONE
import com.lagradost.cloudstream3.ui.settings.Globals.TV
import com.lagradost.cloudstream3.ui.settings.Globals.isLandscape
import com.lagradost.cloudstream3.ui.settings.Globals.isLayout
import com.lagradost.cloudstream3.ui.settings.Globals.updateTv
import com.lagradost.cloudstream3.ui.settings.SettingsGeneral
import com.lagradost.cloudstream3.ui.setup.HAS_DONE_SETUP_KEY
import com.lagradost.cloudstream3.ui.setup.SetupFragmentExtensions
import com.lagradost.cloudstream3.utils.ApkInstaller
import com.lagradost.cloudstream3.utils.AppContextUtils.getApiDubstatusSettings
import com.lagradost.cloudstream3.utils.AppContextUtils.html
import com.lagradost.cloudstream3.utils.AppContextUtils.isCastApiAvailable
import com.lagradost.cloudstream3.utils.AppContextUtils.isLtr
import com.lagradost.cloudstream3.utils.AppContextUtils.isNetworkAvailable
import com.lagradost.cloudstream3.utils.AppContextUtils.isRtl
import com.lagradost.cloudstream3.utils.AppContextUtils.loadCache
import com.lagradost.cloudstream3.utils.AppContextUtils.loadRepository
import com.lagradost.cloudstream3.utils.AppContextUtils.loadResult
import com.lagradost.cloudstream3.utils.AppContextUtils.loadSearchResult
import com.lagradost.cloudstream3.utils.AppContextUtils.setDefaultFocus
import com.lagradost.cloudstream3.utils.AppContextUtils.updateHasTrailers
import com.lagradost.cloudstream3.utils.BackPressedCallbackHelper.attachBackPressedCallback
import com.lagradost.cloudstream3.utils.BackPressedCallbackHelper.detachBackPressedCallback
import com.lagradost.cloudstream3.utils.BackupUtils.backup
import com.lagradost.cloudstream3.utils.BackupUtils.setUpBackup
import com.lagradost.cloudstream3.utils.BiometricAuthenticator.BiometricCallback
import com.lagradost.cloudstream3.utils.BiometricAuthenticator.biometricPrompt
import com.lagradost.cloudstream3.utils.BiometricAuthenticator.deviceHasPasswordPinLock
import com.lagradost.cloudstream3.utils.BiometricAuthenticator.isAuthEnabled
import com.lagradost.cloudstream3.utils.BiometricAuthenticator.promptInfo
import com.lagradost.cloudstream3.utils.BiometricAuthenticator.startBiometricAuthentication
import com.lagradost.cloudstream3.utils.Coroutines.ioSafe
import com.lagradost.cloudstream3.utils.Coroutines.main
import com.lagradost.cloudstream3.utils.DataStore.getKey
import com.lagradost.cloudstream3.utils.DataStore.setKey
import com.lagradost.cloudstream3.utils.DataStoreHelper
import com.lagradost.cloudstream3.utils.DataStoreHelper.accounts
import com.lagradost.cloudstream3.utils.DataStoreHelper.migrateResumeWatching
import com.lagradost.cloudstream3.utils.Event
import com.lagradost.cloudstream3.utils.ImageLoader.loadImage
import com.lagradost.cloudstream3.utils.InAppUpdater.runAutoUpdate
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
import com.lagradost.cloudstream3.utils.SnackbarHelper.showSnackbar
import com.lagradost.cloudstream3.utils.TvChannelUtils
import com.lagradost.cloudstream3.utils.UIHelper.changeStatusBarState
import com.lagradost.cloudstream3.utils.UIHelper.checkWrite
import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe
import com.lagradost.cloudstream3.utils.UIHelper.enableEdgeToEdgeCompat
import com.lagradost.cloudstream3.utils.UIHelper.fixSystemBarsPadding
import com.lagradost.cloudstream3.utils.UIHelper.getResourceColor
import com.lagradost.cloudstream3.utils.UIHelper.hideKeyboard
import com.lagradost.cloudstream3.utils.UIHelper.navigate
import com.lagradost.cloudstream3.utils.UIHelper.requestRW
import com.lagradost.cloudstream3.utils.UIHelper.setNavigationBarColorCompat
import com.lagradost.cloudstream3.utils.UIHelper.toPx
import com.lagradost.cloudstream3.utils.USER_PROVIDER_API
import com.lagradost.cloudstream3.utils.USER_SELECTED_HOMEPAGE_API
import com.lagradost.cloudstream3.utils.setText
import com.lagradost.cloudstream3.utils.setTextHtml
import com.lagradost.cloudstream3.utils.txt
import com.lagradost.safefile.SafeFile
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import java.io.File
import java.lang.ref.WeakReference
import java.net.URI
import java.net.URLDecoder
import java.nio.charset.Charset
import kotlin.math.abs
import kotlin.math.absoluteValue
import kotlin.system.exitProcess
import com.lagradost.cloudstream3.utils.downloader.DownloadQueueManager

class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCallback {
    companion object {
        var activityResultLauncher: ActivityResultLauncher<Intent>? = null

        const val TAG = "MAINACT"
        const val ANIMATED_OUTLINE: Boolean = false
        var lastError: String? = null

        /** Update lastError variable based on error file, to check if app crashed.
         * Can be called multiple times without changing the lastError variable changing.
         **/
        fun setLastError(context: Context) {
            if (lastError != null) return

            val errorFile = context.filesDir.resolve("last_error")
            if (errorFile.exists() && errorFile.isFile) {
                lastError = errorFile.readText(Charset.defaultCharset())
                errorFile.delete()
            } else {
                lastError = null
            }
        }

        private const val FILE_DELETE_KEY = "FILES_TO_DELETE_KEY"
        const val API_NAME_EXTRA_KEY = "API_NAME_EXTRA_KEY"

        /**
         * Transient files to delete on application exit.
         * Deletes files on onDestroy().
         */
        private var filesToDelete: Set<String>
            // This needs to be persistent because the application may exit without calling onDestroy.
            get() = getKey<Set<String>>(FILE_DELETE_KEY) ?: setOf()
            private set(value) = setKey(FILE_DELETE_KEY, value)

        /**
         * Add file to delete on Exit.
         */
        fun deleteFileOnExit(file: File) {
            filesToDelete = filesToDelete + file.path
        }

        /**
         * Setting this will automatically enter the query in the search
         * next time the search fragment is opened.
         * This variable will clear itself after one use. Null does nothing.
         *
         * This is a very bad solution but I was unable to find a better one.
         **/
        var nextSearchQuery: String? = null

        /**
         * Fires every time a new batch of plugins have been loaded, no guarantee about how often this is run and on which thread
         * Boolean signifies if stuff should be force reloaded (true if force reload, false if reload when necessary).
         *
         * The force reloading are used for plugin development to instantly reload the page on deployWithAdb
         * */
        val afterPluginsLoadedEvent = Event<Boolean>()
        val mainPluginsLoadedEvent =
            Event<Boolean>() // homepage api, used to speed up time to load for homepage
        val afterRepositoryLoadedEvent = Event<Boolean>()

        // kinda shitty solution, but cant com main->home otherwise for popups
        val bookmarksUpdatedEvent = Event<Boolean>()

        /**
         * Used by DataStoreHelper to fully reload home when switching accounts
         */
        val reloadHomeEvent = Event<Boolean>()

        /**
         * Used by DataStoreHelper to fully reload library when switching accounts
         */
        val reloadLibraryEvent = Event<Boolean>()

        /**
         * Used by DataStoreHelper to fully reload Navigation Rail header picture
         */
        val reloadAccountEvent = Event<Boolean>()

        /**
         * @return true if the str has launched an app task (be it successful or not)
         * @param isWebview does not handle providers and opening download page if true. Can still add repos and login.
         * */
        @Suppress("DEPRECATION_ERROR")
        fun handleAppIntentUrl(
            activity: FragmentActivity?,
            str: String?,
            isWebview: Boolean,
            extraArgs: Bundle? = null
        ): Boolean =
            with(activity) {
                // TODO MUCH BETTER HANDLING

                // Invalid URIs can crash
                fun safeURI(uri: String) = safe { URI(uri) }

                if (str != null && this != null) {
                    if (str.startsWith("https://cs.repo")) {
                        val realUrl = "https://" + str.substringAfter("?")
                        println("Repository url: $realUrl")
                        loadRepository(realUrl)
                        return true
                    } else if (str.contains(APP_STRING)) {
                        for (api in AccountManager.allApis) {
                            if (api.isValidRedirectUrl(str)) {
                                ioSafe {
                                    Log.i(TAG, "handleAppIntent $str")
                                    try {
                                        val isSuccessful = api.login(str)
                                        if (isSuccessful) {
                                            Log.i(TAG, "authenticated ${api.name}")
                                        } else {
                                            Log.i(TAG, "failed to authenticate ${api.name}")
                                        }
                                        showToast(
                                            if (isSuccessful) {
                                                txt(R.string.authenticated_user, api.name)
                                            } else {
                                                txt(R.string.authenticated_user_fail, api.name)
                                            }
                                        )
                                    } catch (t: Throwable) {
                                        logError(t)
                                        showToast(
                                            txt(R.string.authenticated_user_fail, api.name)
                                        )
                                    }
                                }
                                return true
                            }
                        }
                        // This specific intent is used for the gradle deployWithAdb
                        // https://github.com/recloudstream/gradle/blob/master/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt#L46
                        if (str == "$APP_STRING:") {
                            ioSafe {
                                PluginManager.___DO_NOT_CALL_FROM_A_PLUGIN_hotReloadAllLocalPlugins(
                                    activity
                                )
                            }
                        }
                    } else if (safeURI(str)?.scheme == APP_STRING_REPO) {
                        val url = str.replaceFirst(APP_STRING_REPO, "https")
                        loadRepository(url)
                        return true
                    } else if (safeURI(str)?.scheme == APP_STRING_SEARCH) {
                        val query = str.substringAfter("$APP_STRING_SEARCH://")
                        nextSearchQuery =
                            try {
                                URLDecoder.decode(query, "UTF-8")
                            } catch (t: Throwable) {
                                logError(t)
                                query
                            }
                        // Use both navigation views to support both layouts.
                        // It might be better to use the QuickSearch.
                        activity?.findViewById<BottomNavigationView>(R.id.nav_view)?.selectedItemId =
                            R.id.navigation_search
                        activity?.findViewById<NavigationRailView>(R.id.nav_rail_view)?.selectedItemId =
                            R.id.navigation_search
                    } else if (safeURI(str)?.scheme == APP_STRING_PLAYER) {
                        val uri = str.toUri()
                        val name = uri.getQueryParameter("name")
                        val url = URLDecoder.decode(uri.authority, "UTF-8")

                        navigate(
                            R.id.global_to_navigation_player,
                            GeneratorPlayer.newInstance(
                                LinkGenerator(
                                    listOf(BasicLink(url, name)),
                                    extract = true,
                                )
                            )
                        )
                    } else if (safeURI(str)?.scheme == APP_STRING_RESUME_WATCHING) {
                        val id =
                            str.substringAfter("$APP_STRING_RESUME_WATCHING://").toIntOrNull()
                                ?: return false
                        ioSafe {
                            val resumeWatchingCard =
                                HomeViewModel.getResumeWatching()?.firstOrNull { it.id == id }
                                    ?: return@ioSafe
                            activity.loadSearchResult(
                                resumeWatchingCard,
                                START_ACTION_RESUME_LATEST
                            )
                        }
                    } else if (str.startsWith(APP_STRING_SHARE)) {
                        try {
                            val data = str.substringAfter("$APP_STRING_SHARE:")
                            val parts = data.split("?", limit = 2)
                            loadResult(
                                String(base64DecodeArray(parts[1]), Charsets.UTF_8),
                                String(base64DecodeArray(parts[0]), Charsets.UTF_8),
                                ""
                            )
                            return true
                        } catch (e: Exception) {
                            showToast("Invalid Uri", Toast.LENGTH_SHORT)
                            return false
                        }
                    } else if (!isWebview) {
                        if (str.startsWith(DOWNLOAD_NAVIGATE_TO)) {
                            this.navigate(R.id.navigation_downloads)
                            return true
                        } else {
                            val apiName = extraArgs?.getString(API_NAME_EXTRA_KEY)
                                ?.takeIf { it.isNotBlank() }
                            // if provided, try to match the api name instead of the api url
                            // this is in order to also support providers that use JSON dataUrls
                            // for example
                            if (apiName != null) {
                                loadResult(str, apiName, "")
                                return true
                            }

                            synchronized(apis) {
                                for (api in apis) {
                                    if (str.startsWith(api.mainUrl)) {
                                        loadResult(str, api.name, "")
                                        return true
                                    }
                                }
                            }
                        }
                    }
                }
                return false
            }


        fun centerView(view: View?) {
            if (view == null) return
            try {
                Log.v(TAG, "centerView: $view")
                val r = Rect(0, 0, 0, 0)
                view.getDrawingRect(r)
                val x = r.centerX()
                val y = r.centerY()
                val dx = r.width() / 2 //screenWidth / 2
                val dy = screenHeight / 2
                val r2 = Rect(x - dx, y - dy, x + dx, y + dy)
                view.requestRectangleOnScreen(r2, false)
                // TvFocus.current =TvFocus.current.copy(y=y.toFloat())
            } catch (_: Throwable) {
            }
        }
    }


    var lastPopup: SearchResponse? = null
    fun loadPopup(result: SearchResponse, load: Boolean = true) {
        lastPopup = result
        val syncName = syncViewModel.syncName(result.apiName)

        // based on apiName we decide on if it is a local list or not, this is because
        // we want to show a bit of extra UI to sync apis
        if (result is SyncAPI.LibraryItem && syncName != null) {
            isLocalList = false
            syncViewModel.setSync(syncName, result.syncId)
            syncViewModel.updateMetaAndUser()
        } else {
            isLocalList = true
            syncViewModel.clear()
        }

        if (load) {
            viewModel.load(
                this, result.url, result.apiName, false, if (getApiDubstatusSettings()
                        .contains(DubStatus.Dubbed)
                ) DubStatus.Dubbed else DubStatus.Subbed, null
            )
        } else {
            viewModel.loadSmall(result)
        }
    }

    override fun onColorSelected(dialogId: Int, color: Int) {
        onColorSelectedEvent.invoke(Pair(dialogId, color))
    }

    override fun onDialogDismissed(dialogId: Int) {
        onDialogDismissedEvent.invoke(dialogId)
    }

    override fun onConfigurationChanged(newConfig: Configuration) {
        super.onConfigurationChanged(newConfig)
        updateLocale() // android fucks me by chaining lang when rotating the phone
        updateTheme(this) // Update if system theme

        val navHostFragment =
            supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment
        navHostFragment.navController.currentDestination?.let { updateNavBar(it) }
    }

    private fun updateNavBar(destination: NavDestination) {
        this.hideKeyboard()

        // Fucks up anime info layout since that has its own layout
        binding?.castMiniControllerHolder?.isVisible =
            !listOf(
                R.id.navigation_results_phone,
                R.id.navigation_results_tv,
                R.id.navigation_player
            ).contains(destination.id)

        val isNavVisible = listOf(
            R.id.navigation_home,
            R.id.navigation_search,
            R.id.navigation_library,
            R.id.navigation_downloads,
            R.id.navigation_settings,
            R.id.navigation_download_child,
            R.id.navigation_download_queue,
            R.id.navigation_subtitles,
            R.id.navigation_chrome_subtitles,
            R.id.navigation_settings_player,
            R.id.navigation_settings_updates,
            R.id.navigation_settings_ui,
            R.id.navigation_settings_account,
            R.id.navigation_settings_providers,
            R.id.navigation_settings_general,
            R.id.navigation_settings_extensions,
            R.id.navigation_settings_plugins,
            R.id.navigation_test_providers,
        ).contains(destination.id)


        /*val dontPush = listOf(
            R.id.navigation_home,
            R.id.navigation_search,
            R.id.navigation_results_phone,
            R.id.navigation_results_tv,
            R.id.navigation_player,
            R.id.navigation_quick_search,
        ).contains(destination.id)

        binding?.navHostFragment?.apply {
            val params = layoutParams as ConstraintLayout.LayoutParams
            val push =
                if (!dontPush && isLayout(TV or EMULATOR)) resources.getDimensionPixelSize(R.dimen.navbar_width) else 0

            if (!this.isLtr()) {
                params.setMargins(
                    params.leftMargin,
                    params.topMargin,
                    push,
                    params.bottomMargin
                )
            } else {
                params.setMargins(
                    push,
                    params.topMargin,
                    params.rightMargin,
                    params.bottomMargin
                )
            }

            layoutParams = params
        }*/

        binding?.apply {
            navRailView.isVisible = isNavVisible && isLandscape()
            navView.isVisible = isNavVisible && !isLandscape()
            navHostFragment.apply {
                val marginPx = resources.getDimensionPixelSize(R.dimen.nav_rail_view_width)
                layoutParams = (navHostFragment.layoutParams as ViewGroup.MarginLayoutParams).apply {
                    marginStart = if (isNavVisible && isLandscape() && isLayout(TV or EMULATOR)) marginPx else 0
                }
            }

            /**
             * We need to make sure if we return to a sub-fragment,
             * the correct navigation item is selected so that it does not
             * highlight the wrong one in UI.
             */
            when (destination.id) {
                in listOf(R.id.navigation_downloads, R.id.navigation_download_child, R.id.navigation_download_queue) -> {
                    navRailView.menu.findItem(R.id.navigation_downloads).isChecked = true
                    navView.menu.findItem(R.id.navigation_downloads).isChecked = true
                }

                in listOf(
                    R.id.navigation_settings,
                    R.id.navigation_subtitles,
                    R.id.navigation_chrome_subtitles,
                    R.id.navigation_settings_player,
                    R.id.navigation_settings_updates,
                    R.id.navigation_settings_ui,
                    R.id.navigation_settings_account,
                    R.id.navigation_settings_providers,
                    R.id.navigation_settings_general,
                    R.id.navigation_settings_extensions,
                    R.id.navigation_settings_plugins,
                    R.id.navigation_test_providers
                ) -> {
                    navRailView.menu.findItem(R.id.navigation_settings).isChecked = true
                    navView.menu.findItem(R.id.navigation_settings).isChecked = true
                }
            }
        }
    }

    //private var mCastSession: CastSession? = null
    var mSessionManager: SessionManager? = null
    private val mSessionManagerListener: SessionManagerListener<Session> by lazy { SessionManagerListenerImpl() }

    private inner class SessionManagerListenerImpl : SessionManagerListener<Session> {
        override fun onSessionStarting(session: Session) {
        }

        override fun onSessionStarted(session: Session, sessionId: String) {
            invalidateOptionsMenu()
        }

        override fun onSessionStartFailed(session: Session, i: Int) {
        }

        override fun onSessionEnding(session: Session) {
        }

        override fun onSessionResumed(session: Session, wasSuspended: Boolean) {
            invalidateOptionsMenu()
        }

        override fun onSessionResumeFailed(session: Session, i: Int) {
        }

        override fun onSessionSuspended(session: Session, i: Int) {
        }

        override fun onSessionEnded(session: Session, error: Int) {
        }

        override fun onSessionResuming(session: Session, s: String) {
        }
    }

    override fun onResume() {
        super.onResume()
        afterPluginsLoadedEvent += ::onAllPluginsLoaded
        setActivityInstance(this)
        try {
            if (isCastApiAvailable()) {
                mSessionManager?.addSessionManagerListener(mSessionManagerListener)
            }
        } catch (e: Exception) {
            logError(e)
        }
    }

    override fun onPause() {
        super.onPause()

        // Start any delayed updates
        if (ApkInstaller.delayedInstaller?.startInstallation() == true) {
            Toast.makeText(this, R.string.update_started, Toast.LENGTH_LONG).show()
        }
        try {
            if (isCastApiAvailable()) {
                mSessionManager?.removeSessionManagerListener(mSessionManagerListener)
                //mCastSession = null
            }
        } catch (e: Exception) {
            logError(e)
        }
    }

    override fun dispatchKeyEvent(event: KeyEvent): Boolean =
        CommonActivity.dispatchKeyEvent(this, event) ?: super.dispatchKeyEvent(event)

    override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean =
        CommonActivity.onKeyDown(this, keyCode, event) ?: super.onKeyDown(keyCode, event)


    override fun onUserLeaveHint() {
        super.onUserLeaveHint()
        onUserLeaveHint(this)
    }

    @SuppressLint("ApplySharedPref") // commit since the op needs to be synchronous
    private fun showConfirmExitDialog(settingsManager: SharedPreferences) {
        val confirmBeforeExit = settingsManager.getInt(getString(R.string.confirm_exit_key), -1)

        if (confirmBeforeExit == 1 || (confirmBeforeExit == -1 && isLayout(PHONE))) {
            // finish() causes a bug on some TVs where player
            // may keep playing after closing the app.
            if (isLayout(TV)) exitProcess(0) else finish()
            return
        }

        val dialogView = layoutInflater.inflate(R.layout.confirm_exit_dialog, null)
        val dontShowAgainCheck: CheckBox = dialogView.findViewById(R.id.checkboxDontShowAgain)
        val builder: AlertDialog.Builder = AlertDialog.Builder(this)
        builder.setView(dialogView)
            .setTitle(R.string.confirm_exit_dialog)
            .setNegativeButton(R.string.no) { _, _ -> /*NO-OP*/ }
            .setPositiveButton(R.string.yes) { _, _ ->
                if (dontShowAgainCheck.isChecked) {
                    settingsManager.edit(commit = true) {
                        putInt(getString(R.string.confirm_exit_key), 1)
                    }
                }
                // finish() causes a bug on some TVs where player
                // may keep playing after closing the app.
                if (isLayout(TV)) exitProcess(0) else finish()
            }

        builder.show().setDefaultFocus()
    }

    override fun onDestroy() {
        filesToDelete.forEach { path ->
            val result = File(path).deleteRecursively()
            if (result) {
                Log.d(TAG, "Deleted temporary file: $path")
            } else {
                Log.d(TAG, "Failed 
Download .txt
gitextract_bfixog4j/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── application-bug.yml
│   │   ├── config.yml
│   │   └── feature-request.yml
│   ├── locales.py
│   └── workflows/
│       ├── build_to_archive.yml
│       ├── generate_dokka.yml
│       ├── issue_action.yml
│       ├── prerelease.yml
│       ├── pull_request.yml
│       └── update_locales.yml
├── .gitignore
├── AI-POLICY.md
├── LICENSE
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle.kts
│   ├── lint.xml
│   ├── proguard-rules.pro
│   └── src/
│       ├── androidTest/
│       │   └── java/
│       │       └── com/
│       │           └── lagradost/
│       │               └── cloudstream3/
│       │                   └── ExampleInstrumentedTest.kt
│       ├── debug/
│       │   └── res/
│       │       ├── drawable/
│       │       │   └── ic_banner_foreground.xml
│       │       ├── drawable-anydpi-v24/
│       │       │   └── ic_stat_name.xml
│       │       ├── drawable-v24/
│       │       │   ├── ic_banner_background.xml
│       │       │   └── ic_launcher_foreground.xml
│       │       ├── mipmap-anydpi-v26/
│       │       │   ├── ic_banner.xml
│       │       │   ├── ic_launcher.xml
│       │       │   └── ic_launcher_round.xml
│       │       └── values/
│       │           ├── ic_launcher_background.xml
│       │           └── strings.xml
│       ├── main/
│       │   ├── AndroidManifest.xml
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── lagradost/
│       │   │           └── cloudstream3/
│       │   │               ├── AcraApplication.kt
│       │   │               ├── CloudStreamApp.kt
│       │   │               ├── CommonActivity.kt
│       │   │               ├── DownloaderTestImpl.kt
│       │   │               ├── MainActivity.kt
│       │   │               ├── actions/
│       │   │               │   ├── AlwaysAskAction.kt
│       │   │               │   ├── OpenInAppAction.kt
│       │   │               │   ├── VideoClickAction.kt
│       │   │               │   └── temp/
│       │   │               │       ├── Aria2Package.kt
│       │   │               │       ├── BiglyBTPackage.kt
│       │   │               │       ├── CloudStreamPackage.kt
│       │   │               │       ├── CopyClipboardAction.kt
│       │   │               │       ├── JustPlayerPackage.kt
│       │   │               │       ├── LibreTorrentPackage.kt
│       │   │               │       ├── MpvKtPackage.kt
│       │   │               │       ├── MpvPackage.kt
│       │   │               │       ├── NextPlayerPackage.kt
│       │   │               │       ├── PlayInBrowserAction.kt
│       │   │               │       ├── PlayMirrorAction.kt
│       │   │               │       ├── ViewM3U8Action.kt
│       │   │               │       ├── VlcPackage.kt
│       │   │               │       ├── WebVideoCastPackage.kt
│       │   │               │       └── fcast/
│       │   │               │           ├── FcastAction.kt
│       │   │               │           ├── FcastManager.kt
│       │   │               │           ├── FcastSession.kt
│       │   │               │           └── Packets.kt
│       │   │               ├── mvvm/
│       │   │               │   └── Lifecycle.kt
│       │   │               ├── network/
│       │   │               │   ├── CloudflareKiller.kt
│       │   │               │   ├── DdosGuardKiller.kt
│       │   │               │   ├── DohProviders.kt
│       │   │               │   └── RequestsHelper.kt
│       │   │               ├── plugins/
│       │   │               │   ├── Plugin.kt
│       │   │               │   ├── PluginManager.kt
│       │   │               │   ├── RepositoryManager.kt
│       │   │               │   └── VotingApi.kt
│       │   │               ├── receivers/
│       │   │               │   └── VideoDownloadRestartReceiver.kt
│       │   │               ├── services/
│       │   │               │   ├── BackupWorkManager.kt
│       │   │               │   ├── DownloadQueueService.kt
│       │   │               │   ├── PackageInstallerService.kt
│       │   │               │   ├── SubscriptionWorkManager.kt
│       │   │               │   └── VideoDownloadService.kt
│       │   │               ├── subtitles/
│       │   │               │   ├── AbstractSubProvider.kt
│       │   │               │   └── AbstractSubtitleEntities.kt
│       │   │               ├── syncproviders/
│       │   │               │   ├── AccountManager.kt
│       │   │               │   ├── AuthAPI.kt
│       │   │               │   ├── AuthRepo.kt
│       │   │               │   ├── BackupAPI.kt
│       │   │               │   ├── SubtitleAPI.kt
│       │   │               │   ├── SubtitleRepo.kt
│       │   │               │   ├── SyncAPI.kt
│       │   │               │   ├── SyncRepo.kt
│       │   │               │   └── providers/
│       │   │               │       ├── Addic7ed.kt
│       │   │               │       ├── AniListApi.kt
│       │   │               │       ├── KitsuApi.kt
│       │   │               │       ├── LocalList.kt
│       │   │               │       ├── MALApi.kt
│       │   │               │       ├── OpenSubtitlesApi.kt
│       │   │               │       ├── SimklApi.kt
│       │   │               │       ├── SubSource.kt
│       │   │               │       └── Subdl.kt
│       │   │               ├── ui/
│       │   │               │   ├── APIRepository.kt
│       │   │               │   ├── BaseAdapter.kt
│       │   │               │   ├── BaseFragment.kt
│       │   │               │   ├── ControllerActivity.kt
│       │   │               │   ├── CustomRecyclerViews.kt
│       │   │               │   ├── EasterEggMonkeFragment.kt
│       │   │               │   ├── MiniControllerFragment.kt
│       │   │               │   ├── NonFinalAdapterListUpdateCallback.kt
│       │   │               │   ├── WatchType.kt
│       │   │               │   ├── WebviewFragment.kt
│       │   │               │   ├── account/
│       │   │               │   │   ├── AccountAdapter.kt
│       │   │               │   │   ├── AccountHelper.kt
│       │   │               │   │   ├── AccountSelectActivity.kt
│       │   │               │   │   ├── AccountSelectLinearItemDecoration.kt
│       │   │               │   │   └── AccountViewModel.kt
│       │   │               │   ├── download/
│       │   │               │   │   ├── DownloadAdapter.kt
│       │   │               │   │   ├── DownloadButtonSetup.kt
│       │   │               │   │   ├── DownloadChildFragment.kt
│       │   │               │   │   ├── DownloadFragment.kt
│       │   │               │   │   ├── DownloadViewModel.kt
│       │   │               │   │   ├── button/
│       │   │               │   │   │   ├── BaseFetchButton.kt
│       │   │               │   │   │   ├── DownloadButton.kt
│       │   │               │   │   │   ├── PieFetchButton.kt
│       │   │               │   │   │   └── ProgressBarAnimation.kt
│       │   │               │   │   └── queue/
│       │   │               │   │       ├── DownloadQueueAdapter.kt
│       │   │               │   │       ├── DownloadQueueFragment.kt
│       │   │               │   │       └── DownloadQueueViewModel.kt
│       │   │               │   ├── home/
│       │   │               │   │   ├── HomeChildItemAdapter.kt
│       │   │               │   │   ├── HomeFragment.kt
│       │   │               │   │   ├── HomeParentItemAdapter.kt
│       │   │               │   │   ├── HomeParentItemAdapterPreview.kt
│       │   │               │   │   ├── HomeScrollAdapter.kt
│       │   │               │   │   ├── HomeScrollTransformer.kt
│       │   │               │   │   └── HomeViewModel.kt
│       │   │               │   ├── library/
│       │   │               │   │   ├── LibraryFragment.kt
│       │   │               │   │   ├── LibraryScrollTransformer.kt
│       │   │               │   │   ├── LibraryViewModel.kt
│       │   │               │   │   ├── LoadingPosterAdapter.kt
│       │   │               │   │   ├── PageAdapter.kt
│       │   │               │   │   └── ViewpagerAdapter.kt
│       │   │               │   ├── player/
│       │   │               │   │   ├── AbstractPlayerFragment.kt
│       │   │               │   │   ├── CS3IPlayer.kt
│       │   │               │   │   ├── CustomSubripParser.kt
│       │   │               │   │   ├── CustomSubtitleDecoderFactory.kt
│       │   │               │   │   ├── DownloadFileGenerator.kt
│       │   │               │   │   ├── DownloadedPlayerActivity.kt
│       │   │               │   │   ├── ExtractorLinkGenerator.kt
│       │   │               │   │   ├── FixedNextRenderersFactory.kt
│       │   │               │   │   ├── FullScreenPlayer.kt
│       │   │               │   │   ├── GeneratorPlayer.kt
│       │   │               │   │   ├── IGenerator.kt
│       │   │               │   │   ├── IPlayer.kt
│       │   │               │   │   ├── LinkGenerator.kt
│       │   │               │   │   ├── OfflinePlaybackHelper.kt
│       │   │               │   │   ├── OutlineSpan.kt
│       │   │               │   │   ├── PlayerGeneratorViewModel.kt
│       │   │               │   │   ├── PlayerPipHelper.kt
│       │   │               │   │   ├── PlayerSubtitleHelper.kt
│       │   │               │   │   ├── PreviewGenerator.kt
│       │   │               │   │   ├── RepoLinkGenerator.kt
│       │   │               │   │   ├── RoundedBackgroundColorSpan.kt
│       │   │               │   │   ├── SSLTrustManager.kt
│       │   │               │   │   ├── SubtitleOffsetItemAdapter.kt
│       │   │               │   │   ├── Torrent.kt
│       │   │               │   │   ├── UpdatedDefaultExtractorsFactory.kt
│       │   │               │   │   ├── UpdatedMatroskaExtractor.kt
│       │   │               │   │   └── source_priority/
│       │   │               │   │       ├── PriorityAdapter.kt
│       │   │               │   │       ├── ProfilesAdapter.kt
│       │   │               │   │       ├── QualityDataHelper.kt
│       │   │               │   │       ├── QualityProfileDialog.kt
│       │   │               │   │       └── SourcePriorityDialog.kt
│       │   │               │   ├── quicksearch/
│       │   │               │   │   └── QuickSearchFragment.kt
│       │   │               │   ├── result/
│       │   │               │   │   ├── ActorAdaptor.kt
│       │   │               │   │   ├── EpisodeAdapter.kt
│       │   │               │   │   ├── ImageAdapter.kt
│       │   │               │   │   ├── LinearListLayout.kt
│       │   │               │   │   ├── ResultFragment.kt
│       │   │               │   │   ├── ResultFragmentPhone.kt
│       │   │               │   │   ├── ResultFragmentTv.kt
│       │   │               │   │   ├── ResultTrailerPlayer.kt
│       │   │               │   │   ├── ResultViewModel2.kt
│       │   │               │   │   ├── SelectAdaptor.kt
│       │   │               │   │   └── SyncViewModel.kt
│       │   │               │   ├── search/
│       │   │               │   │   ├── SearchAdaptor.kt
│       │   │               │   │   ├── SearchFragment.kt
│       │   │               │   │   ├── SearchHelper.kt
│       │   │               │   │   ├── SearchHistoryAdaptor.kt
│       │   │               │   │   ├── SearchResultBuilder.kt
│       │   │               │   │   ├── SearchSuggestionAdapter.kt
│       │   │               │   │   ├── SearchSuggestionApi.kt
│       │   │               │   │   ├── SearchViewModel.kt
│       │   │               │   │   └── SyncSearchViewModel.kt
│       │   │               │   ├── settings/
│       │   │               │   │   ├── AccountAdapter.kt
│       │   │               │   │   ├── Globals.kt
│       │   │               │   │   ├── LogcatAdapter.kt
│       │   │               │   │   ├── SettingsAccount.kt
│       │   │               │   │   ├── SettingsFragment.kt
│       │   │               │   │   ├── SettingsGeneral.kt
│       │   │               │   │   ├── SettingsPlayer.kt
│       │   │               │   │   ├── SettingsProviders.kt
│       │   │               │   │   ├── SettingsUI.kt
│       │   │               │   │   ├── SettingsUpdates.kt
│       │   │               │   │   ├── extensions/
│       │   │               │   │   │   ├── ExtensionsFragment.kt
│       │   │               │   │   │   ├── ExtensionsViewModel.kt
│       │   │               │   │   │   ├── PluginAdapter.kt
│       │   │               │   │   │   ├── PluginDetailsFragment.kt
│       │   │               │   │   │   ├── PluginsFragment.kt
│       │   │               │   │   │   ├── PluginsViewModel.kt
│       │   │               │   │   │   └── RepoAdapter.kt
│       │   │               │   │   ├── testing/
│       │   │               │   │   │   ├── TestFragment.kt
│       │   │               │   │   │   ├── TestResultAdapter.kt
│       │   │               │   │   │   ├── TestView.kt
│       │   │               │   │   │   └── TestViewModel.kt
│       │   │               │   │   └── utils/
│       │   │               │   │       └── DirectoryPicker.kt
│       │   │               │   ├── setup/
│       │   │               │   │   ├── SetupFragmentExtensions.kt
│       │   │               │   │   ├── SetupFragmentLanguage.kt
│       │   │               │   │   ├── SetupFragmentLayout.kt
│       │   │               │   │   ├── SetupFragmentMedia.kt
│       │   │               │   │   └── SetupFragmentProviderLanguage.kt
│       │   │               │   └── subtitles/
│       │   │               │       ├── ChromecastSubtitlesFragment.kt
│       │   │               │       └── SubtitlesFragment.kt
│       │   │               ├── utils/
│       │   │               │   ├── AniSkip.kt
│       │   │               │   ├── AppContextUtils.kt
│       │   │               │   ├── BackPressedCallbackHelper.kt
│       │   │               │   ├── BackupUtils.kt
│       │   │               │   ├── BiometricAuthenticator.kt
│       │   │               │   ├── CastHelper.kt
│       │   │               │   ├── CastOptionsProvider.kt
│       │   │               │   ├── ConsistentLiveData.kt
│       │   │               │   ├── DataStore.kt
│       │   │               │   ├── DataStoreHelper.kt
│       │   │               │   ├── DownloadFileWorkManager.kt
│       │   │               │   ├── Event.kt
│       │   │               │   ├── FillerEpisodeCheck.kt
│       │   │               │   ├── IDisposable.kt
│       │   │               │   ├── ImageModuleCoil.kt
│       │   │               │   ├── ImageUtil.kt
│       │   │               │   ├── InAppUpdater.kt
│       │   │               │   ├── IntentHelpers.kt
│       │   │               │   ├── PackageInstaller.kt
│       │   │               │   ├── PercentageCropImageView.kt
│       │   │               │   ├── PowerManagerAPI.kt
│       │   │               │   ├── SingleSelectionHelper.kt
│       │   │               │   ├── SnackbarHelper.kt
│       │   │               │   ├── SubtitleUtils.kt
│       │   │               │   ├── SyncUtil.kt
│       │   │               │   ├── TestingUtils.kt
│       │   │               │   ├── TextUtil.kt
│       │   │               │   ├── TvChannelUtils.kt
│       │   │               │   ├── UIHelper.kt
│       │   │               │   ├── Vector2.kt
│       │   │               │   ├── VideoDownloadHelper.kt
│       │   │               │   └── downloader/
│       │   │               │       ├── DownloadFileManagement.kt
│       │   │               │       ├── DownloadManager.kt
│       │   │               │       ├── DownloadObjects.kt
│       │   │               │       ├── DownloadQueueManager.kt
│       │   │               │       └── DownloadUtils.kt
│       │   │               └── widget/
│       │   │                   ├── CenterZoomLayoutManager.kt
│       │   │                   ├── FlowLayout.kt
│       │   │                   └── LinearRecycleViewLayoutManager.kt
│       │   └── res/
│       │       ├── anim/
│       │       │   ├── enter_anim.xml
│       │       │   ├── exit_anim.xml
│       │       │   ├── go_left.xml
│       │       │   ├── go_right.xml
│       │       │   ├── pop_enter.xml
│       │       │   ├── pop_exit.xml
│       │       │   ├── rotate_around_center_point.xml
│       │       │   ├── rotate_left.xml
│       │       │   └── rotate_right.xml
│       │       ├── color/
│       │       │   ├── black_button_ripple.xml
│       │       │   ├── button_selector_color.xml
│       │       │   ├── check_selection_color.xml
│       │       │   ├── chip_color.xml
│       │       │   ├── chip_color_text.xml
│       │       │   ├── color_primary_transparent.xml
│       │       │   ├── item_select_color.xml
│       │       │   ├── item_select_color_tv.xml
│       │       │   ├── player_button_tv.xml
│       │       │   ├── player_on_button_tv.xml
│       │       │   ├── player_on_button_tv_attr.xml
│       │       │   ├── selectable_black.xml
│       │       │   ├── selectable_white.xml
│       │       │   ├── tag_stroke_color.xml
│       │       │   ├── text_selection_color.xml
│       │       │   ├── toggle_button.xml
│       │       │   ├── toggle_button_outline.xml
│       │       │   ├── toggle_button_text.xml
│       │       │   ├── toggle_selector.xml
│       │       │   ├── white_attr_20.xml
│       │       │   └── white_transparent_toggle.xml
│       │       ├── drawable/
│       │       │   ├── arrow_and_edge_24px.xml
│       │       │   ├── arrow_or_edge_24px.xml
│       │       │   ├── arrows_input_24px.xml
│       │       │   ├── background_shadow.xml
│       │       │   ├── baseline_description_24.xml
│       │       │   ├── baseline_downloading_24.xml
│       │       │   ├── baseline_fullscreen_24.xml
│       │       │   ├── baseline_fullscreen_exit_24.xml
│       │       │   ├── baseline_grid_view_24.xml
│       │       │   ├── baseline_headphones_24.xml
│       │       │   ├── baseline_help_outline_24.xml
│       │       │   ├── baseline_list_alt_24.xml
│       │       │   ├── baseline_network_ping_24.xml
│       │       │   ├── baseline_notifications_none_24.xml
│       │       │   ├── baseline_remove_24.xml
│       │       │   ├── baseline_restore_page_24.xml
│       │       │   ├── baseline_save_as_24.xml
│       │       │   ├── baseline_skip_previous_24.xml
│       │       │   ├── baseline_stop_24.xml
│       │       │   ├── baseline_sync_24.xml
│       │       │   ├── baseline_text_snippet_24.xml
│       │       │   ├── baseline_theaters_24.xml
│       │       │   ├── benene.xml
│       │       │   ├── bg_color_both.xml
│       │       │   ├── bg_color_bottom.xml
│       │       │   ├── bg_color_center.xml
│       │       │   ├── bg_color_top.xml
│       │       │   ├── bg_imdb_badge.xml
│       │       │   ├── bookmark_star_24px.xml
│       │       │   ├── circle_shape.xml
│       │       │   ├── circle_shape_dotted.xml
│       │       │   ├── circular_progress_bar.xml
│       │       │   ├── circular_progress_bar_clockwise.xml
│       │       │   ├── circular_progress_bar_counter_clockwise.xml
│       │       │   ├── circular_progress_bar_filled.xml
│       │       │   ├── circular_progress_bar_small_to_large.xml
│       │       │   ├── circular_progress_bar_top_to_bottom.xml
│       │       │   ├── clear_all_24px.xml
│       │       │   ├── cloud_2.xml
│       │       │   ├── cloud_2_gradient.xml
│       │       │   ├── cloud_2_gradient_beta.xml
│       │       │   ├── cloud_2_gradient_beta_old.xml
│       │       │   ├── cloud_2_gradient_debug.xml
│       │       │   ├── cloud_2_solid.xml
│       │       │   ├── custom_rating_bar.xml
│       │       │   ├── dashed_line_horizontal.xml
│       │       │   ├── default_cover.xml
│       │       │   ├── delete_all.xml
│       │       │   ├── dialog__window_background.xml
│       │       │   ├── download_icon_done.xml
│       │       │   ├── download_icon_error.xml
│       │       │   ├── download_icon_load.xml
│       │       │   ├── download_icon_pause.xml
│       │       │   ├── dub_bg_color.xml
│       │       │   ├── episodes_shadow.xml
│       │       │   ├── go_back_30.xml
│       │       │   ├── go_forward_30.xml
│       │       │   ├── home_alt.xml
│       │       │   ├── home_icon_filled_24.xml
│       │       │   ├── home_icon_outline_24.xml
│       │       │   ├── home_icon_selector.xml
│       │       │   ├── hourglass_24.xml
│       │       │   ├── ic_anilist_icon.xml
│       │       │   ├── ic_banner_foreground.xml
│       │       │   ├── ic_baseline_add_24.xml
│       │       │   ├── ic_baseline_arrow_back_24.xml
│       │       │   ├── ic_baseline_arrow_back_ios_24.xml
│       │       │   ├── ic_baseline_arrow_forward_24.xml
│       │       │   ├── ic_baseline_aspect_ratio_24.xml
│       │       │   ├── ic_baseline_autorenew_24.xml
│       │       │   ├── ic_baseline_bookmark_24.xml
│       │       │   ├── ic_baseline_bookmark_border_24.xml
│       │       │   ├── ic_baseline_brightness_1_24.xml
│       │       │   ├── ic_baseline_brightness_2_24.xml
│       │       │   ├── ic_baseline_brightness_3_24.xml
│       │       │   ├── ic_baseline_brightness_4_24.xml
│       │       │   ├── ic_baseline_brightness_5_24.xml
│       │       │   ├── ic_baseline_brightness_6_24.xml
│       │       │   ├── ic_baseline_brightness_7_24.xml
│       │       │   ├── ic_baseline_check_24.xml
│       │       │   ├── ic_baseline_check_24_listview.xml
│       │       │   ├── ic_baseline_clear_24.xml
│       │       │   ├── ic_baseline_close_24.xml
│       │       │   ├── ic_baseline_collections_bookmark_24.xml
│       │       │   ├── ic_baseline_color_lens_24.xml
│       │       │   ├── ic_baseline_construction_24.xml
│       │       │   ├── ic_baseline_delete_outline_24.xml
│       │       │   ├── ic_baseline_developer_mode_24.xml
│       │       │   ├── ic_baseline_discord_24.xml
│       │       │   ├── ic_baseline_dns_24.xml
│       │       │   ├── ic_baseline_edit_24.xml
│       │       │   ├── ic_baseline_equalizer_24.xml
│       │       │   ├── ic_baseline_exit_24.xml
│       │       │   ├── ic_baseline_extension_24.xml
│       │       │   ├── ic_baseline_fast_forward_24.xml
│       │       │   ├── ic_baseline_favorite_24.xml
│       │       │   ├── ic_baseline_favorite_border_24.xml
│       │       │   ├── ic_baseline_film_roll_24.xml
│       │       │   ├── ic_baseline_filter_list_24.xml
│       │       │   ├── ic_baseline_folder_open_24.xml
│       │       │   ├── ic_baseline_hd_24.xml
│       │       │   ├── ic_baseline_hearing_24.xml
│       │       │   ├── ic_baseline_keyboard_arrow_down_24.xml
│       │       │   ├── ic_baseline_keyboard_arrow_left_24.xml
│       │       │   ├── ic_baseline_keyboard_arrow_right_24.xml
│       │       │   ├── ic_baseline_language_24.xml
│       │       │   ├── ic_baseline_more_vert_24.xml
│       │       │   ├── ic_baseline_north_west_24.xml
│       │       │   ├── ic_baseline_notifications_active_24.xml
│       │       │   ├── ic_baseline_ondemand_video_24.xml
│       │       │   ├── ic_baseline_open_in_new_24.xml
│       │       │   ├── ic_baseline_pause_24.xml
│       │       │   ├── ic_baseline_people_24.xml
│       │       │   ├── ic_baseline_picture_in_picture_alt_24.xml
│       │       │   ├── ic_baseline_play_arrow_24.xml
│       │       │   ├── ic_baseline_playlist_play_24.xml
│       │       │   ├── ic_baseline_public_24.xml
│       │       │   ├── ic_baseline_remove_red_eye_24.xml
│       │       │   ├── ic_baseline_replay_24.xml
│       │       │   ├── ic_baseline_restart_24.xml
│       │       │   ├── ic_baseline_resume_arrow.xml
│       │       │   ├── ic_baseline_resume_arrow2.xml
│       │       │   ├── ic_baseline_skip_next_24.xml
│       │       │   ├── ic_baseline_skip_next_24_big.xml
│       │       │   ├── ic_baseline_skip_next_rounded_24.xml
│       │       │   ├── ic_baseline_sort_24.xml
│       │       │   ├── ic_baseline_speed_24.xml
│       │       │   ├── ic_baseline_star_24.xml
│       │       │   ├── ic_baseline_star_border_24.xml
│       │       │   ├── ic_baseline_storage_24.xml
│       │       │   ├── ic_baseline_subtitles_24.xml
│       │       │   ├── ic_baseline_system_update_24.xml
│       │       │   ├── ic_baseline_text_format_24.xml
│       │       │   ├── ic_baseline_thumb_down_24.xml
│       │       │   ├── ic_baseline_thumb_up_24.xml
│       │       │   ├── ic_baseline_touch_app_24.xml
│       │       │   ├── ic_baseline_tune_24.xml
│       │       │   ├── ic_baseline_tv_24.xml
│       │       │   ├── ic_baseline_visibility_off_24.xml
│       │       │   ├── ic_baseline_volume_down_24.xml
│       │       │   ├── ic_baseline_volume_mute_24.xml
│       │       │   ├── ic_baseline_volume_up_24.xml
│       │       │   ├── ic_baseline_warning_24.xml
│       │       │   ├── ic_battery.xml
│       │       │   ├── ic_cloudstream_monochrome.xml
│       │       │   ├── ic_cloudstream_monochrome_big.xml
│       │       │   ├── ic_cloudstreamlogotv.xml
│       │       │   ├── ic_cloudstreamlogotv_2.xml
│       │       │   ├── ic_cloudstreamlogotv_pre.xml
│       │       │   ├── ic_cloudstreamlogotv_pre_2.xml
│       │       │   ├── ic_dashboard_black_24dp.xml
│       │       │   ├── ic_filled_notifications_24dp.xml
│       │       │   ├── ic_fingerprint.xml
│       │       │   ├── ic_github_logo.xml
│       │       │   ├── ic_home_black_24dp.xml
│       │       │   ├── ic_launcher_background.xml
│       │       │   ├── ic_launcher_foreground.xml
│       │       │   ├── ic_mic.xml
│       │       │   ├── ic_network_stream.xml
│       │       │   ├── ic_notifications_black_24dp.xml
│       │       │   ├── ic_offline_pin_24.xml
│       │       │   ├── ic_outline_account_circle_24.xml
│       │       │   ├── ic_outline_home_24.xml
│       │       │   ├── ic_outline_info_24.xml
│       │       │   ├── ic_outline_notifications_24dp.xml
│       │       │   ├── ic_outline_remove_red_eye_24.xml
│       │       │   ├── ic_outline_settings_24.xml
│       │       │   ├── ic_outline_share_24.xml
│       │       │   ├── ic_outline_subtitles_24.xml
│       │       │   ├── ic_outline_voice_over_off_24.xml
│       │       │   ├── ic_refresh.xml
│       │       │   ├── indicator_background.xml
│       │       │   ├── kid_star_24px.xml
│       │       │   ├── kitsu_icon.xml
│       │       │   ├── library_icon.xml
│       │       │   ├── library_icon_filled.xml
│       │       │   ├── library_icon_selector.xml
│       │       │   ├── mal_logo.xml
│       │       │   ├── material_outline_background.xml
│       │       │   ├── monke_benene.xml
│       │       │   ├── monke_burrito.xml
│       │       │   ├── monke_coco.xml
│       │       │   ├── monke_cookie.xml
│       │       │   ├── monke_drink.xml
│       │       │   ├── monke_flusdered.xml
│       │       │   ├── monke_funny.xml
│       │       │   ├── monke_like.xml
│       │       │   ├── monke_party.xml
│       │       │   ├── monke_sob.xml
│       │       │   ├── netflix_download.xml
│       │       │   ├── netflix_download_batch.xml
│       │       │   ├── netflix_pause.xml
│       │       │   ├── netflix_play.xml
│       │       │   ├── netflix_skip_back.xml
│       │       │   ├── netflix_skip_forward.xml
│       │       │   ├── notifications_icon_selector.xml
│       │       │   ├── open_subtitles_icon.xml
│       │       │   ├── outline.xml
│       │       │   ├── outline_big_15_gray.xml
│       │       │   ├── outline_big_20.xml
│       │       │   ├── outline_big_20_gray.xml
│       │       │   ├── outline_big_25_gray.xml
│       │       │   ├── outline_big_35_gray.xml
│       │       │   ├── outline_bookmark_add_24.xml
│       │       │   ├── outline_card.xml
│       │       │   ├── outline_drawable.xml
│       │       │   ├── outline_drawable_forced.xml
│       │       │   ├── outline_drawable_forced_round.xml
│       │       │   ├── outline_drawable_less.xml
│       │       │   ├── outline_drawable_less_inset.xml
│       │       │   ├── outline_drawable_round_20.xml
│       │       │   ├── outline_less.xml
│       │       │   ├── pause_to_play.xml
│       │       │   ├── pin_ic.xml
│       │       │   ├── play_button.xml
│       │       │   ├── play_button_transparent.xml
│       │       │   ├── play_to_pause.xml
│       │       │   ├── player_button_tv.xml
│       │       │   ├── player_button_tv_attr.xml
│       │       │   ├── player_button_tv_attr_no_bg.xml
│       │       │   ├── player_gradient_tv.xml
│       │       │   ├── preview_seekbar_24.xml
│       │       │   ├── progress_drawable_vertical.xml
│       │       │   ├── question_mark_24.xml
│       │       │   ├── quick_novel_icon.xml
│       │       │   ├── rating_bg_color.xml
│       │       │   ├── rating_empty.xml
│       │       │   ├── rating_fill.xml
│       │       │   ├── rddone.xml
│       │       │   ├── rderror.xml
│       │       │   ├── rdload.xml
│       │       │   ├── rdpause.xml
│       │       │   ├── round_keyboard_arrow_up_24.xml
│       │       │   ├── rounded_dialog.xml
│       │       │   ├── rounded_outline.xml
│       │       │   ├── rounded_progress.xml
│       │       │   ├── rounded_select_ripple.xml
│       │       │   ├── screen_rotation.xml
│       │       │   ├── search_background.xml
│       │       │   ├── search_icon.xml
│       │       │   ├── settings_alt.xml
│       │       │   ├── settings_icon_filled.xml
│       │       │   ├── settings_icon_outline.xml
│       │       │   ├── settings_icon_selector.xml
│       │       │   ├── simkl_logo.xml
│       │       │   ├── solid_primary.xml
│       │       │   ├── speedup.xml
│       │       │   ├── splash_background.xml
│       │       │   ├── storage_bar_left.xml
│       │       │   ├── storage_bar_left_box.xml
│       │       │   ├── storage_bar_mid.xml
│       │       │   ├── storage_bar_mid_box.xml
│       │       │   ├── storage_bar_right.xml
│       │       │   ├── storage_bar_right_box.xml
│       │       │   ├── sub_bg_color.xml
│       │       │   ├── subdl_logo_big.xml
│       │       │   ├── subtitles_background_gradient.xml
│       │       │   ├── sun_1.xml
│       │       │   ├── sun_2.xml
│       │       │   ├── sun_3.xml
│       │       │   ├── sun_4.xml
│       │       │   ├── sun_5.xml
│       │       │   ├── sun_6.xml
│       │       │   ├── sun_7.xml
│       │       │   ├── sun_7_24.xml
│       │       │   ├── tab_selector.xml
│       │       │   ├── title_24px.xml
│       │       │   ├── title_shadow.xml
│       │       │   ├── type_bg_color.xml
│       │       │   ├── video_bottom_button.xml
│       │       │   ├── video_frame.xml
│       │       │   ├── video_locked.xml
│       │       │   ├── video_outline.xml
│       │       │   ├── video_pause.xml
│       │       │   ├── video_play.xml
│       │       │   ├── video_tap_button.xml
│       │       │   ├── video_tap_button_always_white.xml
│       │       │   ├── video_tap_button_skip.xml
│       │       │   └── video_unlocked.xml
│       │       ├── drawable-v24/
│       │       │   ├── ic_banner_background.xml
│       │       │   ├── ic_banner_foreground.xml
│       │       │   └── ic_launcher_foreground.xml
│       │       ├── font/
│       │       │   └── google_sans.xml
│       │       ├── layout/
│       │       │   ├── account_edit_dialog.xml
│       │       │   ├── account_list_item.xml
│       │       │   ├── account_list_item_add.xml
│       │       │   ├── account_list_item_edit.xml
│       │       │   ├── account_managment.xml
│       │       │   ├── account_select_linear.xml
│       │       │   ├── account_single.xml
│       │       │   ├── account_switch.xml
│       │       │   ├── activity_account_select.xml
│       │       │   ├── activity_main.xml
│       │       │   ├── activity_main_tv.xml
│       │       │   ├── add_account_input.xml
│       │       │   ├── add_remove_sites.xml
│       │       │   ├── add_repo_input.xml
│       │       │   ├── add_site_input.xml
│       │       │   ├── bottom_input_dialog.xml
│       │       │   ├── bottom_loading.xml
│       │       │   ├── bottom_resultview_preview.xml
│       │       │   ├── bottom_resultview_preview_tv.xml
│       │       │   ├── bottom_selection_dialog.xml
│       │       │   ├── bottom_selection_dialog_direct.xml
│       │       │   ├── bottom_text_dialog.xml
│       │       │   ├── cast_item.xml
│       │       │   ├── chromecast_subtitle_settings.xml
│       │       │   ├── confirm_exit_dialog.xml
│       │       │   ├── custom_preference_category_material.xml
│       │       │   ├── custom_preference_material.xml
│       │       │   ├── custom_preference_widget_seekbar.xml
│       │       │   ├── device_auth.xml
│       │       │   ├── dialog_loading.xml
│       │       │   ├── dialog_online_subtitles.xml
│       │       │   ├── download_button.xml
│       │       │   ├── download_button_layout.xml
│       │       │   ├── download_button_view.xml
│       │       │   ├── download_child_episode.xml
│       │       │   ├── download_header_episode.xml
│       │       │   ├── download_queue_item.xml
│       │       │   ├── empty_layout.xml
│       │       │   ├── extra_brightness_overlay.xml
│       │       │   ├── fragment_child_downloads.xml
│       │       │   ├── fragment_download_queue.xml
│       │       │   ├── fragment_downloads.xml
│       │       │   ├── fragment_easter_egg_monke.xml
│       │       │   ├── fragment_extensions.xml
│       │       │   ├── fragment_home.xml
│       │       │   ├── fragment_home_head.xml
│       │       │   ├── fragment_home_head_tv.xml
│       │       │   ├── fragment_home_tv.xml
│       │       │   ├── fragment_library.xml
│       │       │   ├── fragment_library_tv.xml
│       │       │   ├── fragment_player.xml
│       │       │   ├── fragment_player_tv.xml
│       │       │   ├── fragment_plugin_details.xml
│       │       │   ├── fragment_plugins.xml
│       │       │   ├── fragment_result.xml
│       │       │   ├── fragment_result_swipe.xml
│       │       │   ├── fragment_result_tv.xml
│       │       │   ├── fragment_search.xml
│       │       │   ├── fragment_search_tv.xml
│       │       │   ├── fragment_setup_extensions.xml
│       │       │   ├── fragment_setup_language.xml
│       │       │   ├── fragment_setup_layout.xml
│       │       │   ├── fragment_setup_media.xml
│       │       │   ├── fragment_setup_provider_languages.xml
│       │       │   ├── fragment_testing.xml
│       │       │   ├── fragment_trailer.xml
│       │       │   ├── fragment_webview.xml
│       │       │   ├── home_episodes_expanded.xml
│       │       │   ├── home_remove_grid.xml
│       │       │   ├── home_remove_grid_expanded.xml
│       │       │   ├── home_result_big_grid.xml
│       │       │   ├── home_result_grid.xml
│       │       │   ├── home_result_grid_expanded.xml
│       │       │   ├── home_scroll_view.xml
│       │       │   ├── home_scroll_view_tv.xml
│       │       │   ├── home_select_mainpage.xml
│       │       │   ├── homepage_parent.xml
│       │       │   ├── homepage_parent_emulator.xml
│       │       │   ├── homepage_parent_tv.xml
│       │       │   ├── item_logcat.xml
│       │       │   ├── library_viewpager_page.xml
│       │       │   ├── loading_downloads.xml
│       │       │   ├── loading_episode.xml
│       │       │   ├── loading_line.xml
│       │       │   ├── loading_line_short.xml
│       │       │   ├── loading_line_short_center.xml
│       │       │   ├── loading_list.xml
│       │       │   ├── loading_poster.xml
│       │       │   ├── loading_poster_dynamic.xml
│       │       │   ├── lock_pin_dialog.xml
│       │       │   ├── logcat.xml
│       │       │   ├── main_settings.xml
│       │       │   ├── options_popup_tv.xml
│       │       │   ├── player_custom_layout.xml
│       │       │   ├── player_custom_layout_tv.xml
│       │       │   ├── player_prioritize_item.xml
│       │       │   ├── player_quality_profile_dialog.xml
│       │       │   ├── player_quality_profile_item.xml
│       │       │   ├── player_select_source_and_subs.xml
│       │       │   ├── player_select_source_priority.xml
│       │       │   ├── player_select_tracks.xml
│       │       │   ├── provider_list.xml
│       │       │   ├── provider_test_item.xml
│       │       │   ├── quick_search.xml
│       │       │   ├── rail_footer.xml
│       │       │   ├── rail_header.xml
│       │       │   ├── repository_item.xml
│       │       │   ├── repository_item_tv.xml
│       │       │   ├── result_episode.xml
│       │       │   ├── result_episode_large.xml
│       │       │   ├── result_mini_image.xml
│       │       │   ├── result_poster.xml
│       │       │   ├── result_recommendations.xml
│       │       │   ├── result_selection.xml
│       │       │   ├── result_sync.xml
│       │       │   ├── result_tag.xml
│       │       │   ├── search_history_footer.xml
│       │       │   ├── search_history_item.xml
│       │       │   ├── search_result_compact.xml
│       │       │   ├── search_result_grid.xml
│       │       │   ├── search_result_grid_expanded.xml
│       │       │   ├── search_result_super_compact.xml
│       │       │   ├── search_suggestion_footer.xml
│       │       │   ├── search_suggestion_item.xml
│       │       │   ├── settings_title_top.xml
│       │       │   ├── sort_bottom_footer_add_choice.xml
│       │       │   ├── sort_bottom_sheet.xml
│       │       │   ├── sort_bottom_single_choice.xml
│       │       │   ├── sort_bottom_single_choice_color.xml
│       │       │   ├── sort_bottom_single_choice_double_text.xml
│       │       │   ├── sort_bottom_single_choice_no_checkmark.xml
│       │       │   ├── sort_bottom_single_provider_choice.xml
│       │       │   ├── speed_dialog.xml
│       │       │   ├── standard_toolbar.xml
│       │       │   ├── stream_input.xml
│       │       │   ├── subtitle_offset.xml
│       │       │   ├── subtitle_offset_item.xml
│       │       │   ├── subtitle_settings.xml
│       │       │   ├── subtitle_settings_dialog.xml
│       │       │   ├── toast.xml
│       │       │   ├── trailer_custom_layout.xml
│       │       │   ├── tvtypes_chips.xml
│       │       │   ├── tvtypes_chips_scroll.xml
│       │       │   └── view_test.xml
│       │       ├── layout-port/
│       │       │   ├── player_select_source_and_subs.xml
│       │       │   ├── player_select_source_priority.xml
│       │       │   └── subtitle_offset.xml
│       │       ├── menu/
│       │       │   ├── bottom_nav_menu.xml
│       │       │   ├── cast_expanded_controller_menu.xml
│       │       │   ├── download_queue.xml
│       │       │   ├── library_menu.xml
│       │       │   └── repository.xml
│       │       ├── mipmap-anydpi-v26/
│       │       │   ├── ic_banner.xml
│       │       │   ├── ic_launcher.xml
│       │       │   └── ic_launcher_round.xml
│       │       ├── navigation/
│       │       │   └── mobile_navigation.xml
│       │       ├── values/
│       │       │   ├── array.xml
│       │       │   ├── attrs.xml
│       │       │   ├── colors.xml
│       │       │   ├── dimens.xml
│       │       │   ├── donottranslate-strings.xml
│       │       │   ├── ic_launcher_background.xml
│       │       │   ├── strings.xml
│       │       │   └── styles.xml
│       │       ├── values-arz/
│       │       │   └── strings.xml
│       │       ├── values-b+af/
│       │       │   └── strings.xml
│       │       ├── values-b+am/
│       │       │   └── strings.xml
│       │       ├── values-b+apc/
│       │       │   └── strings.xml
│       │       ├── values-b+ar/
│       │       │   └── strings.xml
│       │       ├── values-b+ars/
│       │       │   └── strings.xml
│       │       ├── values-b+as/
│       │       │   └── strings.xml
│       │       ├── values-b+az/
│       │       │   └── strings.xml
│       │       ├── values-b+bg/
│       │       │   └── strings.xml
│       │       ├── values-b+bn/
│       │       │   └── strings.xml
│       │       ├── values-b+ckb/
│       │       │   └── strings.xml
│       │       ├── values-b+cs/
│       │       │   └── strings.xml
│       │       ├── values-b+de/
│       │       │   └── strings.xml
│       │       ├── values-b+el/
│       │       │   └── strings.xml
│       │       ├── values-b+eo/
│       │       │   └── strings.xml
│       │       ├── values-b+es/
│       │       │   ├── array.xml
│       │       │   └── strings.xml
│       │       ├── values-b+fa/
│       │       │   └── strings.xml
│       │       ├── values-b+fil/
│       │       │   └── strings.xml
│       │       ├── values-b+fr/
│       │       │   └── strings.xml
│       │       ├── values-b+gl/
│       │       │   └── strings.xml
│       │       ├── values-b+hi/
│       │       │   └── strings.xml
│       │       ├── values-b+hr/
│       │       │   └── strings.xml
│       │       ├── values-b+hu/
│       │       │   └── strings.xml
│       │       ├── values-b+in/
│       │       │   └── strings.xml
│       │       ├── values-b+it/
│       │       │   └── strings.xml
│       │       ├── values-b+iw/
│       │       │   └── strings.xml
│       │       ├── values-b+ja/
│       │       │   └── strings.xml
│       │       ├── values-b+kn/
│       │       │   └── strings.xml
│       │       ├── values-b+ko/
│       │       │   └── strings.xml
│       │       ├── values-b+lt/
│       │       │   └── strings.xml
│       │       ├── values-b+lv/
│       │       │   └── strings.xml
│       │       ├── values-b+mk/
│       │       │   └── strings.xml
│       │       ├── values-b+ml/
│       │       │   └── strings.xml
│       │       ├── values-b+ms/
│       │       │   └── strings.xml
│       │       ├── values-b+mt/
│       │       │   └── strings.xml
│       │       ├── values-b+my/
│       │       │   └── strings.xml
│       │       ├── values-b+ne/
│       │       │   └── strings.xml
│       │       ├── values-b+nl/
│       │       │   └── strings.xml
│       │       ├── values-b+nn/
│       │       │   └── strings.xml
│       │       ├── values-b+no/
│       │       │   └── strings.xml
│       │       ├── values-b+or/
│       │       │   └── strings.xml
│       │       ├── values-b+pl/
│       │       │   ├── array.xml
│       │       │   └── strings.xml
│       │       ├── values-b+pt/
│       │       │   └── strings.xml
│       │       ├── values-b+pt+BR/
│       │       │   └── strings.xml
│       │       ├── values-b+qt/
│       │       │   └── strings.xml
│       │       ├── values-b+ro/
│       │       │   └── strings.xml
│       │       ├── values-b+ru/
│       │       │   └── strings.xml
│       │       ├── values-b+sk/
│       │       │   └── strings.xml
│       │       ├── values-b+so/
│       │       │   └── strings.xml
│       │       ├── values-b+sv/
│       │       │   └── strings.xml
│       │       ├── values-b+ta/
│       │       │   └── strings.xml
│       │       ├── values-b+ti/
│       │       │   └── strings.xml
│       │       ├── values-b+tl/
│       │       │   └── strings.xml
│       │       ├── values-b+tr/
│       │       │   ├── array.xml
│       │       │   └── strings.xml
│       │       ├── values-b+uk/
│       │       │   └── strings.xml
│       │       ├── values-b+ur/
│       │       │   └── strings.xml
│       │       ├── values-b+vi/
│       │       │   ├── array.xml
│       │       │   └── strings.xml
│       │       ├── values-b+zh/
│       │       │   └── strings.xml
│       │       ├── values-b+zh+TW/
│       │       │   └── strings.xml
│       │       ├── values-be/
│       │       │   └── strings.xml
│       │       ├── values-ca/
│       │       │   └── strings.xml
│       │       └── xml/
│       │           ├── backup_descriptor.xml
│       │           ├── data_extraction_rules.xml
│       │           ├── provider_paths.xml
│       │           ├── settings_account.xml
│       │           ├── settings_general.xml
│       │           ├── settings_player.xml
│       │           ├── settings_providers.xml
│       │           ├── settings_ui.xml
│       │           └── settings_updates.xml
│       ├── prerelease/
│       │   └── res/
│       │       ├── drawable/
│       │       │   └── ic_banner_foreground.xml
│       │       ├── drawable-v24/
│       │       │   ├── ic_banner_background.xml
│       │       │   └── ic_launcher_foreground.xml
│       │       ├── mipmap-anydpi-v26/
│       │       │   ├── ic_banner.xml
│       │       │   ├── ic_launcher.xml
│       │       │   └── ic_launcher_round.xml
│       │       └── values/
│       │           ├── ic_launcher_background.xml
│       │           └── strings.xml
│       └── test/
│           └── java/
│               └── com/
│                   └── lagradost/
│                       └── cloudstream3/
│                           ├── ProviderTests.kt
│                           └── SubtitleSelectionTest.kt
├── build.gradle.kts
├── discoverium.yml
├── docs/
│   ├── .gitignore
│   └── build.gradle.kts
├── fastlane/
│   └── metadata/
│       └── android/
│           ├── af/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── am/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── apc/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ar/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ar-SA/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── as/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── be/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── bg/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ca/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ckb/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── cs-CZ/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── de-DE/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── el-GR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── en-US/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── es-AR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── es-ES/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── fa-IR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── fr-FR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── hi-IN/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── hr/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── hu-HU/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── id/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── it-IT/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ja-JP/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ko-KR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── lt/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── lv/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── mk-MK/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ml-IN/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── mt/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── nl-NL/
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── no-NO/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── or/
│           │   └── changelogs/
│           │       └── 2.txt
│           ├── pa/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── pl-PL/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── pt/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── pt-BR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ro/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ru-RU/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── sk/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── sv-SE/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ta-IN/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── tr-TR/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── uk/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── ur/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── vi/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           ├── zh-CN/
│           │   ├── changelogs/
│           │   │   └── 2.txt
│           │   ├── full_description.txt
│           │   ├── short_description.txt
│           │   └── title.txt
│           └── zh-TW/
│               ├── changelogs/
│               │   └── 2.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
├── jitpack.yml
├── library/
│   ├── .gitignore
│   ├── build.gradle.kts
│   ├── lint.xml
│   └── src/
│       ├── androidMain/
│       │   ├── AndroidManifest.xml
│       │   └── kotlin/
│       │       └── com/
│       │           └── lagradost/
│       │               ├── api/
│       │               │   ├── ContextHelper.android.kt
│       │               │   └── Log.kt
│       │               └── cloudstream3/
│       │                   ├── network/
│       │                   │   └── WebViewResolver.android.kt
│       │                   └── utils/
│       │                       └── Coroutines.android.kt
│       ├── commonMain/
│       │   └── kotlin/
│       │       └── com/
│       │           └── lagradost/
│       │               ├── api/
│       │               │   ├── ContextHelper.kt
│       │               │   └── Log.kt
│       │               └── cloudstream3/
│       │                   ├── MainAPI.kt
│       │                   ├── MainActivity.kt
│       │                   ├── ParCollections.kt
│       │                   ├── extractors/
│       │                   │   ├── Acefile.kt
│       │                   │   ├── Bigwarp.kt
│       │                   │   ├── Blogger.kt
│       │                   │   ├── ByseSX.kt
│       │                   │   ├── Cda.kt
│       │                   │   ├── CineMMRedirect.kt
│       │                   │   ├── CloudMailRuExtractor.kt
│       │                   │   ├── ContentXExtractor.kt
│       │                   │   ├── Dailymotion.kt
│       │                   │   ├── DoodExtractor.kt
│       │                   │   ├── Embedgram.kt
│       │                   │   ├── EmturbovidExtractor.kt
│       │                   │   ├── Evolaod.kt
│       │                   │   ├── Fastream.kt
│       │                   │   ├── Filemoon.kt
│       │                   │   ├── Filesim.kt
│       │                   │   ├── GDMirrorbot.kt
│       │                   │   ├── GUpload.kt
│       │                   │   ├── GamoVideo.kt
│       │                   │   ├── Gdriveplayer.kt
│       │                   │   ├── GenericM3U8.kt
│       │                   │   ├── Gofile.kt
│       │                   │   ├── GoodstreamExtractor.kt
│       │                   │   ├── HDMomPlayerExtractor.kt
│       │                   │   ├── HDPlayerSystemExtractor.kt
│       │                   │   ├── HDStreamAbleExtractor.kt
│       │                   │   ├── HotlingerExtractor.kt
│       │                   │   ├── HubCloud.kt
│       │                   │   ├── Hxfile.kt
│       │                   │   ├── InternetArchive.kt
│       │                   │   ├── JWPlayer.kt
│       │                   │   ├── Jeniusplay.kt
│       │                   │   ├── Krakenfiles.kt
│       │                   │   ├── Linkbox.kt
│       │                   │   ├── LuluStream.kt
│       │                   │   ├── M3u8Manifest.kt
│       │                   │   ├── MailRuExtractor.kt
│       │                   │   ├── Maxstream.kt
│       │                   │   ├── Mediafire.kt
│       │                   │   ├── Minoplres.kt
│       │                   │   ├── MixDrop.kt
│       │                   │   ├── Moviehab.kt
│       │                   │   ├── Mp4Upload.kt
│       │                   │   ├── MultiQuality.kt
│       │                   │   ├── Mvidoo.kt
│       │                   │   ├── OdnoklassnikiExtractor.kt
│       │                   │   ├── OkRuExtractor.kt
│       │                   │   ├── PeaceMakerstExtractor.kt
│       │                   │   ├── Pelisplus.kt
│       │                   │   ├── PixelDrainExtractor.kt
│       │                   │   ├── PlayLtXyz.kt
│       │                   │   ├── PlayerVoxzer.kt
│       │                   │   ├── Rabbitstream.kt
│       │                   │   ├── RapidVidExtractor.kt
│       │                   │   ├── SBPlay.kt
│       │                   │   ├── SecvideoOnline.kt
│       │                   │   ├── Sendvid.kt
│       │                   │   ├── SibNetExtractor.kt
│       │                   │   ├── SobreatsesuypExtractor.kt
│       │                   │   ├── StreamEmbed.kt
│       │                   │   ├── StreamSB.kt
│       │                   │   ├── StreamSilk.kt
│       │                   │   ├── StreamTape.kt
│       │                   │   ├── StreamWishExtractor.kt
│       │                   │   ├── Streamhub.kt
│       │                   │   ├── Streamlare.kt
│       │                   │   ├── StreamoUpload.kt
│       │                   │   ├── Streamplay.kt
│       │                   │   ├── Streamup.kt
│       │                   │   ├── Supervideo.kt
│       │                   │   ├── TRsTXExtractor.kt
│       │                   │   ├── Tantifilm.kt
│       │                   │   ├── TauVideoExtractor.kt
│       │                   │   ├── Up4Stream.kt
│       │                   │   ├── UpstreamExtractor.kt
│       │                   │   ├── Uqload.kt
│       │                   │   ├── Userload.kt
│       │                   │   ├── Userscloud.kt
│       │                   │   ├── Uservideo.kt
│       │                   │   ├── Vicloud.kt
│       │                   │   ├── VidHidePro.kt
│       │                   │   ├── VidMoxyExtractor.kt
│       │                   │   ├── VidNest.kt
│       │                   │   ├── VidStack.kt
│       │                   │   ├── Videa.kt
│       │                   │   ├── VideoSeyredExtractor.kt
│       │                   │   ├── VidhideExtractor.kt
│       │                   │   ├── Vidmoly.kt
│       │                   │   ├── Vido.kt
│       │                   │   ├── Vidoza.kt
│       │                   │   ├── Vidsonic.kt
│       │                   │   ├── Vidstream.kt
│       │                   │   ├── Vinovo.kt
│       │                   │   ├── VkExtractor.kt
│       │                   │   ├── Voe.kt
│       │                   │   ├── Vtbe.kt
│       │                   │   ├── WatchSB.kt
│       │                   │   ├── Wibufile.kt
│       │                   │   ├── XStreamCdn.kt
│       │                   │   ├── YourUpload.kt
│       │                   │   ├── YoutubeExtractor.kt
│       │                   │   ├── Zplayer.kt
│       │                   │   └── helper/
│       │                   │       ├── AesHelper.kt
│       │                   │       ├── AsianEmbedHelper.kt
│       │                   │       ├── CryptoJSHelper.kt
│       │                   │       ├── GogoHelper.kt
│       │                   │       ├── NineAnimeHelper.kt
│       │                   │       ├── VstreamhubHelper.kt
│       │                   │       └── WcoHelper.kt
│       │                   ├── metaproviders/
│       │                   │   ├── CrossTmdbProvider.kt
│       │                   │   ├── MyDramaList.kt
│       │                   │   ├── SyncRedirector.kt
│       │                   │   ├── TmdbProvider.kt
│       │                   │   └── TraktProvider.kt
│       │                   ├── mvvm/
│       │                   │   └── ArchComponentExt.kt
│       │                   ├── network/
│       │                   │   └── WebViewResolver.kt
│       │                   ├── plugins/
│       │                   │   ├── BasePlugin.kt
│       │                   │   └── CloudstreamPlugin.kt
│       │                   ├── syncproviders/
│       │                   │   └── SyncAPI.kt
│       │                   └── utils/
│       │                       ├── AppDebug.kt
│       │                       ├── AppUtils.kt
│       │                       ├── Coroutines.kt
│       │                       ├── ExtractorApi.kt
│       │                       ├── HlsPlaylistParser.kt
│       │                       ├── JsHunter.kt
│       │                       ├── JsUnpacker.kt
│       │                       ├── M3u8Helper.kt
│       │                       ├── StringUtils.kt
│       │                       ├── SubtitleHelper.kt
│       │                       └── UnshortenUrl.kt
│       └── jvmMain/
│           └── kotlin/
│               └── com/
│                   └── lagradost/
│                       ├── api/
│                       │   ├── ContextHelper.jvm.kt
│                       │   └── Log.kt
│                       └── cloudstream3/
│                           ├── network/
│                           │   └── WebViewResolver.jvm.kt
│                           └── utils/
│                               └── Coroutines.jvm.kt
└── settings.gradle.kts
Condensed preview — 1156 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,297K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/application-bug.yml",
    "chars": 2636,
    "preview": "name: 🐞 Application Issue Report\ndescription: Report a issue in CloudStream\nlabels: [bug]\nbody:\n\n  - type: textarea\n    "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 517,
    "preview": "blank_issues_enabled: false\ncontact_links:\n  - name: Request a new provider or report bug with an existing provider\n    "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature-request.yml",
    "chars": 974,
    "preview": "name: ⭐ Feature request\ndescription: Suggest a feature to improve the app\nlabels: [enhancement]\nbody:\n\n  - type: textare"
  },
  {
    "path": ".github/locales.py",
    "chars": 2253,
    "preview": "import re\nimport glob\nimport requests\nimport lxml.etree as ET  # builtin library doesn't preserve comments\n\n\nSETTINGS_PA"
  },
  {
    "path": ".github/workflows/build_to_archive.yml",
    "chars": 2920,
    "preview": "name: Archive build\n\non:\n  push:\n    branches: [ master ]\n    paths-ignore:\n      - '*.md'\n      - '*.json'\n      - '**/"
  },
  {
    "path": ".github/workflows/generate_dokka.yml",
    "chars": 1989,
    "preview": "name: Dokka\n\non:\n  push:\n    branches: [ master ]\n    paths-ignore:\n      - '*.md'\n\nconcurrency:\n  group: \"dokka\"\n  canc"
  },
  {
    "path": ".github/workflows/issue_action.yml",
    "chars": 3506,
    "preview": "name: Issue automatic actions\n\non:\n  issues:\n    types: [opened]\n\njobs:\n  issue-moderator:\n    runs-on: ubuntu-latest\n  "
  },
  {
    "path": ".github/workflows/prerelease.yml",
    "chars": 2456,
    "preview": "name: Pre-release\n\non:\n  push:\n    branches: [ master ]\n    paths-ignore:\n      - '*.md'\n      - '*.json'\n      - '**/wc"
  },
  {
    "path": ".github/workflows/pull_request.yml",
    "chars": 760,
    "preview": "name: Artifact Build\n\non: [pull_request]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/check"
  },
  {
    "path": ".github/workflows/update_locales.yml",
    "chars": 1083,
    "preview": "name: Fix locale issues\n\non:\n  push:\n    branches: [ master ]\n    paths:\n      - '**.xml'\n  workflow_dispatch:\n\nconcurre"
  },
  {
    "path": ".gitignore",
    "chars": 3708,
    "preview": "/local.properties\n/.idea/caches\n/.idea/misc.xml\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEdito"
  },
  {
    "path": "AI-POLICY.md",
    "chars": 561,
    "preview": "# AI Policy\r\n\r\nAI is a great tool. However, we want you to follow these rules regarding usage of AI in order to ensure t"
  },
  {
    "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": 4798,
    "preview": "# CloudStream\n\n**⚠️ Warning: By default, this app doesn't provide any video sources; you have to install extensions to a"
  },
  {
    "path": "app/.gitignore",
    "chars": 6,
    "preview": "/build"
  },
  {
    "path": "app/build.gradle.kts",
    "chars": 9547,
    "preview": "import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties\nimport org.jetbrains.dokka.gradle.engine.pa"
  },
  {
    "path": "app/lint.xml",
    "chars": 364,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<lint>\n    <!-- ByteOrderMark has errors in values-b+ja/strings.xml, but it's han"
  },
  {
    "path": "app/proguard-rules.pro",
    "chars": 754,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "app/src/androidTest/java/com/lagradost/cloudstream3/ExampleInstrumentedTest.kt",
    "chars": 9108,
    "preview": "package com.lagradost.cloudstream3\n\nimport android.app.Activity\nimport android.os.Bundle\nimport android.os.PersistableBu"
  },
  {
    "path": "app/src/debug/res/drawable/ic_banner_foreground.xml",
    "chars": 10135,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:wi"
  },
  {
    "path": "app/src/debug/res/drawable-anydpi-v24/ic_stat_name.xml",
    "chars": 2916,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n  "
  },
  {
    "path": "app/src/debug/res/drawable-v24/ic_banner_background.xml",
    "chars": 11031,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    "
  },
  {
    "path": "app/src/debug/res/drawable-v24/ic_launcher_foreground.xml",
    "chars": 4211,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n  "
  },
  {
    "path": "app/src/debug/res/mipmap-anydpi-v26/ic_banner.xml",
    "chars": 198,
    "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/debug/res/mipmap-anydpi-v26/ic_launcher.xml",
    "chars": 340,
    "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/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "chars": 340,
    "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/debug/res/values/ic_launcher_background.xml",
    "chars": 120,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#000000</color>\n</resources>"
  },
  {
    "path": "app/src/debug/res/values/strings.xml",
    "chars": 79,
    "preview": "<resources>\n    <string name=\"app_name\">CloudStream Debug</string>\n</resources>"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "chars": 11688,
    "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/lagradost/cloudstream3/AcraApplication.kt",
    "chars": 3810,
    "preview": "package com.lagradost.cloudstream3\n\nimport android.content.Context\nimport com.lagradost.api.setContext\nimport com.lagrad"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/CloudStreamApp.kt",
    "chars": 6399,
    "preview": "package com.lagradost.cloudstream3\n\nimport android.app.Activity\nimport android.app.Application\nimport android.content.Co"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/CommonActivity.kt",
    "chars": 25124,
    "preview": "package com.lagradost.cloudstream3\n\nimport android.annotation.SuppressLint\nimport android.app.Activity\nimport android.ap"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/DownloaderTestImpl.kt",
    "chars": 3082,
    "preview": "package com.lagradost.cloudstream3\n\nimport okhttp3.OkHttpClient\nimport okhttp3.RequestBody\nimport okhttp3.RequestBody.Co"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt",
    "chars": 88813,
    "preview": "package com.lagradost.cloudstream3\n\nimport android.animation.ValueAnimator\nimport android.annotation.SuppressLint\nimport"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/AlwaysAskAction.kt",
    "chars": 1008,
    "preview": "package com.lagradost.cloudstream3.actions\n\nimport android.content.Context\nimport com.lagradost.cloudstream3.R\nimport co"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/OpenInAppAction.kt",
    "chars": 4588,
    "preview": "package com.lagradost.cloudstream3.actions\n\nimport android.app.Activity\nimport android.content.ComponentName\nimport andr"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/VideoClickAction.kt",
    "chars": 8054,
    "preview": "package com.lagradost.cloudstream3.actions\n\nimport android.app.Activity\nimport android.content.ActivityNotFoundException"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/Aria2Package.kt",
    "chars": 1050,
    "preview": "package com.lagradost.cloudstream3.actions.temp\r\n\r\nimport android.app.Activity\r\nimport android.content.Context\r\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/BiglyBTPackage.kt",
    "chars": 1258,
    "preview": "package com.lagradost.cloudstream3.actions.temp\r\n\r\nimport android.app.Activity\r\nimport android.content.Context\r\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/CloudStreamPackage.kt",
    "chars": 6461,
    "preview": "package com.lagradost.cloudstream3.actions.temp\r\n\r\nimport android.app.Activity\r\nimport android.content.Context\r\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/CopyClipboardAction.kt",
    "chars": 886,
    "preview": "package com.lagradost.cloudstream3.actions.temp\n\nimport android.content.Context\nimport com.lagradost.cloudstream3.action"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/JustPlayerPackage.kt",
    "chars": 1459,
    "preview": "package com.lagradost.cloudstream3.actions.temp\r\n\r\nimport android.app.Activity\r\nimport android.content.Context\r\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/LibreTorrentPackage.kt",
    "chars": 1286,
    "preview": "package com.lagradost.cloudstream3.actions.temp\r\n\r\nimport android.app.Activity\r\nimport android.content.Context\r\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/MpvKtPackage.kt",
    "chars": 2248,
    "preview": "package com.lagradost.cloudstream3.actions.temp\n\nimport android.app.Activity\nimport android.content.Context\nimport andro"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/MpvPackage.kt",
    "chars": 2619,
    "preview": "package com.lagradost.cloudstream3.actions.temp\n\nimport android.app.Activity\nimport android.content.Context\nimport andro"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/NextPlayerPackage.kt",
    "chars": 1240,
    "preview": "package com.lagradost.cloudstream3.actions.temp\r\n\r\nimport android.app.Activity\r\nimport android.content.Context\r\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/PlayInBrowserAction.kt",
    "chars": 1221,
    "preview": "package com.lagradost.cloudstream3.actions.temp\n\nimport android.content.Context\nimport android.content.Intent\nimport and"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/PlayMirrorAction.kt",
    "chars": 2370,
    "preview": "package com.lagradost.cloudstream3.actions.temp\n\nimport android.app.Activity\nimport android.content.Context\nimport com.l"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/ViewM3U8Action.kt",
    "chars": 977,
    "preview": "package com.lagradost.cloudstream3.actions.temp\n\nimport android.content.Context\nimport android.content.Intent\nimport com"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/VlcPackage.kt",
    "chars": 2883,
    "preview": "package com.lagradost.cloudstream3.actions.temp\n\nimport android.app.Activity\nimport android.content.Context\nimport andro"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/WebVideoCastPackage.kt",
    "chars": 1915,
    "preview": "package com.lagradost.cloudstream3.actions.temp\n\nimport android.app.Activity\nimport android.content.Context\nimport andro"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/fcast/FcastAction.kt",
    "chars": 2423,
    "preview": "package com.lagradost.cloudstream3.actions.temp.fcast\n\nimport android.content.Context\nimport com.lagradost.cloudstream3."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/fcast/FcastManager.kt",
    "chars": 7685,
    "preview": "package com.lagradost.cloudstream3.actions.temp.fcast\n\nimport android.content.Context\nimport android.net.nsd.NsdManager\n"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/fcast/FcastSession.kt",
    "chars": 1723,
    "preview": "package com.lagradost.cloudstream3.actions.temp.fcast\n\nimport android.util.Log\nimport androidx.annotation.WorkerThread\ni"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/actions/temp/fcast/Packets.kt",
    "chars": 1126,
    "preview": "package com.lagradost.cloudstream3.actions.temp.fcast\n\n// See https://gitlab.com/futo-org/fcast/-/wikis/Protocol-version"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/mvvm/Lifecycle.kt",
    "chars": 563,
    "preview": "package com.lagradost.cloudstream3.mvvm\n\nimport androidx.lifecycle.LifecycleOwner\nimport androidx.lifecycle.LiveData\n\n/*"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/network/CloudflareKiller.kt",
    "chars": 4958,
    "preview": "package com.lagradost.cloudstream3.network\n\nimport android.util.Log\nimport android.webkit.CookieManager\nimport androidx."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/network/DdosGuardKiller.kt",
    "chars": 2082,
    "preview": "package com.lagradost.cloudstream3.network\n\nimport androidx.annotation.AnyThread\nimport com.lagradost.cloudstream3.app\ni"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/network/DohProviders.kt",
    "chars": 3073,
    "preview": "package com.lagradost.cloudstream3.network\n\nimport okhttp3.HttpUrl.Companion.toHttpUrl\nimport okhttp3.OkHttpClient\nimpor"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/network/RequestsHelper.kt",
    "chars": 2566,
    "preview": "package com.lagradost.cloudstream3.network\n\nimport android.content.Context\nimport androidx.preference.PreferenceManager\n"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/plugins/Plugin.kt",
    "chars": 1333,
    "preview": "package com.lagradost.cloudstream3.plugins\n\nimport android.content.Context\nimport android.content.res.Resources\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/plugins/PluginManager.kt",
    "chars": 37276,
    "preview": "package com.lagradost.cloudstream3.plugins\n\nimport android.Manifest\nimport android.app.Activity\nimport android.app.Notif"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt",
    "chars": 8086,
    "preview": "package com.lagradost.cloudstream3.plugins\n\nimport android.content.Context\nimport com.fasterxml.jackson.annotation.JsonP"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/plugins/VotingApi.kt",
    "chars": 3265,
    "preview": "package com.lagradost.cloudstream3.plugins\n\nimport android.util.Log\nimport android.widget.Toast\nimport com.lagradost.clo"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/receivers/VideoDownloadRestartReceiver.kt",
    "chars": 781,
    "preview": "package com.lagradost.cloudstream3.receivers\n\nimport android.content.BroadcastReceiver\nimport android.content.Context\nim"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/services/BackupWorkManager.kt",
    "chars": 3655,
    "preview": "package com.lagradost.cloudstream3.services\n\nimport android.content.Context\nimport android.content.pm.ServiceInfo.FOREGR"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/services/DownloadQueueService.kt",
    "chars": 11155,
    "preview": "package com.lagradost.cloudstream3.services\n\nimport android.app.Service\nimport android.content.Context\nimport android.co"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/services/PackageInstallerService.kt",
    "chars": 7138,
    "preview": "package com.lagradost.cloudstream3.services\n\nimport android.app.NotificationManager\nimport android.app.Service\nimport an"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/services/SubscriptionWorkManager.kt",
    "chars": 9966,
    "preview": "package com.lagradost.cloudstream3.services\n\nimport android.app.NotificationManager\nimport android.content.Context\nimpor"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/services/VideoDownloadService.kt",
    "chars": 1518,
    "preview": "package com.lagradost.cloudstream3.services\nimport android.app.Service\nimport android.content.Intent\nimport android.os.I"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubProvider.kt",
    "chars": 2690,
    "preview": "package com.lagradost.cloudstream3.subtitles\n\nimport androidx.core.net.toUri\nimport com.lagradost.cloudstream3.MainActiv"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/subtitles/AbstractSubtitleEntities.kt",
    "chars": 1053,
    "preview": "package com.lagradost.cloudstream3.subtitles\n\nimport com.lagradost.cloudstream3.TvType\n\nclass AbstractSubtitleEntities {"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/AccountManager.kt",
    "chars": 6127,
    "preview": "package com.lagradost.cloudstream3.syncproviders\r\n\r\nimport com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey\r\ni"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/AuthAPI.kt",
    "chars": 11046,
    "preview": "package com.lagradost.cloudstream3.syncproviders\n\nimport android.util.Base64\nimport androidx.annotation.WorkerThread\nimp"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/AuthRepo.kt",
    "chars": 5722,
    "preview": "package com.lagradost.cloudstream3.syncproviders\r\n\r\nimport com.lagradost.cloudstream3.CloudStreamApp.Companion.openBrows"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/BackupAPI.kt",
    "chars": 584,
    "preview": "package com.lagradost.cloudstream3.syncproviders\r\n\r\n/** Work in progress */\r\nabstract class BackupAPI : AuthAPI() {\r\n   "
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/SubtitleAPI.kt",
    "chars": 1245,
    "preview": "package com.lagradost.cloudstream3.syncproviders\r\n\r\nimport androidx.annotation.WorkerThread\r\nimport com.lagradost.clouds"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/SubtitleRepo.kt",
    "chars": 3441,
    "preview": "package com.lagradost.cloudstream3.syncproviders\r\n\r\nimport androidx.annotation.WorkerThread\r\nimport com.lagradost.clouds"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/SyncAPI.kt",
    "chars": 7194,
    "preview": "package com.lagradost.cloudstream3.syncproviders\r\n\r\nimport androidx.annotation.WorkerThread\r\nimport com.lagradost.clouds"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/SyncRepo.kt",
    "chars": 1037,
    "preview": "package com.lagradost.cloudstream3.syncproviders\r\n\r\n/** Stateless safe abstraction of SyncAPI */\r\nclass SyncRepo(overrid"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Addic7ed.kt",
    "chars": 8899,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\nimport com.lagradost.cloudstream3.AllLanguagesName\nimport co"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/AniListApi.kt",
    "chars": 42945,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\nimport androidx.annotation.StringRes\nimport com.fasterxml.ja"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/KitsuApi.kt",
    "chars": 25969,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\n\nimport androidx.annotation.StringRes\nimport com.fasterxml.j"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/LocalList.kt",
    "chars": 3526,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\nimport com.lagradost.cloudstream3.R\nimport com.lagradost.clo"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt",
    "chars": 25900,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\nimport androidx.annotation.StringRes\nimport com.fasterxml.ja"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt",
    "chars": 11313,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\nimport android.util.Log\nimport com.fasterxml.jackson.annotat"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SimklApi.kt",
    "chars": 45738,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\nimport androidx.annotation.StringRes\nimport androidx.core.ne"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/SubSource.kt",
    "chars": 5683,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\nimport com.fasterxml.jackson.annotation.JsonProperty\nimport "
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/Subdl.kt",
    "chars": 10280,
    "preview": "package com.lagradost.cloudstream3.syncproviders.providers\n\nimport com.fasterxml.jackson.annotation.JsonProperty\nimport "
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/APIRepository.kt",
    "chars": 8063,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport com.lagradost.cloudstream3.APIHolder.unixTime\nimport com.lagradost.cloudst"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/BaseAdapter.kt",
    "chars": 12302,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport android.content.Context\nimport android.view.View\nimport android.view.ViewG"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/BaseFragment.kt",
    "chars": 9960,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport android.content.res.Configuration\nimport android.os.Bundle\nimport android."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/ControllerActivity.kt",
    "chars": 20558,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.Menu\nimport "
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/CustomRecyclerViews.kt",
    "chars": 5903,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport android.content.Context\nimport android.util.AttributeSet\nimport android.vi"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/EasterEggMonkeFragment.kt",
    "chars": 6168,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport android.animation.Animator\nimport android.animation.AnimatorListenerAdapte"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/MiniControllerFragment.kt",
    "chars": 2755,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport android.content.Context\nimport android.os.Bundle\nimport android.util.Attri"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/NonFinalAdapterListUpdateCallback.kt",
    "chars": 1236,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport android.annotation.SuppressLint\nimport androidx.recyclerview.widget.DiffUt"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/WatchType.kt",
    "chars": 1616,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport androidx.annotation.DrawableRes\nimport androidx.annotation.StringRes\nimpor"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/WebviewFragment.kt",
    "chars": 2398,
    "preview": "package com.lagradost.cloudstream3.ui\n\nimport android.os.Bundle\nimport android.view.View\nimport android.webkit.Javascrip"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountAdapter.kt",
    "chars": 8066,
    "preview": "package com.lagradost.cloudstream3.ui.account\n\nimport android.os.Build\nimport android.view.LayoutInflater\nimport android"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountHelper.kt",
    "chars": 16761,
    "preview": "package com.lagradost.cloudstream3.ui.account\n\nimport android.app.Activity\nimport android.content.Context\nimport android"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountSelectActivity.kt",
    "chars": 8184,
    "preview": "package com.lagradost.cloudstream3.ui.account\n\nimport android.annotation.SuppressLint\nimport android.os.Bundle\nimport an"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountSelectLinearItemDecoration.kt",
    "chars": 549,
    "preview": "package com.lagradost.cloudstream3.ui.account\n\nimport android.graphics.Rect\nimport android.view.View\nimport androidx.rec"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/account/AccountViewModel.kt",
    "chars": 4661,
    "preview": "package com.lagradost.cloudstream3.ui.account\n\nimport android.content.Context\nimport androidx.lifecycle.LiveData\nimport "
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt",
    "chars": 17150,
    "preview": "package com.lagradost.cloudstream3.ui.download\r\n\r\nimport android.annotation.SuppressLint\r\nimport android.text.format.For"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadButtonSetup.kt",
    "chars": 7932,
    "preview": "package com.lagradost.cloudstream3.ui.download\n\nimport android.content.DialogInterface\nimport android.net.Uri\nimport and"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadChildFragment.kt",
    "chars": 6704,
    "preview": "package com.lagradost.cloudstream3.ui.download\n\nimport android.os.Bundle\nimport android.text.format.Formatter.formatShor"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadFragment.kt",
    "chars": 14866,
    "preview": "package com.lagradost.cloudstream3.ui.download\n\nimport android.app.Activity\nimport android.app.Dialog\nimport android.con"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadViewModel.kt",
    "chars": 23908,
    "preview": "package com.lagradost.cloudstream3.ui.download\n\nimport android.content.Context\nimport android.content.DialogInterface\nim"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/button/BaseFetchButton.kt",
    "chars": 7228,
    "preview": "package com.lagradost.cloudstream3.ui.download.button\n\nimport android.content.Context\nimport android.text.format.Formatt"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/button/DownloadButton.kt",
    "chars": 2033,
    "preview": "package com.lagradost.cloudstream3.ui.download.button\n\nimport android.annotation.SuppressLint\nimport android.content.Con"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/button/PieFetchButton.kt",
    "chars": 13915,
    "preview": "package com.lagradost.cloudstream3.ui.download.button\n\nimport android.content.Context\nimport android.os.Looper\nimport an"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/button/ProgressBarAnimation.kt",
    "chars": 571,
    "preview": "package com.lagradost.cloudstream3.ui.download.button\n\nimport android.view.animation.Animation\nimport android.view.anima"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/queue/DownloadQueueAdapter.kt",
    "chars": 10746,
    "preview": "package com.lagradost.cloudstream3.ui.download.queue\n\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\n"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/queue/DownloadQueueFragment.kt",
    "chars": 3291,
    "preview": "package com.lagradost.cloudstream3.ui.download.queue\n\nimport android.view.View\nimport androidx.appcompat.app.AlertDialog"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/download/queue/DownloadQueueViewModel.kt",
    "chars": 1702,
    "preview": "package com.lagradost.cloudstream3.ui.download.queue\n\nimport androidx.lifecycle.LiveData\nimport androidx.lifecycle.Mutab"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeChildItemAdapter.kt",
    "chars": 7959,
    "preview": "package com.lagradost.cloudstream3.ui.home\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport and"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt",
    "chars": 40326,
    "preview": "package com.lagradost.cloudstream3.ui.home\n\nimport android.annotation.SuppressLint\nimport android.app.Activity\nimport an"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeParentItemAdapter.kt",
    "chars": 7539,
    "preview": "package com.lagradost.cloudstream3.ui.home\n\nimport android.os.Build\nimport android.os.Bundle\nimport android.os.Parcelabl"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeParentItemAdapterPreview.kt",
    "chars": 34543,
    "preview": "package com.lagradost.cloudstream3.ui.home\n\nimport android.content.Context\nimport android.os.Bundle\nimport android.os.Pa"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeScrollAdapter.kt",
    "chars": 3193,
    "preview": "package com.lagradost.cloudstream3.ui.home\n\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.v"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeScrollTransformer.kt",
    "chars": 661,
    "preview": "package com.lagradost.cloudstream3.ui.home\n\nimport android.view.View\nimport androidx.viewpager2.widget.ViewPager2\n\nclass"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeViewModel.kt",
    "chars": 22630,
    "preview": "package com.lagradost.cloudstream3.ui.home\n\nimport android.os.Build\nimport androidx.lifecycle.LiveData\nimport androidx.l"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/library/LibraryFragment.kt",
    "chars": 23019,
    "preview": "package com.lagradost.cloudstream3.ui.library\n\nimport android.annotation.SuppressLint\nimport android.app.Activity\nimport"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/library/LibraryScrollTransformer.kt",
    "chars": 503,
    "preview": "package com.lagradost.cloudstream3.ui.library\n\nimport android.view.View\nimport androidx.viewpager2.widget.ViewPager2\nimp"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/library/LibraryViewModel.kt",
    "chars": 5356,
    "preview": "package com.lagradost.cloudstream3.ui.library\n\nimport androidx.annotation.StringRes\nimport androidx.lifecycle.LiveData\ni"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/library/LoadingPosterAdapter.kt",
    "chars": 828,
    "preview": "package com.lagradost.cloudstream3.ui.library\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport "
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/library/PageAdapter.kt",
    "chars": 2895,
    "preview": "package com.lagradost.cloudstream3.ui.library\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/library/ViewpagerAdapter.kt",
    "chars": 4951,
    "preview": "package com.lagradost.cloudstream3.ui.library\n\nimport android.os.Build\nimport android.os.Bundle\nimport android.os.Parcel"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/AbstractPlayerFragment.kt",
    "chars": 28816,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.annotation.SuppressLint\nimport android.content.BroadcastRec"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/CS3IPlayer.kt",
    "chars": 78724,
    "preview": "@file:Suppress(\"DEPRECATION\")\n\npackage com.lagradost.cloudstream3.ui.player\n\nimport android.annotation.SuppressLint\nimpo"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/CustomSubripParser.kt",
    "chars": 12183,
    "preview": "/*\r\n * Copyright (C) 2016 The Android Open Source Project\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"L"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/CustomSubtitleDecoderFactory.kt",
    "chars": 16940,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.content.Context\nimport android.text.Layout\nimport android.u"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/DownloadFileGenerator.kt",
    "chars": 3118,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.net.Uri\nimport com.lagradost.cloudstream3.CloudStreamApp.Co"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/DownloadedPlayerActivity.kt",
    "chars": 2830,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.content.Intent\nimport android.os.Bundle\nimport android.util"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/ExtractorLinkGenerator.kt",
    "chars": 811,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport com.lagradost.cloudstream3.utils.ExtractorLink\nimport com.lagradost"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/FixedNextRenderersFactory.kt",
    "chars": 1059,
    "preview": "package com.lagradost.cloudstream3.ui.player\r\n\r\nimport android.content.Context\r\nimport android.os.Looper\r\nimport android"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt",
    "chars": 107345,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.animation.ObjectAnimator\nimport android.animation.ValueAnim"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt",
    "chars": 89800,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.animation.ValueAnimator\nimport android.annotation.SuppressL"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/IGenerator.kt",
    "chars": 2758,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport com.lagradost.cloudstream3.ui.result.ResultEpisode\nimport com.lagra"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/IPlayer.kt",
    "chars": 9563,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.content.Context\nimport android.graphics.Bitmap\nimport andro"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/LinkGenerator.kt",
    "chars": 3200,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.net.Uri\nimport com.lagradost.cloudstream3.TvType\nimport com"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/OfflinePlaybackHelper.kt",
    "chars": 3256,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.app.Activity\nimport android.content.ContentUris\nimport andr"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/OutlineSpan.kt",
    "chars": 357,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.text.TextPaint\nimport android.text.style.CharacterStyle\nimp"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/PlayerGeneratorViewModel.kt",
    "chars": 7959,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.util.Log\nimport androidx.lifecycle.LiveData\nimport androidx"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/PlayerPipHelper.kt",
    "chars": 6993,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.app.Activity\nimport android.app.AppOpsManager\nimport androi"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/PlayerSubtitleHelper.kt",
    "chars": 4854,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.util.Log\nimport android.util.TypedValue\nimport android.view"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/PreviewGenerator.kt",
    "chars": 19040,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.content.Context\nimport android.graphics.Bitmap\nimport andro"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/RepoLinkGenerator.kt",
    "chars": 6106,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.util.Log\nimport com.lagradost.cloudstream3.APIHolder.getApi"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/RoundedBackgroundColorSpan.kt",
    "chars": 3480,
    "preview": "package com.lagradost.cloudstream3.ui.player\r\n\r\n/**\r\n * Inspired by https://medium.com/@Semper_Viventem/simple-implement"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/SSLTrustManager.kt",
    "chars": 448,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport java.security.cert.X509Certificate\nimport javax.net.ssl.X509TrustMa"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/SubtitleOffsetItemAdapter.kt",
    "chars": 3729,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport android.animation.ObjectAnimator\nimport android.view.LayoutInflater"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/Torrent.kt",
    "chars": 14015,
    "preview": "package com.lagradost.cloudstream3.ui.player\n\nimport com.fasterxml.jackson.annotation.JsonProperty\nimport com.lagradost."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/UpdatedDefaultExtractorsFactory.kt",
    "chars": 26371,
    "preview": "@file:Suppress(\r\n    \"ALL\",\r\n    \"DEPRECATION\",\r\n    \"RedundantVisibilityModifier\",\r\n    \"RemoveRedundantQualifierName\","
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/UpdatedMatroskaExtractor.kt",
    "chars": 147785,
    "preview": "@file:Suppress(\r\n    \"ALL\",\r\n    \"DEPRECATION\",\r\n    \"RedundantVisibilityModifier\",\r\n    \"RemoveRedundantQualifierName\","
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/source_priority/PriorityAdapter.kt",
    "chars": 1474,
    "preview": "package com.lagradost.cloudstream3.ui.player.source_priority\n\nimport android.view.LayoutInflater\nimport android.view.Vie"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/source_priority/ProfilesAdapter.kt",
    "chars": 4927,
    "preview": "package com.lagradost.cloudstream3.ui.player.source_priority\n\nimport android.content.res.ColorStateList\nimport android.g"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/source_priority/QualityDataHelper.kt",
    "chars": 7811,
    "preview": "package com.lagradost.cloudstream3.ui.player.source_priority\n\nimport androidx.annotation.StringRes\nimport com.lagradost."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/source_priority/QualityProfileDialog.kt",
    "chars": 6081,
    "preview": "package com.lagradost.cloudstream3.ui.player.source_priority\n\nimport android.app.Dialog\nimport androidx.annotation.Style"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/player/source_priority/SourcePriorityDialog.kt",
    "chars": 3985,
    "preview": "package com.lagradost.cloudstream3.ui.player.source_priority\n\nimport android.app.Dialog\nimport android.content.Context\ni"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/quicksearch/QuickSearchFragment.kt",
    "chars": 12443,
    "preview": "package com.lagradost.cloudstream3.ui.quicksearch\n\nimport android.app.Activity\nimport android.content.Context\nimport and"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/ActorAdaptor.kt",
    "chars": 5440,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.app.SearchManager\nimport android.content.Intent\nimport andr"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/EpisodeAdapter.kt",
    "chars": 20947,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/ImageAdapter.kt",
    "chars": 2448,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport co"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/LinearListLayout.kt",
    "chars": 10037,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.content.Context\nimport android.view.View\nimport androidx.re"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragment.kt",
    "chars": 12157,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.os.Bundle\nimport android.widget.ImageView\nimport android.wi"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentPhone.kt",
    "chars": 59039,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.annotation.SuppressLint\nimport android.app.Dialog\nimport an"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentTv.kt",
    "chars": 39237,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.animation.Animator\nimport android.annotation.SuppressLint\ni"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultTrailerPlayer.kt",
    "chars": 7353,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.animation.ValueAnimator\nimport android.content.Context\nimpo"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultViewModel2.kt",
    "chars": 103298,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.app.Activity\nimport android.content.*\nimport android.util.L"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/SelectAdaptor.kt",
    "chars": 2311,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport an"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/result/SyncViewModel.kt",
    "chars": 9972,
    "preview": "package com.lagradost.cloudstream3.ui.result\n\nimport android.util.Log\nimport androidx.lifecycle.LiveData\nimport androidx"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchAdaptor.kt",
    "chars": 3313,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport android.view.LayoutInflater\nimport android.view.View\nimport android"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchFragment.kt",
    "chars": 30137,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.c"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchHelper.kt",
    "chars": 2943,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport android.widget.Toast\nimport com.lagradost.cloudstream3.CommonActivi"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchHistoryAdaptor.kt",
    "chars": 3425,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport an"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchResultBuilder.kt",
    "chars": 12486,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimpo"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionAdapter.kt",
    "chars": 3141,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport an"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt",
    "chars": 2590,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport com.fasterxml.jackson.annotation.JsonProperty\nimport com.lagradost."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchViewModel.kt",
    "chars": 9487,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport androidx.lifecycle.LiveData\nimport androidx.lifecycle.MutableLiveDa"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/search/SyncSearchViewModel.kt",
    "chars": 751,
    "preview": "package com.lagradost.cloudstream3.ui.search\n\nimport com.lagradost.cloudstream3.Score\nimport com.lagradost.cloudstream3."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/AccountAdapter.kt",
    "chars": 2022,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.view.LayoutInflater\nimport android.view.View\nimport andro"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/Globals.kt",
    "chars": 2103,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.app.UiModeManager\nimport android.content.Context\nimport a"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/LogcatAdapter.kt",
    "chars": 1005,
    "preview": "package com.lagradost.cloudstream3.ui.settings\r\n\r\nimport android.view.LayoutInflater\r\nimport android.view.ViewGroup\r\nimp"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsAccount.kt",
    "chars": 20561,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.annotation.SuppressLint\nimport android.graphics.Bitmap\nim"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsFragment.kt",
    "chars": 10350,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.Vie"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsGeneral.kt",
    "chars": 17314,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.content.Context\nimport android.net.Uri\nimport android.os."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsPlayer.kt",
    "chars": 13142,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.os.Bundle\nimport android.text.format.Formatter.formatShor"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsProviders.kt",
    "chars": 6242,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.os.Bundle\nimport android.view.View\nimport androidx.core.c"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUI.kt",
    "chars": 10774,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.os.Build\nimport android.os.Bundle\nimport android.view.Vie"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsUpdates.kt",
    "chars": 12669,
    "preview": "package com.lagradost.cloudstream3.ui.settings\n\nimport android.net.Uri\nimport android.os.Bundle\nimport android.view.View"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/ExtensionsFragment.kt",
    "chars": 11318,
    "preview": "package com.lagradost.cloudstream3.ui.settings.extensions\n\nimport android.content.ClipboardManager\nimport android.conten"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/ExtensionsViewModel.kt",
    "chars": 3713,
    "preview": "package com.lagradost.cloudstream3.ui.settings.extensions\n\nimport androidx.lifecycle.LiveData\nimport androidx.lifecycle."
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginAdapter.kt",
    "chars": 9577,
    "preview": "package com.lagradost.cloudstream3.ui.settings.extensions\n\nimport android.annotation.SuppressLint\nimport android.text.fo"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginDetailsFragment.kt",
    "chars": 6375,
    "preview": "package com.lagradost.cloudstream3.ui.settings.extensions\n\nimport android.content.res.ColorStateList\nimport android.text"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginsFragment.kt",
    "chars": 9193,
    "preview": "package com.lagradost.cloudstream3.ui.settings.extensions\n\nimport android.os.Bundle\nimport android.view.View\nimport andr"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/PluginsViewModel.kt",
    "chars": 11364,
    "preview": "package com.lagradost.cloudstream3.ui.settings.extensions\n\nimport android.app.Activity\nimport android.content.Context\nim"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/RepoAdapter.kt",
    "chars": 5252,
    "preview": "package com.lagradost.cloudstream3.ui.settings.extensions\n\nimport android.view.LayoutInflater\nimport android.view.ViewGr"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/testing/TestFragment.kt",
    "chars": 3605,
    "preview": "package com.lagradost.cloudstream3.ui.settings.testing\n\nimport android.view.View\nimport androidx.fragment.app.activityVi"
  },
  {
    "path": "app/src/main/java/com/lagradost/cloudstream3/ui/settings/testing/TestResultAdapter.kt",
    "chars": 4914,
    "preview": "package com.lagradost.cloudstream3.ui.settings.testing\n\nimport android.app.AlertDialog\nimport android.view.LayoutInflate"
  }
]

// ... and 956 more files (download for full content)

About this extraction

This page contains the full source code of the recloudstream/cloudstream GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1156 files (6.6 MB), approximately 1.8M 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.

Copied to clipboard!