Repository: anujd64/Thunder Branch: main Commit: 31158ee1b616 Files: 261 Total size: 1.2 MB Directory structure: gitextract_l2jjn7m6/ ├── .github/ │ └── workflows/ │ └── notify.yml ├── .gitignore ├── .idea/ │ ├── .gitignore │ ├── .name │ ├── compiler.xml │ ├── deploymentTargetDropDown.xml │ ├── gradle.xml │ ├── misc.xml │ └── vcs.xml ├── LICENSE.md ├── README.md ├── Screenshots/ │ └── test ├── app/ │ ├── .gitignore │ ├── build.gradle │ ├── libs/ │ │ ├── extension-av1-release.aar │ │ └── extension-ffmpeg-release.aar │ ├── proguard-rules.pro │ ├── schemas/ │ │ ├── com.example.myapplication.AppDatabase/ │ │ │ └── 5.json │ │ ├── com.example.myapplication.database.AppDatabase/ │ │ │ └── 10.json │ │ └── com.theflexproject.thunder.database.AppDatabase/ │ │ ├── 10.json │ │ ├── 11.json │ │ ├── 12.json │ │ ├── 13.json │ │ ├── 14.json │ │ ├── 15.json │ │ ├── 16.json │ │ ├── 17.json │ │ ├── 18.json │ │ ├── 19.json │ │ ├── 20.json │ │ ├── 21.json │ │ ├── 22.json │ │ ├── 23.json │ │ ├── 24.json │ │ ├── 25.json │ │ ├── 26.json │ │ ├── 27.json │ │ ├── 28.json │ │ ├── 29.json │ │ ├── 30.json │ │ ├── 5.json │ │ ├── 6.json │ │ ├── 7.json │ │ ├── 8.json │ │ └── 9.json │ └── src/ │ ├── androidTest/ │ │ └── java/ │ │ └── com/ │ │ └── theflexproject/ │ │ └── thunder/ │ │ └── ExampleInstrumentedTest.java │ ├── main/ │ │ ├── AndroidManifest.xml │ │ ├── java/ │ │ │ └── com/ │ │ │ └── theflexproject/ │ │ │ └── thunder/ │ │ │ ├── Constants.java │ │ │ ├── MainActivity.java │ │ │ ├── SplashScreenActivity.java │ │ │ ├── adapter/ │ │ │ │ ├── ArchivedAdapters/ │ │ │ │ │ ├── HomeItemAdapter.java │ │ │ │ │ ├── MovieRecyclerAdapter.java │ │ │ │ │ ├── MovieRecyclerAdapterLibrary.java │ │ │ │ │ └── TVShowRecyclerAdapter.java │ │ │ │ ├── BannerRecyclerAdapter.java │ │ │ │ ├── EpisodeAdapter.java │ │ │ │ ├── FileItemAdapter.java │ │ │ │ ├── FileItemDialogAdapter.java │ │ │ │ ├── FragmentViewPagerAdapter.java │ │ │ │ ├── IndexAdapter.java │ │ │ │ ├── MediaAdapter.java │ │ │ │ └── ScaleCenterItemLayoutManager.java │ │ │ ├── database/ │ │ │ │ ├── AppDatabase.java │ │ │ │ ├── Converters.java │ │ │ │ ├── DatabaseClient.java │ │ │ │ ├── EpisodeDao.java │ │ │ │ ├── IndexLinksDao.java │ │ │ │ ├── MovieDao.java │ │ │ │ ├── ResFormatDao.java │ │ │ │ ├── TVShowDao.java │ │ │ │ └── TVShowSeasonDetailsDao.java │ │ │ ├── fragments/ │ │ │ │ ├── AddNewIndexFragment.java │ │ │ │ ├── BaseFragment.java │ │ │ │ ├── ChangeTMDBFragment.java │ │ │ │ ├── CustomFileListDialogFragment.java │ │ │ │ ├── CustomFileSelectionDialog.java │ │ │ │ ├── EpisodeDetailsFragment.java │ │ │ │ ├── FilesLibraryFragment.java │ │ │ │ ├── HomeFragment.java │ │ │ │ ├── LibraryFragment.java │ │ │ │ ├── ManageDatabaseFragment.java │ │ │ │ ├── ManageIndexesFragment.java │ │ │ │ ├── MovieDetailsFragment.java │ │ │ │ ├── MovieLibraryFragment.java │ │ │ │ ├── SearchFragment.java │ │ │ │ ├── SeasonDetailsFragment.java │ │ │ │ ├── SettingsFragment.java │ │ │ │ ├── TvShowDetailsFragment.java │ │ │ │ ├── TvShowsLibraryFragment.java │ │ │ │ └── UpdateAppFragment.java │ │ │ ├── model/ │ │ │ │ ├── Data.java │ │ │ │ ├── ExternalIds.java │ │ │ │ ├── FanArt/ │ │ │ │ │ ├── Clearlogo.java │ │ │ │ │ ├── FanArtMovieResponseModel.java │ │ │ │ │ ├── FanArtTvResponseModel.java │ │ │ │ │ ├── Hdmovielogo.java │ │ │ │ │ ├── Hdtvlogo.java │ │ │ │ │ └── Movielogo.java │ │ │ │ ├── File.java │ │ │ │ ├── Genre.java │ │ │ │ ├── GitHubResponse.java │ │ │ │ ├── IndexLink.java │ │ │ │ ├── Movie.java │ │ │ │ ├── MoviesResponseFromTMDB.java │ │ │ │ ├── MyMedia.java │ │ │ │ ├── ProductionCompany.java │ │ │ │ ├── ProductionCountry.java │ │ │ │ ├── ResFormat.java │ │ │ │ ├── SimpleLink.java │ │ │ │ ├── SpokenLanguage.java │ │ │ │ ├── TVShowInfo/ │ │ │ │ │ ├── CreatedBy.java │ │ │ │ │ ├── Crew.java │ │ │ │ │ ├── Episode.java │ │ │ │ │ ├── GuestStar.java │ │ │ │ │ ├── LastEpisodeToAir.java │ │ │ │ │ ├── Network.java │ │ │ │ │ ├── Result.java │ │ │ │ │ ├── Season.java │ │ │ │ │ ├── TVShow.java │ │ │ │ │ ├── TVShowSeasonDetails.java │ │ │ │ │ └── TVShowsResponseFromTMDB.java │ │ │ │ └── tmdbImages/ │ │ │ │ ├── Backdrop.java │ │ │ │ ├── Logo.java │ │ │ │ ├── Poster.java │ │ │ │ └── TMDBImagesResponse.java │ │ │ ├── player/ │ │ │ │ ├── DemoUtil.java │ │ │ │ └── PlayerActivity.java │ │ │ └── utils/ │ │ │ ├── AnimeNameExtractor.java │ │ │ ├── BlurBitmap.java │ │ │ ├── CheckForUpdates.java │ │ │ ├── IndexUtils.java │ │ │ ├── MovieQualityExtractor.java │ │ │ ├── MovieTitleExtractor2.java │ │ │ ├── Pair.java │ │ │ ├── PairMovies.java │ │ │ ├── PairTvShows.java │ │ │ ├── ParseUtils.java │ │ │ ├── PlexMovieExtractor.java │ │ │ ├── RefreshWorker.java │ │ │ ├── SceneMovieTitleExtractor.java │ │ │ ├── SendGetRequestTMDB.java │ │ │ ├── SendPostRequest.java │ │ │ ├── SettingsManager.java │ │ │ ├── ShowUtils.java │ │ │ ├── StorageUtils.java │ │ │ ├── StringUtils.java │ │ │ ├── UpdateUtils.java │ │ │ ├── downloadUtils.java │ │ │ ├── imageVotesComparator.java │ │ │ └── sizetoReadablesize.java │ │ └── res/ │ │ ├── anim/ │ │ │ ├── fade_in.xml │ │ │ ├── fade_out.xml │ │ │ ├── from_left.xml │ │ │ ├── from_right.xml │ │ │ ├── pop_in.xml │ │ │ ├── to_left.xml │ │ │ └── to_right.xml │ │ ├── color/ │ │ │ ├── about_item_bg_color.xml │ │ │ ├── button_text_color.xml │ │ │ ├── delete_button_color.xml │ │ │ ├── download_button_bg_color.xml │ │ │ ├── episode_item_bg_color.xml │ │ │ ├── media_item_bg_color.xml │ │ │ └── switch_bg_color.xml │ │ ├── drawable/ │ │ │ ├── bottom_navigation_background.xml │ │ │ ├── bottom_navigation_color_selector.xml │ │ │ ├── bottom_navigation_item_background.xml │ │ │ ├── discord.xml │ │ │ ├── gradient_top_bottom_bg.xml │ │ │ ├── ic_add.xml │ │ │ ├── ic_add_box.xml │ │ │ ├── ic_change.xml │ │ │ ├── ic_delete.xml │ │ │ ├── ic_download.xml │ │ │ ├── ic_edit.xml │ │ │ ├── ic_export.xml │ │ │ ├── ic_github.xml │ │ │ ├── ic_home.xml │ │ │ ├── ic_import.xml │ │ │ ├── ic_import_export.xml │ │ │ ├── ic_info.xml │ │ │ ├── ic_library.xml │ │ │ ├── ic_list.xml │ │ │ ├── ic_next.xml │ │ │ ├── ic_play.xml │ │ │ ├── ic_play_rounded.xml │ │ │ ├── ic_refresh.xml │ │ │ ├── ic_search.xml │ │ │ ├── ic_settings.xml │ │ │ ├── ic_update.xml │ │ │ ├── index_link_bg.xml │ │ │ ├── media_item_selector.xml │ │ │ ├── oval.xml │ │ │ ├── play_shape.xml │ │ │ ├── rounded_controls_background.xml │ │ │ ├── rounded_corner_labels.xml │ │ │ ├── search_bg.xml │ │ │ ├── splash_background.xml │ │ │ ├── splash_bg_gradient.xml │ │ │ ├── switch_ios_selector.xml │ │ │ ├── switch_ios_track.xml │ │ │ ├── tab_indicator_bg.xml │ │ │ ├── tab_item_selector.xml │ │ │ ├── tab_layout_bg.xml │ │ │ ├── tabs_selector.xml │ │ │ ├── telegram.xml │ │ │ └── tmdb.xml │ │ ├── layout/ │ │ │ ├── activity_main.xml │ │ │ ├── activity_player.xml │ │ │ ├── dialog_filename_item.xml │ │ │ ├── dropdown_item.xml │ │ │ ├── episode_item.xml │ │ │ ├── file_item.xml │ │ │ ├── fragment_add_index.xml │ │ │ ├── fragment_change_tmdb.xml │ │ │ ├── fragment_custom_file_list_dialog.xml │ │ │ ├── fragment_episode_details.xml │ │ │ ├── fragment_episode_details_new.xml │ │ │ ├── fragment_files_library.xml │ │ │ ├── fragment_home.xml │ │ │ ├── fragment_library.xml │ │ │ ├── fragment_manage_database.xml │ │ │ ├── fragment_manage_indexes.xml │ │ │ ├── fragment_movie_details.xml │ │ │ ├── fragment_movie_details_new.xml │ │ │ ├── fragment_movie_library.xml │ │ │ ├── fragment_search.xml │ │ │ ├── fragment_season_details.xml │ │ │ ├── fragment_season_details_new.xml │ │ │ ├── fragment_settings.xml │ │ │ ├── fragment_show_details.xml │ │ │ ├── fragment_show_details_new.xml │ │ │ ├── fragment_tv_shows_library.xml │ │ │ ├── fragment_update_app.xml │ │ │ ├── home_item.xml │ │ │ ├── index_item.xml │ │ │ ├── item_folder_type.xml │ │ │ ├── item_index_type.xml │ │ │ ├── media_item.xml │ │ │ ├── movie_item_banner.xml │ │ │ ├── movie_item_library.xml │ │ │ ├── movie_item_recycler.xml │ │ │ ├── refresh_time_dialog.xml │ │ │ └── tvshow_item.xml │ │ ├── menu/ │ │ │ └── bottom_navigation_menu.xml │ │ ├── mipmap-anydpi-v26/ │ │ │ └── ic_launcher.xml │ │ ├── values/ │ │ │ ├── bg.xml │ │ │ ├── color.xml │ │ │ ├── strings.xml │ │ │ ├── style.xml │ │ │ └── themes.xml │ │ └── xml/ │ │ ├── backup_rules.xml │ │ └── data_extraction_rules.xml │ └── test/ │ └── java/ │ └── com/ │ └── theflexproject/ │ └── thunder/ │ └── ExampleUnitTest.java ├── build.gradle ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew ├── gradlew.bat └── settings.gradle ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/workflows/notify.yml ================================================ name: Notify on Telegram on: fork: push: release: issue_comment: types: created watch: types: started pull_request_review_comment: types: created pull_request: types: [opened, closed, reopened] issues: types: [opened, pinned, closed, reopened] jobs: notify: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Notify the commit on Telegram. uses: EverythingSuckz/github-telegram-notify@v1.1.2 with: bot_token: '${{ secrets.BOT_TOKEN }}' chat_id: '${{ secrets.CHAT_ID }}' ================================================ FILE: .gitignore ================================================ *.iml .gradle /local.properties /.idea/caches /.idea/libraries /.idea/modules.xml /.idea/workspace.xml /.idea/navEditor.xml /.idea/assetWizardSettings.xml .DS_Store /build /captures .externalNativeBuild .cxx local.properties ================================================ FILE: .idea/.gitignore ================================================ # Default ignored files /shelf/ /workspace.xml ================================================ FILE: .idea/.name ================================================ Thunder ================================================ FILE: .idea/compiler.xml ================================================ ================================================ FILE: .idea/deploymentTargetDropDown.xml ================================================ ================================================ FILE: .idea/gradle.xml ================================================ ================================================ FILE: .idea/misc.xml ================================================ ================================================ FILE: .idea/vcs.xml ================================================ ================================================ FILE: LICENSE.md ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. 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 movies associated with source movies 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 movies, a statement of the additional terms that apply to those movies, 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 movie to most effectively state the exclusion of warranty; and each movie should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 . 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: Copyright (C) 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 . 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 . ================================================ FILE: README.md ================================================ ### **⚡ Thunder** : An Android app to stream and download your media stored in Google Drive in an Awesome way !!

If you feel like supporting me : ### **🔘 Getting Started** : Let's say you have a bunch of movies or tv shows lying around in your Drive What you need to do is : 1. Generate an index for the shared drive/folder 2. Deploy to Cloudflare (All instructions on the [Google Drive Index](https://gitlab.com/GoogleDriveIndex/Google-Drive-Index) its super easy) 3. Add the index link to movies folder link ( and username/password if you configured that for index ) in the settings tab, wait until it's done adding There you go you have your media Library which sources movies from Drive. (Probably will add video demo soon) ### **📱 Screenshots** :                               ### **🔥 Features** : - Stream and Download media directly - Now Supports adding tv show folders too!! - Supports Google Drive Index (Recommended) , GO Index , MapleIndex - No Ads whatsoever - Cool UI - You can change Subtitle & Audio tracks while streaming - If your phone hardware supports it you can stream it whatever it maybe HDR, HDR10, Dolby Vision - The app was made to solve a tiny problem with amazing projects like Plex and Jellyfin which cannot use Drive as a source directly ### **🛠️ To Do** : - [x] Add support for Shows - [x] Add animations - [ ] Better Player UI - [ ] Remember Playback Position - [ ] Add Sort to Library - [ ] Browse by genre ### **📋 Notes** : - Added support GOIndex and Maple's GDindex (GOIndex is unreliable try refreshing if movies aren't added) - Currently video is only hardware decoded (I think) That's why HEVC content may or may not play at all - Does not directly interact with Drive rather scrapes the index for movies. The index does the talking to the Drive api - Sub-folders of current folder are searched now but if the folder has too many sub folders it will take longer to scan - Even if your movies aren't correctly named there is an alternative algorithm which might just extract necessary info - Media movies with no TMDB info are also shown in the library - Rarely some movies may be mislabled if there is another movie of same name on TMDB - Naming of the movies does matter it's better if your movies are named like this ``` movie.2049.2160p.whatever movie.returns.2099.2160p.whatever - TV show are recognized based on the naming of an episode file so every episode must be named like this (probably will work if naming follows Scene naming conventions): ``` Show Name S01 E01 Show.Name.S01.E01.2160p.whatever - Ideally your folder should contain movie movies only like ``` 📂Movies └───movie.name.2049.2160p.garbage └───movie.returns.2069.2160p.whatever └───movie.returns.again.?.2099.2160p.whatever └───📂Subfolder <- this folder will be scanned too - If you want to request a feature create an issue with request feature tag ## Dependencies: - Glide - [FuzzyWuzzy](https://github.com/xdrop/fuzzywuzzy) - Room DB - Exoplayer - BlurView Special Thanks to: [Google Drive Index](https://gitlab.com/GoogleDriveIndex/Google-Drive-Index) [Bhadoo-Index-Scraper](https://github.com/sanjit-sinha/Bhadoo-Index-Scraper) ###To build your Own: Set the "TMDB_API_KEY" and put one or more FanArt API keys in the KEYS array inside the Constants class. Here's a guide to build your own apk using github by [dishapatel1010](https://github.com/dishapatel010) : https://github.com/dishapatel010/Thunder/tree/Build ### WANT TO CONTRIBUTE ? All contributions are welcome also request new features and report any bugs or issue at discord/telegram. [Discord](https://discord.gg/Y8h26bAm) & [Telegram](https://t.me/+qbLDmvEgC65lMWI1) ## DISCLAIMER * Thunder only scrapes links from various drive indexes provided by user. * Thunder or its developer doesn't host any of the contents, it uses TMDB Api to fetch info. ![Visitor count](https://shields-io-visitor-counter.herokuapp.com/badge?page=anujd64.Thunder) ================================================ FILE: Screenshots/test ================================================ ================================================ FILE: app/.gitignore ================================================ /build ================================================ FILE: app/build.gradle ================================================ plugins { id 'com.android.application' } android { compileSdk 32 defaultConfig { applicationId "com.theflexproject.thunder" minSdk 21 targetSdk 32 versionCode 1 versionName "1.0.7" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { arguments += ["room.schemaLocation": "$projectDir/schemas".toString()] } } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } buildFeatures { viewBinding true } lint { baseline = file("lint-baseline.xml") } lintOptions { checkReleaseBuilds false } } dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'com.google.android.material:material:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.room:room-common:2.4.3' implementation 'androidx.room:room-runtime:2.4.3' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' implementation 'androidx.navigation:navigation-fragment:2.5.3' implementation 'androidx.navigation:navigation-ui:2.5.3' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation 'com.google.code.gson:gson:2.9.1' implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1' annotationProcessor 'androidx.room:room-compiler:2.4.3' implementation 'com.google.android.material:material:1.7.0' implementation 'com.github.bumptech.glide:glide:4.13.2' annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2' implementation 'com.google.android.exoplayer:exoplayer:2.18.1' implementation fileTree(dir: "libs", include: ["extension-*.aar"]) implementation 'com.github.Dimezis:BlurView:version-2.0.2' implementation 'me.xdrop:fuzzywuzzy:1.4.0' implementation 'jp.wasabeef:glide-transformations:4.3.0' implementation "androidx.work:work-runtime:2.7.1" implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.1' implementation 'org.apache.commons:commons-text:1.9' } ================================================ FILE: app/proguard-rules.pro ================================================ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile ================================================ FILE: app/schemas/com.example.myapplication.AppDatabase/5.json ================================================ { "formatVersion": 1, "database": { "version": 5, "identityHash": "e7e8f2094f612b155f61f46396c10450", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e7e8f2094f612b155f61f46396c10450')" ] } } ================================================ FILE: app/schemas/com.example.myapplication.database.AppDatabase/10.json ================================================ { "formatVersion": 1, "database": { "version": 10, "identityHash": "a3191ca2c9aec41d6069b616bb985e84", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a3191ca2c9aec41d6069b616bb985e84')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/10.json ================================================ { "formatVersion": 1, "database": { "version": 10, "identityHash": "a3191ca2c9aec41d6069b616bb985e84", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a3191ca2c9aec41d6069b616bb985e84')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/11.json ================================================ { "formatVersion": 1, "database": { "version": 11, "identityHash": "dc2b4b8434670c24490e48c6d3f709de", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `type` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'dc2b4b8434670c24490e48c6d3f709de')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/12.json ================================================ { "formatVersion": 1, "database": { "version": 12, "identityHash": "8f3e141fb570a3206f81f4dbd6f7f241", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `type` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '8f3e141fb570a3206f81f4dbd6f7f241')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/13.json ================================================ { "formatVersion": 1, "database": { "version": 13, "identityHash": "e5ffc1c9484edf1b54be13fe8145052d", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `type` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e5ffc1c9484edf1b54be13fe8145052d')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/14.json ================================================ { "formatVersion": 1, "database": { "version": 14, "identityHash": "d5ae92f3371d6e4ee02a9de4fad13d0e", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `type` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd5ae92f3371d6e4ee02a9de4fad13d0e')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/15.json ================================================ { "formatVersion": 1, "database": { "version": 15, "identityHash": "f5918f60ec7ae38a4c4862d9ae41a9f6", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'f5918f60ec7ae38a4c4862d9ae41a9f6')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/16.json ================================================ { "formatVersion": 1, "database": { "version": 16, "identityHash": "f5918f60ec7ae38a4c4862d9ae41a9f6", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'f5918f60ec7ae38a4c4862d9ae41a9f6')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/17.json ================================================ { "formatVersion": 1, "database": { "version": 17, "identityHash": "c6828cd08c7bdbfe17209d6d425a34ca", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` TEXT NOT NULL, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, PRIMARY KEY(`_id`))", "fields": [ { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "_id" ], "autoGenerate": false }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c6828cd08c7bdbfe17209d6d425a34ca')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/18.json ================================================ { "formatVersion": 1, "database": { "version": 18, "identityHash": "e52e100e7bfc5d329c82081604154530", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `first_air_date` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_language` TEXT, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `seasons` TEXT, `status` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e52e100e7bfc5d329c82081604154530')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/19.json ================================================ { "formatVersion": 1, "database": { "version": 19, "identityHash": "e52e100e7bfc5d329c82081604154530", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `first_air_date` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_language` TEXT, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `seasons` TEXT, `status` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e52e100e7bfc5d329c82081604154530')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/20.json ================================================ { "formatVersion": 1, "database": { "version": 20, "identityHash": "8279f91be4c0d700c1f0aec994bd5375", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `urlString` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '8279f91be4c0d700c1f0aec994bd5375')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/21.json ================================================ { "formatVersion": 1, "database": { "version": 21, "identityHash": "6c4feea74dfccbdfe2c6552af9c5354f", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '6c4feea74dfccbdfe2c6552af9c5354f')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/22.json ================================================ { "formatVersion": 1, "database": { "version": 22, "identityHash": "d115ad8a61aa31d89423122f4aa92bef", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd115ad8a61aa31d89423122f4aa92bef')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/23.json ================================================ { "formatVersion": 1, "database": { "version": 23, "identityHash": "a0bbc978153e637904929ea13844473e", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a0bbc978153e637904929ea13844473e')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/24.json ================================================ { "formatVersion": 1, "database": { "version": 24, "identityHash": "561cb3fd64265ed78934319e2c94bd96", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '561cb3fd64265ed78934319e2c94bd96')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/25.json ================================================ { "formatVersion": 1, "database": { "version": 25, "identityHash": "2be09190b63be5b52ac6c0e6c5356be3", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `logo_path` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `logo_path` TEXT DEFAULT '', `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '2be09190b63be5b52ac6c0e6c5356be3')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/26.json ================================================ { "formatVersion": 1, "database": { "version": 26, "identityHash": "99fb2eb83ccb2c0c2666022170d6c67f", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `logo_path` TEXT DEFAULT '', `disabled` INTEGER NOT NULL DEFAULT 0, `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `logo_path` TEXT DEFAULT '', `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `disabled` INTEGER NOT NULL DEFAULT 0, `gd_id` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '99fb2eb83ccb2c0c2666022170d6c67f')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/27.json ================================================ { "formatVersion": 1, "database": { "version": 27, "identityHash": "4cf471989e9c84dd1effa1f15216c613", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `logo_path` TEXT DEFAULT '', `disabled` INTEGER NOT NULL DEFAULT 0, `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT, `disabled` INTEGER NOT NULL DEFAULT 0)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `logo_path` TEXT DEFAULT '', `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `disabled` INTEGER NOT NULL DEFAULT 0, `gd_id` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '4cf471989e9c84dd1effa1f15216c613')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/28.json ================================================ { "formatVersion": 1, "database": { "version": 28, "identityHash": "f68d7cbfd2ddff4cce4a16c128a6a157", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `logo_path` TEXT DEFAULT '', `index_id` INTEGER NOT NULL DEFAULT 0, `disabled` INTEGER NOT NULL DEFAULT 0, `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "index_id", "columnName": "index_id", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT, `disabled` INTEGER NOT NULL DEFAULT 0)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `logo_path` TEXT DEFAULT '', `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER DEFAULT 0, `size` TEXT, `urlString` TEXT, `index_id` INTEGER NOT NULL DEFAULT 0, `disabled` INTEGER NOT NULL DEFAULT 0, `gd_id` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false, "defaultValue": "0" }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "index_id", "columnName": "index_id", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'f68d7cbfd2ddff4cce4a16c128a6a157')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/29.json ================================================ { "formatVersion": 1, "database": { "version": 29, "identityHash": "c6309fec0dd689975366aaf8744427ff", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER NOT NULL, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `logo_path` TEXT DEFAULT '', `index_id` INTEGER NOT NULL DEFAULT 0, `addToList` INTEGER NOT NULL DEFAULT 0, `disabled` INTEGER NOT NULL DEFAULT 0, `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "index_id", "columnName": "index_id", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "addToList", "columnName": "addToList", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT, `disabled` INTEGER NOT NULL DEFAULT 0)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `addToList` INTEGER NOT NULL DEFAULT 0, `logo_path` TEXT DEFAULT '', `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "addToList", "columnName": "addToList", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER NOT NULL, `size` TEXT, `urlString` TEXT, `index_id` INTEGER NOT NULL DEFAULT 0, `disabled` INTEGER NOT NULL DEFAULT 0, `gd_id` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "index_id", "columnName": "index_id", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c6309fec0dd689975366aaf8744427ff')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/30.json ================================================ { "formatVersion": 1, "database": { "version": 30, "identityHash": "2e3e519f236c609767841a095fe5bd36", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT, `code` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false }, { "fieldPath": "code", "columnName": "code", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Movie", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileidForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `gd_id` TEXT DEFAULT '', `logo_path` TEXT DEFAULT '', `index_id` INTEGER NOT NULL DEFAULT 0, `addToList` INTEGER NOT NULL DEFAULT 0, `disabled` INTEGER NOT NULL DEFAULT 0, `Played` INTEGER NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `budget` INTEGER NOT NULL, `genres` TEXT, `homepage` TEXT, `id` INTEGER NOT NULL, `imdb_id` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `revenue` INTEGER NOT NULL, `runtime` INTEGER NOT NULL, `status` TEXT, `tagline` TEXT, `title` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileidForDB", "columnName": "fileidForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "index_id", "columnName": "index_id", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "addToList", "columnName": "addToList", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "budget", "columnName": "budget", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "imdb_id", "columnName": "imdb_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "revenue", "columnName": "revenue", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileidForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT, `indexType` TEXT, `folderType` TEXT, `disabled` INTEGER NOT NULL DEFAULT 0)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "indexType", "columnName": "indexType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "folderType", "columnName": "folderType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShow", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `addToList` INTEGER NOT NULL DEFAULT 0, `logo_path` TEXT DEFAULT '', `homepage` TEXT, `first_air_date` TEXT, `id` INTEGER NOT NULL, `in_production` INTEGER NOT NULL, `last_air_date` TEXT, `name` TEXT, `number_of_episodes` INTEGER NOT NULL, `number_of_seasons` INTEGER NOT NULL, `original_name` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `original_language` TEXT, `poster_path` TEXT, `status` TEXT, `seasons` TEXT, `tagline` TEXT, `type` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, `genres` TEXT)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "addToList", "columnName": "addToList", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "logo_path", "columnName": "logo_path", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "homepage", "columnName": "homepage", "affinity": "TEXT", "notNull": false }, { "fieldPath": "first_air_date", "columnName": "first_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "in_production", "columnName": "in_production", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "last_air_date", "columnName": "last_air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "number_of_episodes", "columnName": "number_of_episodes", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "number_of_seasons", "columnName": "number_of_seasons", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "original_name", "columnName": "original_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": false }, { "fieldPath": "seasons", "columnName": "seasons", "affinity": "TEXT", "notNull": false }, { "fieldPath": "tagline", "columnName": "tagline", "affinity": "TEXT", "notNull": false }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "genres", "columnName": "genres", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "TVShowSeasonDetails", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idfordb` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `_id` TEXT, `air_date` TEXT, `episodes` TEXT, `name` TEXT, `overview` TEXT, `id` INTEGER NOT NULL, `poster_path` TEXT, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idfordb", "columnName": "idfordb", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "_id", "columnName": "_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episodes", "columnName": "episodes", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idfordb" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Episode", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`idForDB` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fileName` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `index_id` INTEGER NOT NULL DEFAULT 0, `disabled` INTEGER NOT NULL DEFAULT 0, `gd_id` TEXT DEFAULT '', `Played` INTEGER NOT NULL, `season_id` INTEGER NOT NULL, `air_date` TEXT, `episode_number` INTEGER NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `overview` TEXT, `production_code` TEXT, `runtime` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `show_id` INTEGER NOT NULL, `still_path` TEXT, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "idForDB", "columnName": "idForDB", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fileName", "columnName": "fileName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "index_id", "columnName": "index_id", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "disabled", "columnName": "disabled", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "gd_id", "columnName": "gd_id", "affinity": "TEXT", "notNull": false, "defaultValue": "''" }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_id", "columnName": "season_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "air_date", "columnName": "air_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "episode_number", "columnName": "episode_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "production_code", "columnName": "production_code", "affinity": "TEXT", "notNull": false }, { "fieldPath": "runtime", "columnName": "runtime", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "season_number", "columnName": "season_number", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "show_id", "columnName": "show_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "still_path", "columnName": "still_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "idForDB" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '2e3e519f236c609767841a095fe5bd36')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/5.json ================================================ { "formatVersion": 1, "database": { "version": 5, "identityHash": "871dacadfe3b813019c74fcaff8c4237", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL, PRIMARY KEY(`urlString`))", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "urlString" ], "autoGenerate": false }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '871dacadfe3b813019c74fcaff8c4237')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/6.json ================================================ { "formatVersion": 1, "database": { "version": 6, "identityHash": "e7e8f2094f612b155f61f46396c10450", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e7e8f2094f612b155f61f46396c10450')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/7.json ================================================ { "formatVersion": 1, "database": { "version": 7, "identityHash": "a3191ca2c9aec41d6069b616bb985e84", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a3191ca2c9aec41d6069b616bb985e84')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/8.json ================================================ { "formatVersion": 1, "database": { "version": 8, "identityHash": "f4bba22419bf9b41ada2d7c30d66c102", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `genre_ids` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "genre_ids", "columnName": "genre_ids", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'f4bba22419bf9b41ada2d7c30d66c102')" ] } } ================================================ FILE: app/schemas/com.theflexproject.thunder.database.AppDatabase/9.json ================================================ { "formatVersion": 1, "database": { "version": 9, "identityHash": "a3191ca2c9aec41d6069b616bb985e84", "entities": [ { "tableName": "ResFormat", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `data` TEXT, `nextPageToken` TEXT, `curPageIndex` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "data", "columnName": "data", "affinity": "TEXT", "notNull": false }, { "fieldPath": "nextPageToken", "columnName": "nextPageToken", "affinity": "TEXT", "notNull": false }, { "fieldPath": "curPageIndex", "columnName": "curPageIndex", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "File", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`fileid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `id` TEXT, `name` TEXT, `mimeType` TEXT, `modifiedTime` INTEGER, `size` TEXT, `urlString` TEXT, `Played` INTEGER NOT NULL, `title` TEXT, `adult` INTEGER NOT NULL, `backdrop_path` TEXT, `original_language` TEXT, `original_title` TEXT, `overview` TEXT, `popularity` REAL NOT NULL, `poster_path` TEXT, `release_date` TEXT, `video` INTEGER NOT NULL, `vote_average` REAL NOT NULL, `vote_count` INTEGER NOT NULL)", "fields": [ { "fieldPath": "fileid", "columnName": "fileid", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "mimeType", "columnName": "mimeType", "affinity": "TEXT", "notNull": false }, { "fieldPath": "modifiedTime", "columnName": "modifiedTime", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "TEXT", "notNull": false }, { "fieldPath": "urlString", "columnName": "urlString", "affinity": "TEXT", "notNull": false }, { "fieldPath": "Played", "columnName": "Played", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "title", "columnName": "title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "adult", "columnName": "adult", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "backdrop_path", "columnName": "backdrop_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_language", "columnName": "original_language", "affinity": "TEXT", "notNull": false }, { "fieldPath": "original_title", "columnName": "original_title", "affinity": "TEXT", "notNull": false }, { "fieldPath": "overview", "columnName": "overview", "affinity": "TEXT", "notNull": false }, { "fieldPath": "popularity", "columnName": "popularity", "affinity": "REAL", "notNull": true }, { "fieldPath": "poster_path", "columnName": "poster_path", "affinity": "TEXT", "notNull": false }, { "fieldPath": "release_date", "columnName": "release_date", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "vote_average", "columnName": "vote_average", "affinity": "REAL", "notNull": true }, { "fieldPath": "vote_count", "columnName": "vote_count", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "fileid" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "IndexLink", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `link` TEXT, `username` TEXT, `password` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "link", "columnName": "link", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "id" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a3191ca2c9aec41d6069b616bb985e84')" ] } } ================================================ FILE: app/src/androidTest/java/com/theflexproject/thunder/ExampleInstrumentedTest.java ================================================ package com.theflexproject.thunder; import static org.junit.Assert.assertEquals; import android.content.Context; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.platform.app.InstrumentationRegistry; import org.junit.Test; import org.junit.runner.RunWith; /** * Instrumented test, which will execute on an Android device. * * @see Testing documentation */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.myapplication", appContext.getPackageName()); } } ================================================ FILE: app/src/main/AndroidManifest.xml ================================================ ================================================ FILE: app/src/main/java/com/theflexproject/thunder/Constants.java ================================================ package com.theflexproject.thunder; import java.util.Random; public class Constants { public static final String TMDB_GET_REQUEST_BASE_URL ="https://api.themoviedb.org/3/search/movie?api_key="; public static final String TMDB_BASE_URL = "https://api.themoviedb.org/3/"; public static final String TMDB_IMAGE_BASE_URL = "https://image.tmdb.org/t/p/w500"; public static final String TMDB_BACKDROP_IMAGE_BASE_URL = "https://image.tmdb.org/t/p/w1280"; public static final String FANART_IMAGE_BASE_URL = "https://webservice.fanart.tv/v3/"; public static final String TMDB_API_KEY = ""; public static final String SIMPLE_PROGRAM_DOWNLOAD_API = "https://geolocation.zindex.eu.org/generate.json?id="; public static final String CF_CACHE_TOKEN = ""; public static String getFanartApiKey(){ final String[] KEYS = { "", "", ""}; Random random = new Random(); int index = random.nextInt(KEYS.length); return KEYS[index]; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/MainActivity.java ================================================ package com.theflexproject.thunder; import static com.theflexproject.thunder.utils.UpdateUtils.checkForUpdates; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.WindowManager; import androidx.appcompat.app.AppCompatActivity; import androidx.room.Room; import androidx.work.Constraints; import androidx.work.NetworkType; import androidx.work.OneTimeWorkRequest; import androidx.work.WorkManager; import com.google.android.material.bottomnavigation.BottomNavigationView; import com.theflexproject.thunder.database.AppDatabase; import com.theflexproject.thunder.fragments.HomeFragment; import com.theflexproject.thunder.fragments.LibraryFragment; import com.theflexproject.thunder.fragments.SearchFragment; import com.theflexproject.thunder.fragments.SettingsFragment; import com.theflexproject.thunder.utils.RefreshWorker; import java.util.Calendar; import java.util.concurrent.TimeUnit; import eightbitlab.com.blurview.BlurView; import eightbitlab.com.blurview.RenderScriptBlur; public class MainActivity extends AppCompatActivity { BottomNavigationView bottomNavigationView; HomeFragment homeFragment = new HomeFragment(); SearchFragment searchFragment = new SearchFragment(); LibraryFragment libraryFragment = new LibraryFragment(); SettingsFragment settingsFragment = new SettingsFragment(); BlurView blurView; ViewGroup rootView; View decorView; public static Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(1); setContentView(R.layout.activity_main); context = getApplicationContext(); initWidgets(); setUpBottomNavigationView(); getSupportFragmentManager().beginTransaction().replace(R.id.container , homeFragment).commit(); checkForUpdates(this); AppDatabase db = Room.databaseBuilder(getApplicationContext() , AppDatabase.class , "MyToDos") // .fallbackToDestructiveMigration() .build(); //refresh index if set SharedPreferences sharedPreferences = getSharedPreferences("Settings", Context.MODE_PRIVATE); boolean savedREF = sharedPreferences.getBoolean("REFRESH_SETTING", false); int savedTime = sharedPreferences.getInt("REFRESH_TIME", 0); if(savedREF){ scheduleWork(savedTime,0); // WorkManager.getInstance(context).cancelAllWork(); // OneTimeWorkRequest impWork = new OneTimeWorkRequest.Builder(RefreshWorker.class) // .setInitialDelay(8,TimeUnit.HOURS) // .build(); // PeriodicWorkRequest periodicWork = new PeriodicWorkRequest.Builder(RefreshWorker.class, 24, TimeUnit.HOURS) // .setInitialDelay(24,TimeUnit.HOURS) // .build(); // WorkManager.getInstance(this).enqueue(impWork); } } @Override public void onBackPressed() { if (getSupportFragmentManager().getBackStackEntryCount() > 0) getSupportFragmentManager().popBackStackImmediate(); else super.onBackPressed(); } private void initWidgets() { blurView = findViewById(R.id.blurView); decorView = getWindow().getDecorView(); rootView = decorView.findViewById(android.R.id.content); bottomNavigationView = findViewById(R.id.bottom_navigation); blurBottom(); } private void setUpBottomNavigationView() { bottomNavigationView.setOnItemSelectedListener(item -> { if(item.getItemId()==R.id.homeFragment){ getSupportFragmentManager() .beginTransaction() .setCustomAnimations(R.anim.from_right,R.anim.to_left,R.anim.from_left,R.anim.to_right) .replace(R.id.container , homeFragment) .commit(); return true; }else if(item.getItemId()==R.id.searchFragment){ getSupportFragmentManager() .beginTransaction() .setCustomAnimations(R.anim.from_right,R.anim.to_left,R.anim.from_left,R.anim.to_right) .replace(R.id.container , searchFragment) .commit(); return true; }else if(item.getItemId()==R.id.libraryFragment){ getSupportFragmentManager() .beginTransaction() .setCustomAnimations(R.anim.from_right,R.anim.to_left,R.anim.from_left,R.anim.to_right) .replace(R.id.container , libraryFragment) .commit(); return true; }else if(item.getItemId()==R.id.settingsFragment){ getSupportFragmentManager() .beginTransaction() .setCustomAnimations(R.anim.from_right,R.anim.to_left,R.anim.from_left,R.anim.to_right) .replace(R.id.container , settingsFragment) .commit(); return true; } return false; }); } private void blurBottom() { getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS , WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); getWindow().setStatusBarColor(Color.TRANSPARENT); final float radius = 12f; final Drawable windowBackground = getWindow().getDecorView().getBackground(); blurView.setupWith(rootView , new RenderScriptBlur(this)) .setFrameClearDrawable(windowBackground) .setBlurRadius(radius); blurView.setOutlineProvider(ViewOutlineProvider.BACKGROUND); blurView.setClipToOutline(true); } private void scheduleWork(int hour, int minute) { Calendar calendar = Calendar.getInstance(); long nowMillis = calendar.getTimeInMillis(); if(calendar.get(Calendar.HOUR_OF_DAY) > hour || (calendar.get(Calendar.HOUR_OF_DAY) == hour && calendar.get(Calendar.MINUTE)+1 >= minute)) { calendar.add(Calendar.DAY_OF_MONTH, 1); } calendar.set(Calendar.HOUR_OF_DAY,hour); calendar.set(Calendar.MINUTE,minute); calendar.set(Calendar.SECOND,0); calendar.set(Calendar.MILLISECOND,0); long diff = calendar.getTimeInMillis() - nowMillis; WorkManager mWorkManager = WorkManager.getInstance(context); Constraints constraints = new Constraints.Builder() .setRequiredNetworkType(NetworkType.CONNECTED) .build(); mWorkManager.cancelAllWork(); OneTimeWorkRequest mRequest = new OneTimeWorkRequest.Builder(RefreshWorker.class) .setConstraints(constraints) .setInitialDelay(diff,TimeUnit.MILLISECONDS) .build(); mWorkManager.enqueue(mRequest); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/SplashScreenActivity.java ================================================ package com.theflexproject.thunder; import android.content.Intent; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; public class SplashScreenActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); startActivity(new Intent(SplashScreenActivity.this, MainActivity.class)); finish(); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/ArchivedAdapters/HomeItemAdapter.java ================================================ //package com.theflexproject.thunder.adapter; // //import android.content.Context; //import android.view.LayoutInflater; //import android.view.View; //import android.view.ViewGroup; //import android.view.animation.Animation; //import android.view.animation.AnimationUtils; //import android.widget.TextView; // //import androidx.annotation.NonNull; //import androidx.fragment.app.FragmentActivity; //import androidx.recyclerview.widget.LinearLayoutManager; //import androidx.recyclerview.widget.RecyclerView; // //import com.theflexproject.thunder.R; //import com.theflexproject.thunder.fragments.MovieDetailsFragment; //import com.theflexproject.thunder.fragments.TvShowDetailsFragment; //import com.theflexproject.thunder.model.Movie; //import com.theflexproject.thunder.model.TVShowInfo.TVShow; //import com.theflexproject.thunder.utils.Pair; //import com.theflexproject.thunder.utils.PairMovies; //import com.theflexproject.thunder.utils.PairTvShows; // //import java.util.ArrayList; //import java.util.List; // //public class HomeItemAdapter extends RecyclerView.Adapter { // // // Context context; // private RecyclerView.RecycledViewPool viewPool = new RecyclerView.RecycledViewPool(); // // List pairList; // List pairMoviesList = new ArrayList<>(); // List pairTvShowsList = new ArrayList<>(); // int cutList; // // List mediaList; // MovieRecyclerAdapter.OnItemClickListener listenerMovieItem; // MovieRecyclerAdapter movieRecyclerAdapter; // // List tvShowList; // TVShowRecyclerAdapter.OnItemClickListener listenerTvItem; // TVShowRecyclerAdapter tvShowRecyclerAdapter; // // // public HomeItemAdapter(Context context , List pairList , int cutList) { // this.context = context; // this.pairList = pairList; // this.cutList = cutList; // for (int i = 0; i < pairList.size(); i++) { // if (i < cutList) { // pairMoviesList.add((PairMovies) pairList.get(i)); // } else { // pairTvShowsList.add((PairTvShows) pairList.get(i)); // } // } // } // // @NonNull // @Override // public HomeItemAdapterHolder onCreateViewHolder(@NonNull ViewGroup parent , int viewType) { // View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.home_item , parent , false); // return new HomeItemAdapterHolder(view); // } // // @Override // public void onBindViewHolder(@NonNull HomeItemAdapterHolder holder , int position) { // if(position { // // Context context; // List mediaList; // private OnItemClickListener listener; // // public MovieRecyclerAdapter(Context context, List mediaList, OnItemClickListener listener) { // this.context = context; // this.mediaList = mediaList; // this.listener= listener; // } // // @NonNull // @Override // public MovieRecyclerHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { // View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.movie_item_recycler, parent, false); // return new MovieRecyclerHolder(view); // } // // @Override // public void onBindViewHolder(@NonNull MovieRecyclerHolder holder, int position) { // holder.name.setText(mediaList.get(position).getTitle()); // // Glide.with(context) // .load(TMDB_IMAGE_BASE_URL+mediaList.get(position).getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) // .into(holder.poster); // } // // @Override // public int getItemCount() { // return (mediaList==null)?0:mediaList.size(); // } // // public class MovieRecyclerHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ // // TextView name; // ImageView poster; // public MovieRecyclerHolder(@NonNull View itemView) { // super(itemView); // name = itemView.findViewById(R.id.movieName); // poster= itemView.findViewById(R.id.moviePoster2); // itemView.setOnClickListener(this); // } // // // @Override // public void onClick(View v) { // listener.onClick(v,getAbsoluteAdapterPosition()); // } // // } // public interface OnItemClickListener { // public void onClick(View view, int position); // } //} ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/ArchivedAdapters/MovieRecyclerAdapterLibrary.java ================================================ //package com.theflexproject.thunder.adapter; // //import android.content.Context; //import android.graphics.Color; //import android.graphics.drawable.ColorDrawable; //import android.view.LayoutInflater; //import android.view.View; //import android.view.ViewGroup; //import android.view.animation.Animation; //import android.view.animation.AnimationUtils; //import android.widget.ImageView; //import android.widget.TextView; // //import androidx.annotation.NonNull; //import androidx.recyclerview.widget.RecyclerView; // //import com.bumptech.glide.Glide; //import com.bumptech.glide.load.resource.bitmap.RoundedCorners; //import com.bumptech.glide.request.RequestOptions; //import com.theflexproject.thunder.Constants; //import com.theflexproject.thunder.R; //import com.theflexproject.thunder.model.Movie; // //import java.util.List; // // // //public class MovieRecyclerAdapterLibrary extends RecyclerView.Adapter { // // Context context; // List mediaList; // private MovieRecyclerAdapterLibrary.OnItemClickListener listener; // // public MovieRecyclerAdapterLibrary(Context context, List mediaList, MovieRecyclerAdapterLibrary.OnItemClickListener listener) { // this.context = context; // this.mediaList = mediaList; // this.listener= listener; // } // // @NonNull // @Override // public MovieRecyclerAdapterLibraryHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { // View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.movie_item_library, parent, false); // return new MovieRecyclerAdapterLibraryHolder(view); // } // // @Override // public void onBindViewHolder(@NonNull MovieRecyclerAdapterLibraryHolder holder, int position) { // if(mediaList.get(position).getTitle()!=null){ // holder.name.setText(mediaList.get(position).getTitle()); // Glide.with(context) // .load(Constants.TMDB_IMAGE_BASE_URL+mediaList.get(position).getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) // .into(holder.poster); // }else{ // holder.name.setText(mediaList.get(position).getFileName()); // Glide.with(context).clear(holder.poster); // } // // String year = mediaList.get(position).getRelease_date(); // if(year!=null&&year.length()>4) { // holder.movieYear.setVisibility(View.VISIBLE); // holder.movieYear.setText(year.substring(0,year.indexOf('-'))); // }else { // holder.movieYear.setVisibility(View.VISIBLE); // holder.movieYear.setText(year); // } // // setAnimation(holder.itemView,position); // // } // // // // @Override // public int getItemCount() { // return (mediaList==null)?0:mediaList.size(); // } // // // // public class MovieRecyclerAdapterLibraryHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ // // TextView name; // ImageView poster; // TextView movieYear; // public MovieRecyclerAdapterLibraryHolder(@NonNull View itemView) { // super(itemView); // name = itemView.findViewById(R.id.movieName); // poster= itemView.findViewById(R.id.moviePoster2); // movieYear = itemView.findViewById(R.id.movieYear); // itemView.setOnClickListener(this); // } // // @Override // public void onClick(View v) { // listener.onClick(v,getAbsoluteAdapterPosition()); // } // } // public interface OnItemClickListener { // public void onClick(View view, int position); // } // // // private void setAnimation(View itemView , int position){ // Animation popIn = AnimationUtils.loadAnimation(context,R.anim.pop_in); // itemView.startAnimation(popIn); // } //} ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/ArchivedAdapters/TVShowRecyclerAdapter.java ================================================ package com.theflexproject.thunder.adapter.ArchivedAdapters; //public class MediaAdapter extends RecyclerView.Adapter { // // Context context; // List mediaList; // private TVShowRecyclerAdapter.OnItemClickListener listener; // //// List tvShowList; //// List seasonsList; //// boolean isSeason; // // public TVShowRecyclerAdapter(Context context, List mediaList, TVShowRecyclerAdapter.OnItemClickListener listener) { // this.context = context; // this.mediaList = mediaList; // this.listener= listener; // } // //// public TVShowRecyclerAdapter(Context context, List seasonsList, boolean isSeason, TVShowRecyclerAdapter.OnItemClickListener listener) { //// //for using as season adapter //// this.isSeason =isSeason; //// this.context = context; //// this.seasonsList = seasonsList; //// this.listener= listener; //// } // // @NonNull // @Override // public TVShowRecyclerAdapterHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { // View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.tvshow_item, parent, false); // return new TVShowRecyclerAdapterHolder(view); // } // // @Override // public void onBindViewHolder(@NonNull TVShowRecyclerAdapterHolder holder, int position) { // // if(mediaList.get(position) instanceof TVShow){ // TVShow tvShow = ((TVShow)mediaList.get(position)); // if(tvShow.getName()!=null){ // holder.name.setText(tvShow.getName()); // Glide.with(context) // .load(Constants.TMDB_IMAGE_BASE_URL+tvShow.getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) // .into(holder.poster); // } // } // if(mediaList.get(position) instanceof TVShowSeasonDetails){ // TVShowSeasonDetails tvShowSeason = ((TVShowSeasonDetails)mediaList.get(position)); // if(tvShowSeason.getName()!=null){ // holder.name.setText(tvShowSeason.getName()); // String poster_path =null; // if(tvShowSeason.getPoster_path()!=null){ // poster_path = tvShowSeason.getPoster_path(); // Glide.with(context) // .load(Constants.TMDB_IMAGE_BASE_URL+poster_path) // .placeholder(new ColorDrawable(Color.BLACK)) // .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) // .into(holder.poster); // } // // } // } // // // setAnimation(holder.itemView,position); // // } // // // // @Override // public int getItemCount() { // return mediaList.size(); // } // // // // public class TVShowRecyclerAdapterHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ // // TextView name; // ImageView poster; // public TVShowRecyclerAdapterHolder(@NonNull View itemView) { // super(itemView); // name = itemView.findViewById(R.id.tvShowName); // poster= itemView.findViewById(R.id.tvShowPoster); // itemView.setOnClickListener(this); // } // // @Override // public void onClick(View v) { // listener.onClick(v,getAbsoluteAdapterPosition()); // } // } // public interface OnItemClickListener { // public void onClick(View view, int position); // } // // // private void setAnimation(View itemView , int position){ // Animation popIn = AnimationUtils.loadAnimation(context,R.anim.pop_in); // itemView.startAnimation(popIn); // } //} ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/BannerRecyclerAdapter.java ================================================ package com.theflexproject.thunder.adapter; import static com.theflexproject.thunder.Constants.TMDB_IMAGE_BASE_URL; import android.content.Context; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.request.RequestOptions; import com.theflexproject.thunder.R; import com.theflexproject.thunder.model.Movie; import java.util.List; public class BannerRecyclerAdapter extends RecyclerView.Adapter { Context context; List mediaList; private BannerRecyclerAdapter.OnItemClickListener listener; public BannerRecyclerAdapter(Context context, List mediaList, BannerRecyclerAdapter.OnItemClickListener listener) { this.context = context; this.mediaList = mediaList; this.listener = listener; } @NonNull @Override public MovieViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.movie_item_banner, parent, false); return new MovieViewHolder(view); } @Override public void onBindViewHolder(@NonNull MovieViewHolder holder, int position) { if(mediaList.get(position).getBackdrop_path()!=null){ holder.name.setText(mediaList.get(position).getTitle()); Glide.with(context) .load(TMDB_IMAGE_BASE_URL +mediaList.get(position).getBackdrop_path()) .placeholder(new ColorDrawable(Color.BLACK)) .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) .into(holder.poster); } } @Override public int getItemCount() { return (mediaList==null)?0:mediaList.size(); } public class MovieViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ TextView name; ImageView poster; public MovieViewHolder(@NonNull View itemView) { super(itemView); name = itemView.findViewById(R.id.textView4); poster= itemView.findViewById(R.id.moviePoster); itemView.setOnClickListener(this); } @Override public void onClick(View v) { listener.onClick(v,getAbsoluteAdapterPosition()); } } public interface OnItemClickListener { public void onClick(View view, int position); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/EpisodeAdapter.java ================================================ package com.theflexproject.thunder.adapter; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.WindowManager; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.request.RequestOptions; import com.theflexproject.thunder.Constants; import com.theflexproject.thunder.R; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.player.PlayerActivity; import com.theflexproject.thunder.utils.StringUtils; import java.util.List; import eightbitlab.com.blurview.BlurView; import eightbitlab.com.blurview.RenderScriptBlur; public class EpisodeAdapter extends RecyclerView.Adapter { Context context; List episodeList; private EpisodeAdapter.OnItemClickListener listener; public EpisodeAdapter(Context context, List episodeList, EpisodeAdapter.OnItemClickListener listener) { this.context = context; this.episodeList = episodeList; this.listener= listener; } @NonNull @Override public EpisodeAdapterHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.episode_item, parent, false); return new EpisodeAdapterHolder(view); } @Override public void onBindViewHolder(@NonNull EpisodeAdapterHolder holder, @SuppressLint("RecyclerView") int position) { if(episodeList!=null){ Episode episode = episodeList.get(position); if(episode.getEpisode_number()>9){ holder.episodeNumber.setText("E"+episode.getEpisode_number()); }else { holder.episodeNumber.setText("E0"+episode.getEpisode_number()); } if(episode.getSeason_number()>9){ holder.seasonNumber.setText("S"+episode.getSeason_number()); }else {holder.seasonNumber.setText("S0"+episode.getSeason_number());} if(episode.getName()!=null){ holder.episodeName.setText(episode.getName()); } if(episode.getStill_path()!=null){ Glide.with(context) .load(Constants.TMDB_IMAGE_BASE_URL+episode.getStill_path()) .placeholder(new ColorDrawable(Color.BLACK)) .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) .into(holder.episodeStill); } if(episode.getOverview()!=null){ holder.overview.setText(episode.getOverview()); } if(episode.getRuntime()!=0){ String result = StringUtils.runtimeIntegerToString(episode.getRuntime()); holder.runtime.setVisibility(View.VISIBLE); holder.runtime.setText(result); } holder.play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { holder.playEpisode(episode); } }); } setAnimation(holder.itemView,position); } @Override public int getItemCount() { return episodeList.size(); } public class EpisodeAdapterHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ BlurView blurView; ViewGroup rootView; View decorView; TextView episodeName; ImageView episodeStill; TextView seasonNumber; TextView episodeNumber; TextView runtime; TextView overview; Button play; public EpisodeAdapterHolder(@NonNull View itemView) { super(itemView); blurView = itemView.findViewById(R.id.blurView3); decorView = ((Activity) context).getWindow().getDecorView(); rootView = decorView.findViewById(android.R.id.content); episodeName = itemView.findViewById(R.id.episodeNameInItem); episodeStill = itemView.findViewById(R.id.episodeStill); seasonNumber = itemView.findViewById(R.id.seasonNumberInItem); episodeNumber = itemView.findViewById(R.id.episodeNumberInItem); runtime = itemView.findViewById(R.id.RuntimeInItem); overview = itemView.findViewById(R.id.overviewDescInItem); play = itemView.findViewById(R.id.playInEpisodeItem); blurBottom(); itemView.setOnClickListener(this); } @Override public void onClick(View v) { listener.onClick(v,getAbsoluteAdapterPosition()); } private void playEpisode(Episode episode){ SharedPreferences sharedPreferences = itemView.getContext().getSharedPreferences("Settings" , Context.MODE_PRIVATE); boolean savedEXT = sharedPreferences.getBoolean("EXTERNAL_SETTING" , false); if (savedEXT) { //External Player addToLastPlayed(episode.getId()); Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(episode.getUrlString())); intent.setDataAndType(Uri.parse(episode.getUrlString()) , "video/*"); itemView.getContext().startActivity(intent); } else { //Play video addToLastPlayed(episode.getId()); Intent in = new Intent(itemView.getContext() , PlayerActivity.class); in.putExtra("url" , episode.getUrlString()); itemView.getContext().startActivity(in); Toast.makeText(itemView.getContext() , "Play" , Toast.LENGTH_LONG).show(); } } private void addToLastPlayed(int id) { Thread thread = new Thread(new Runnable() { @Override public void run() { DatabaseClient.getInstance(itemView.getContext()).getAppDatabase().episodeDao().updatePlayed(id); } }); thread.start(); } void blurBottom(){ ((Activity) context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); ((Activity) context).getWindow().setStatusBarColor(Color.TRANSPARENT); final float radius = 5f; final Drawable windowBackground = ((Activity) context).getWindow().getDecorView().getBackground(); blurView.setupWith(rootView, new RenderScriptBlur(context)) .setFrameClearDrawable(windowBackground) .setBlurRadius(radius); blurView.setOutlineProvider(ViewOutlineProvider.BACKGROUND); blurView.setClipToOutline(true); } } public interface OnItemClickListener { public void onClick(View view, int position); } private void setAnimation(View itemView , int position){ Animation popIn = AnimationUtils.loadAnimation(context,R.anim.pop_in); itemView.startAnimation(popIn); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/FileItemAdapter.java ================================================ package com.theflexproject.thunder.adapter; import static android.content.Context.DOWNLOAD_SERVICE; import android.annotation.SuppressLint; import android.app.Activity; import android.app.DownloadManager; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.net.Uri; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.WindowManager; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.RecyclerView; import com.theflexproject.thunder.R; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.fragments.ChangeTMDBFragment; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.player.PlayerActivity; import com.theflexproject.thunder.utils.MovieQualityExtractor; import com.theflexproject.thunder.utils.sizetoReadablesize; import java.util.List; import eightbitlab.com.blurview.BlurView; import eightbitlab.com.blurview.RenderScriptBlur; public class FileItemAdapter extends RecyclerView.Adapter { Context context; List mediaList; // private FileItemAdapter.OnItemClickListener listener; public FileItemAdapter(Context context, List mediaList) { this.context = context; this.mediaList = mediaList; // this.listener= listener; } @NonNull @Override public FileItemAdapterHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.file_item, parent, false); return new FileItemAdapterHolder(view); } @Override public void onBindViewHolder(@NonNull FileItemAdapterHolder holder, @SuppressLint("RecyclerView") int position) { if (mediaList.get(position) instanceof Movie) { if (((Movie)mediaList.get(position)).getUrlString() != null) { String link = ((Movie) mediaList.get(position)).getUrlString(); if(!link.contains("proxy")){ holder.link.setText(link); } holder.fileName.setText(((Movie)mediaList.get(position)).getFileName()); holder.size.setText(sizetoReadablesize.humanReadableByteCountBin(Long.parseLong(((Movie)mediaList.get(position)).getSize()))); } String qualityStr = MovieQualityExtractor.extractQualtiy(((Movie)mediaList.get(position)).getFileName()); if(qualityStr!=null){ holder.quality.setVisibility(View.VISIBLE); holder.quality.setText(qualityStr); } holder.play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { holder.playMedia(((Movie)mediaList.get(position)).getUrlString()); addToLastPlayed(); } private void addToLastPlayed() { Thread thread = new Thread(new Runnable() { @Override public void run() { DatabaseClient.getInstance(context).getAppDatabase().movieDao().updatePlayed(((Movie)mediaList.get(position)).getId()); } }); thread.start(); } }); holder.download.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { holder.downloadMedia(((Movie)mediaList.get(position)).getUrlString()); } }); holder.changeTMDB.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { holder.changeTMDBFragmet(mediaList.get(position)); } }); } if (mediaList.get(position) instanceof Episode) { if (((Episode)mediaList.get(position)).getUrlString() != null) { holder.link.setText(((Episode)mediaList.get(position)).getUrlString()); holder.fileName.setText(((Episode)mediaList.get(position)).getFileName()); holder.size.setText(sizetoReadablesize.humanReadableByteCountBin(Long.parseLong(((Episode)mediaList.get(position)).getSize()))); } String qualityStr = MovieQualityExtractor.extractQualtiy(((Episode)mediaList.get(position)).getFileName()); if(qualityStr!=null){ holder.quality.setVisibility(View.VISIBLE); holder.quality.setText(qualityStr); } holder.play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { holder.playMedia(((Episode)mediaList.get(position)).getUrlString()); addToLastPlayed(); } private void addToLastPlayed() { Thread thread = new Thread(new Runnable() { @Override public void run() { DatabaseClient.getInstance(context).getAppDatabase().episodeDao().updatePlayed(((Episode)mediaList.get(position)).getId()); } }); thread.start(); } }); holder.download.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { holder.downloadMedia(((Episode)mediaList.get(position)).getUrlString()); } }); holder.changeTMDB.setVisibility(View.GONE); // holder.changeTMDB.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { // holder.changeTMDBFragmet(mediaList.get(position)); // // } // }); } setAnimation(holder.itemView , position); } @Override public int getItemCount () { return mediaList.size(); } public class FileItemAdapterHolder extends RecyclerView.ViewHolder{ BlurView blurView; ViewGroup rootView; View decorView; TextView fileName; TextView link; TextView size; TextView quality; Button play; Button download; Button changeTMDB; SharedPreferences sharedPreferences = context.getSharedPreferences("Settings", Context.MODE_PRIVATE); boolean savedEXT = sharedPreferences.getBoolean("EXTERNAL_SETTING", false); public FileItemAdapterHolder(@NonNull View itemView) { super(itemView); blurView = itemView.findViewById(R.id.blurView2); decorView = ((Activity) context).getWindow().getDecorView(); rootView = decorView.findViewById(android.R.id.content); fileName = itemView.findViewById(R.id.fileNameInFileItem); link = itemView.findViewById(R.id.fileLinkInFileItem); size = itemView.findViewById(R.id.sizeTextInFileItem); quality = itemView.findViewById(R.id.videoQualityTextInFileItem); play = itemView.findViewById(R.id.playInFileItem); download = itemView.findViewById(R.id.downloadInFileItem); changeTMDB = itemView.findViewById(R.id.changeTMDBIdInFileItem); blurBottom(); // itemView.setOnClickListener(this); } private void playMedia(String url) { if (savedEXT) { //External Player Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(url)); intent.setDataAndType(Uri.parse(url) , "video/*"); context.startActivity(intent); } else { //Play video Intent in = new Intent(context , PlayerActivity.class); in.putExtra("url" , (url)); context.startActivity(in); Toast.makeText(context , "Play" , Toast.LENGTH_LONG).show(); } } private void downloadMedia(String url) { DownloadManager manager = (DownloadManager) context.getSystemService(DOWNLOAD_SERVICE); Uri uri = Uri.parse(url); DownloadManager.Request request = new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE) .setDescription("Downloading"); long reference = manager.enqueue(request); Toast.makeText(context,"Download Started",Toast.LENGTH_LONG).show(); } private void blurBottom(){ ((Activity) context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); ((Activity) context).getWindow().setStatusBarColor(Color.TRANSPARENT); final float radius = 5f; final Drawable windowBackground = ((Activity) context).getWindow().getDecorView().getBackground(); blurView.setupWith(rootView, new RenderScriptBlur(context)) .setFrameClearDrawable(windowBackground) .setBlurRadius(radius); blurView.setOutlineProvider(ViewOutlineProvider.BACKGROUND); blurView.setClipToOutline(true); } public void changeTMDBFragmet(MyMedia myMedia) { AppCompatActivity activity = (AppCompatActivity) itemView.getContext(); ChangeTMDBFragment changeTMDBFragment = new ChangeTMDBFragment(myMedia); activity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,changeTMDBFragment).addToBackStack(null).commit(); } } public interface OnItemClickListener { public void onClick(View view , int position); } private void setAnimation (View itemView ,int position){ Animation popIn = AnimationUtils.loadAnimation(context , R.anim.pop_in); itemView.startAnimation(popIn); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/FileItemDialogAdapter.java ================================================ package com.theflexproject.thunder.adapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.theflexproject.thunder.R; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.utils.MovieQualityExtractor; import java.util.List; public class FileItemDialogAdapter extends RecyclerView.Adapter { List mediaList; private FileItemDialogAdapter.OnItemClickListener listener; public FileItemDialogAdapter(List mediaList , FileItemDialogAdapter.OnItemClickListener listener) { this.mediaList = mediaList; this.listener= listener; } @NonNull @Override public FileItemDialogAdapterViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.dialog_filename_item, parent, false); return new FileItemDialogAdapterViewHolder(view); } @Override public void onBindViewHolder(@NonNull FileItemDialogAdapterViewHolder holder , int position) { if (mediaList.get(position) instanceof Movie) { if (((Movie)mediaList.get(position)).getUrlString() != null) { holder.fileName.setText(((Movie)mediaList.get(position)).getFileName()); } String qualityStr = MovieQualityExtractor.extractQualtiy(((Movie)mediaList.get(position)).getFileName()); if(qualityStr!=null){ holder.quality.setVisibility(View.VISIBLE); holder.quality.setText(qualityStr); } } if (mediaList.get(position) instanceof Episode) { if (((Episode)mediaList.get(position)).getUrlString() != null) { holder.fileName.setText(((Episode)mediaList.get(position)).getFileName()); } String qualityStr = MovieQualityExtractor.extractQualtiy(((Episode)mediaList.get(position)).getFileName()); if(qualityStr!=null){ holder.quality.setVisibility(View.VISIBLE); holder.quality.setText(qualityStr); } } } @Override public int getItemCount () { return mediaList.size(); } public class FileItemDialogAdapterViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { TextView fileName; TextView quality; public FileItemDialogAdapterViewHolder(@NonNull View itemView) { super(itemView); fileName = itemView.findViewById(R.id.fileName); quality = itemView.findViewById(R.id.quality); itemView.setOnClickListener(this); } @Override public void onClick(View v) {listener.onClick(v,getAbsoluteAdapterPosition());} } public interface OnItemClickListener { void onClick(View view , int position); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/FragmentViewPagerAdapter.java ================================================ package com.theflexproject.thunder.adapter; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.viewpager2.adapter.FragmentStateAdapter; import com.theflexproject.thunder.fragments.FilesLibraryFragment; import com.theflexproject.thunder.fragments.MovieLibraryFragment; import com.theflexproject.thunder.fragments.TvShowsLibraryFragment; public class FragmentViewPagerAdapter extends FragmentStateAdapter { public FragmentViewPagerAdapter(@NonNull Fragment fragment) { super(fragment); } @NonNull @Override public Fragment createFragment(int position) { if(position==0){ return new MovieLibraryFragment(); }else if(position==1){ return new TvShowsLibraryFragment(); }else { return new FilesLibraryFragment(); } } @Override public int getItemCount() { return 3; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/IndexAdapter.java ================================================ package com.theflexproject.thunder.adapter; import static com.theflexproject.thunder.utils.IndexUtils.deleteIndex; import static com.theflexproject.thunder.utils.IndexUtils.disableIndex; import static com.theflexproject.thunder.utils.IndexUtils.enableIndex; import static com.theflexproject.thunder.utils.IndexUtils.getNoOfMedia; import static com.theflexproject.thunder.utils.IndexUtils.refreshIndex; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.TextView; import android.widget.Toast; import androidx.appcompat.widget.SwitchCompat; import androidx.recyclerview.widget.RecyclerView; import com.theflexproject.thunder.R; import com.theflexproject.thunder.model.IndexLink; import java.util.List; public class IndexAdapter extends RecyclerView.Adapter { private Context mCtx; private List indexLinkList; public IndexAdapter(Context mCtx , List indexLinkList) { this.mCtx = mCtx; this.indexLinkList = indexLinkList; } @Override public IndexViewHolder onCreateViewHolder(ViewGroup parent , int viewType) { View view = LayoutInflater.from(mCtx).inflate(R.layout.index_item , parent , false); return new IndexViewHolder(view); } @Override public void onBindViewHolder(IndexViewHolder holder , int position) { IndexLink t = indexLinkList.get(position); holder.textViewLink.setText(t.getLink()); // holder.textViewUsername.setText(t.getUsername()); // holder.textViewPassword.setText(t.getPassword()); holder.indexType.setText(t.getIndexType()); holder.folderType.setText(t.getFolderType()); int noOfMedia = getNoOfMedia(holder.itemView.getContext(), t); String s = noOfMedia+" "+t.getFolderType(); holder.noOfMedia.setText(s); // if (t.getUsername().length() > 0 && t.getPassword().length() > 0) { // holder.textViewUsername.setVisibility(View.VISIBLE); // holder.textViewPassword.setVisibility(View.VISIBLE); // } holder.refreshIndex.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Toast.makeText(view.getContext() , "Refreshing...",Toast.LENGTH_LONG).show(); refreshIndex(holder.itemView.getContext() , t); } }); holder.delete.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(!deleteIndex(holder.itemView.getContext(), t)){ Toast.makeText(view.getContext() , "Deleted",Toast.LENGTH_LONG).show(); } } }); if(t.getDisabled()==1){ holder.enableIndex.setChecked(false); } holder.enableIndex.setOnCheckedChangeListener((buttonView , isChecked) -> { if(!isChecked){ System.out.println("disable index pressed"); disableIndex(holder.itemView.getContext(), t); } if(isChecked){ enableIndex(holder.itemView.getContext(), t); } }); // holder.actv.addTextChangedListener(new TextWatcher() { // // @Override // public void onTextChanged(CharSequence s, int start, int before, int count) { // String changeTo =s.toString(); // new Thread(new Runnable() { // @Override // public void run() { // if(changeTo.equals("GDIndex")){ // deleteIndex(t); // postRequestGDIndex(t.getLink(),t.getUsername(),t.getPassword(), !t.folderType.equals("Movies")); // }if(changeTo.equals("GoIndex")){ // deleteIndex(t); // postRequestGoIndex(t.getLink(),t.getUsername(),t.getPassword(), !t.folderType.equals("Movies")); // }if(changeTo.equals("Maple")){ // deleteIndex(t); // postRequestMapleIndex(t.getLink(),t.getUsername(),t.getPassword(), !t.folderType.equals("Movies")); // } // if(changeTo.equals("SimpleProgram")){ // deleteIndex(t); // postRequestSimpleProgramIndex(t.getLink(),t.getUsername(),t.getPassword(), !t.folderType.equals("Movies")); // } // } // }).start(); // // // } // // @Override // public void beforeTextChanged(CharSequence s, int start, int count, int after) { // // } // // @Override // public void afterTextChanged(Editable s) { // // } // }); } @Override public int getItemCount() { if (indexLinkList == null) { return 0; } return indexLinkList.size(); } protected class IndexViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { TextView textViewLink, textViewUsername, textViewPassword, indexType, folderType, noOfMedia; ImageButton refreshIndex; ImageButton delete; SwitchCompat enableIndex; public IndexViewHolder(View itemView) { super(itemView); textViewLink = itemView.findViewById(R.id.textViewLink); indexType = itemView.findViewById(R.id.indexTypeInIndexAdapter); folderType = itemView.findViewById(R.id.folderTypeInIndexAdapter); noOfMedia = itemView.findViewById(R.id.noOfMedia); refreshIndex = itemView.findViewById(R.id.refreshButton); delete = itemView.findViewById(R.id.deletebutton); enableIndex = itemView.findViewById(R.id.enableIndexToggle); itemView.setOnClickListener(this); } @Override public void onClick(View v) { } } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/MediaAdapter.java ================================================ package com.theflexproject.thunder.adapter; import android.content.Context; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.request.RequestOptions; import com.theflexproject.thunder.Constants; import com.theflexproject.thunder.R; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; import java.util.List; public class MediaAdapter extends RecyclerView.Adapter { Context context; List mediaList; private MediaAdapter.OnItemClickListener listener; public MediaAdapter(Context context, List mediaList, MediaAdapter.OnItemClickListener listener) { this.context = context; this.mediaList = mediaList; this.listener= listener; } @NonNull @Override public MediaAdapterHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.media_item, parent, false); return new MediaAdapterHolder(view); } @Override public void onBindViewHolder(@NonNull MediaAdapterHolder holder, int position) { if(mediaList.get(position) instanceof Movie) { Movie movie = ((Movie)mediaList.get(position)); if(movie.getTitle()==null){ holder.name.setText(movie.getFileName()); } else holder.name.setText(movie.getTitle()); if(movie.getPoster_path()!=null){ Glide.with(context) .load(Constants.TMDB_IMAGE_BASE_URL+movie.getPoster_path()) .placeholder(new ColorDrawable(Color.BLACK)) .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) .into(holder.poster); } String year = movie.getRelease_date(); if(year!=null&&year.length()>4) { holder.movieYear.setVisibility(View.VISIBLE); holder.movieYear.setText(year.substring(0,year.indexOf('-'))); }else { holder.movieYear.setVisibility(View.VISIBLE); holder.movieYear.setText(year); } } if(mediaList.get(position) instanceof TVShow){ TVShow tvShow = ((TVShow)mediaList.get(position)); if(tvShow.getName()!=null){ holder.name.setText(tvShow.getName()); Glide.with(context) .load(Constants.TMDB_IMAGE_BASE_URL+tvShow.getPoster_path()) .placeholder(new ColorDrawable(Color.BLACK)) .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) .into(holder.poster); } } if(mediaList.get(position) instanceof TVShowSeasonDetails){ TVShowSeasonDetails tvShowSeason = ((TVShowSeasonDetails)mediaList.get(position)); if(tvShowSeason.getName()!=null){ holder.name.setText(tvShowSeason.getName()); String poster_path = tvShowSeason.getPoster_path(); if(poster_path!=null){ Glide.with(context) .load(Constants.TMDB_IMAGE_BASE_URL+poster_path) .placeholder(new ColorDrawable(Color.BLACK)) .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) .into(holder.poster); } } } setAnimation(holder.itemView,position); } @Override public int getItemCount() { return mediaList.size(); } public class MediaAdapterHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ TextView name; ImageView poster; TextView movieYear; public MediaAdapterHolder(@NonNull View itemView) { super(itemView); name = itemView.findViewById(R.id.nameInMediaItem); poster= itemView.findViewById(R.id.posterInMediaItem); movieYear = itemView.findViewById(R.id.yearInMediaItem); itemView.setOnClickListener(this); } @Override public void onClick(View v) { listener.onClick(v,getAbsoluteAdapterPosition()); } } public interface OnItemClickListener { public void onClick(View view, int position); } private void setAnimation(View itemView , int position){ Animation popIn = AnimationUtils.loadAnimation(context,R.anim.pop_in); itemView.startAnimation(popIn); } } //package com.theflexproject.thunder.adapter; // //import static com.theflexproject.thunder.Constants.TMDB_IMAGE_BASE_URL; // //import android.content.Context; //import android.graphics.Color; //import android.graphics.drawable.ColorDrawable; //import android.view.LayoutInflater; //import android.view.View; //import android.view.ViewGroup; //import android.widget.ImageView; //import android.widget.TextView; // //import androidx.annotation.NonNull; //import androidx.recyclerview.widget.RecyclerView; // //import com.bumptech.glide.Glide; //import com.bumptech.glide.load.resource.bitmap.RoundedCorners; //import com.bumptech.glide.request.RequestOptions; //import com.theflexproject.thunder.Constants; //import com.theflexproject.thunder.R; //import com.theflexproject.thunder.model.Movie; //import com.theflexproject.thunder.model.MyMedia; //import com.theflexproject.thunder.model.TVShowInfo.TVShow; //import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; // //import java.util.List; // // //public class MediaAdapter extends RecyclerView.Adapter { // // Context context; // List mediaList; // private OnItemClickListener listener; // // public MediaAdapter(Context context, List mediaList) { // this.context = context; // this.mediaList = mediaList; // this.listener= listener; // } // // @NonNull // @Override // public MediaAdapterHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { // View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.media_item, parent, false); // return new MediaAdapterHolder(view); // } // // @Override // public void onBindViewHolder(@NonNull MediaAdapterHolder holder, int position) { // if(mediaList!=null){ // try { // if(((Movie)mediaList.get(position)).getTitle()!=null){ // holder.name.setText(((Movie)mediaList.get(position)).getTitle()); // Glide.with(context) // .load(TMDB_IMAGE_BASE_URL+((Movie)mediaList.get(position)).getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) // .into(holder.poster); // } // if(((TVShow)mediaList.get(position)).getNumber_of_seasons()>0){ // holder.name.setText(((TVShow)mediaList.get(position)).getName()); // Glide.with(context) // .load(Constants.TMDB_IMAGE_BASE_URL+((TVShow)mediaList.get(position)).getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) // .into(holder.poster); // } // else { // holder.name.setText(((TVShowSeasonDetails)mediaList.get(position)).getName()); // Glide.with(context) // .load(Constants.TMDB_IMAGE_BASE_URL+((TVShowSeasonDetails)mediaList.get(position)).getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) // .into(holder.poster); // } // }catch (ClassCastException e){ // System.out.println("Exception class cast"); // } // // } // // // // } // // @Override // public int getItemCount() { // return (mediaList==null)?0:mediaList.size(); // } // // public class MediaAdapterHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ // // TextView name; // ImageView poster; // public MediaAdapterHolder(@NonNull View itemView) { // super(itemView); // name = itemView.findViewById(R.id.mediaName); // poster= itemView.findViewById(R.id.mediaPoster); // itemView.setOnClickListener(this); // } // // // @Override // public void onClick(View v) { // listener.onClick(v,getAbsoluteAdapterPosition()); // } // // } // public interface OnItemClickListener { // public void onClick(View view, int position); // } //} ================================================ FILE: app/src/main/java/com/theflexproject/thunder/adapter/ScaleCenterItemLayoutManager.java ================================================ package com.theflexproject.thunder.adapter; import android.content.Context; import android.view.View; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; //public class ScaleCenterItemLayoutManager extends LinearLayoutManager { // public ScaleCenterItemLayoutManager(Context context, int orientation, boolean reverseLayout) { // super(context, orientation, reverseLayout); // } // // public ScaleCenterItemLayoutManager(Context context) { // super(context); // } // // @Override // public boolean checkLayoutParams(RecyclerView.LayoutParams lp) { // lp.width=getWidth()/3; // return true; // } // @Override // public void onLayoutCompleted(RecyclerView.State state){ // super.onLayoutCompleted(state); // scaleMiddleItem(); // } // // @Override // public int scrollHorizontallyBy(int dx, RecyclerView.Recycler recycler, RecyclerView.State state) { // int scolled = super.scrollHorizontallyBy(dx, recycler, state); // if(getOrientation()==RecyclerView.HORIZONTAL) { // scaleMiddleItem(); // return scolled; // } // else return 0; // } // private void scaleMiddleItem(){ // float mid = getWidth()/2.0f; // float d1 = 0.9f * mid; // for (int i = 0; i < getChildCount(); i++) { // View child = getChildAt(i); // float childMid = (getDecoratedRight(child)+getDecoratedLeft(child))/0.2f; // float d = Math.min(d1,Math.abs(mid-childMid)); // float scale = 1f - 0.15f * d/d1; // child.setScaleX(scale); // child.setScaleY(scale); // } // } //} public class ScaleCenterItemLayoutManager extends LinearLayoutManager { private final float mShrinkAmount = 0.15f; private final float mShrinkDistance = 0.9f; public ScaleCenterItemLayoutManager(Context context) { super(context); } public ScaleCenterItemLayoutManager(Context context, int orientation, boolean reverseLayout) { super(context, orientation, reverseLayout); } @Override public int scrollHorizontallyBy(int dx, RecyclerView.Recycler recycler, RecyclerView.State state) { int orientation = getOrientation(); if (orientation == HORIZONTAL) { int scrolled = super.scrollHorizontallyBy(dx, recycler, state); float midpoint = getWidth() / 2.f; float d0 = 0.f; float d1 = mShrinkDistance * midpoint; float s0 = 1.f; float s1 = 1.f - mShrinkAmount; for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); float childMidpoint = (getDecoratedRight(child) + getDecoratedLeft(child)) / 2.f; float d = Math.min(d1, Math.abs(midpoint - childMidpoint)); float scale = s0 + (s1 - s0) * (d - d0) / (d1 - d0); child.setScaleX(scale); child.setScaleY(scale); } return scrolled; } else { return 0; } } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/AppDatabase.java ================================================ package com.theflexproject.thunder.database; import androidx.room.AutoMigration; import androidx.room.Database; import androidx.room.RoomDatabase; import androidx.room.TypeConverters; import com.theflexproject.thunder.model.IndexLink; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.ResFormat; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; @Database(entities = {ResFormat.class, Movie.class, IndexLink.class, TVShow.class, TVShowSeasonDetails.class, Episode.class}, version = 30, autoMigrations = { @AutoMigration(from = 23, to = 24),@AutoMigration(from = 24, to = 25),@AutoMigration(from = 25, to = 26),@AutoMigration(from = 26, to = 27),@AutoMigration(from = 27, to = 28),@AutoMigration(from = 28, to = 29),@AutoMigration(from = 29, to = 30)}) @TypeConverters({Converters.class}) public abstract class AppDatabase extends RoomDatabase { public abstract ResFormatDao resFormatDao(); public abstract MovieDao movieDao(); public abstract TVShowDao tvShowDao(); public abstract EpisodeDao episodeDao(); public abstract TVShowSeasonDetailsDao tvShowSeasonDetailsDao(); public abstract IndexLinksDao indexLinksDao(); } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/Converters.java ================================================ package com.theflexproject.thunder.database; import android.util.Log; import androidx.room.TypeConverter; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.theflexproject.thunder.model.Data; import com.theflexproject.thunder.model.Genre; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.model.TVShowInfo.Season; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; public class Converters { @TypeConverter public static Date fromTimestamp(Long value) { return value == null ? null : new Date(value); } @TypeConverter public static Long dateToTimestamp(Date date) { return date == null ? null : date.getTime(); } @TypeConverter public static String fromData(Data data) { return data.toString(); } @TypeConverter public static Data fromStringToData(String string) { Gson gson = new Gson(); Data data = gson.fromJson(string , Data.class); return data; } // @TypeConverter // public static Long fromModifiedTime(Date date) { // if(date==null) return null; // return date.getTime(); // } // // @TypeConverter // public static Date fromLong(Long date) { // if(date==null) return null; // return new Date(date); // } @TypeConverter public static String fromEpisodes(ArrayList episodes) { if (episodes == null) { return null; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < episodes.size(); i++) { Episode e = episodes.get(i); sb.append(e.toString()); sb.append("\t"); } System.out.println("StringBuilder op" + sb.toString()); return sb.toString(); } @TypeConverter public static ArrayList fromStringToEpisodes(String episodesString) { if (episodesString == null) { return (null); } // Gson gson = new Gson(); // "Mon Oct 10 22:07:31 GMT+05:30 2022" // Gson gson = new GsonBuilder().setDateFormat("E MMM dd HH:mm:ss 'Z' yyyy").create(); // SimpleDateFormat df = new SimpleDateFormat("EE MMM dd HH:mm:ss zzzz yyyy"); Gson gson = new GsonBuilder().setDateFormat("E MMM dd HH:mm:ss z yyyy").create(); // ObjectMapper om = new ObjectMapper(); // ObjectMapper gson = new ObjectMapper(); // SimpleDateFormat df=new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy", Locale.US); // gson.setDateFormat(df); String[] arr = episodesString.split("\t"); ArrayList episodes = new ArrayList<>(); try { for (String s : arr) { Episode episode = gson.fromJson(s ,Episode.class); // Episode episode = gson.readValue(s , Episode.class); // System.out.println("Episode inside For Loop" + episode); episodes.add(episode); } } catch (Exception e) { System.out.println("episodesArr exception" + e); } // System.out.println("episodesString in Converter" + episodesString); // System.out.println("episodesList in Converter" + episodes); return episodes; } @TypeConverter public static String fromSeasons(ArrayList seasons) { if (seasons == null) { return null; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < seasons.size(); i++) { Season s = seasons.get(i); sb.append(s.toString()); sb.append("\t"); } System.out.println("StringBuilder op" + sb.toString()); return sb.toString(); } @TypeConverter public static ArrayList fromStringToSeasons(String seasonsString) { if (seasonsString == null) { return (null); } Gson gson = new Gson(); String[] arr = seasonsString.split("\t"); ArrayList seasons = new ArrayList<>(); try { for (String s : arr) { // System.out.println("arr element inside For Loop" + s); Season season = gson.fromJson(s , Season.class); // System.out.println("Season inside For Loop" + season); seasons.add(season); } } catch (Exception e) { Log.i("SeasonJson" , Arrays.toString(arr)); } System.out.println(seasons); // System.out.println("seasonString in Converter" + seasonsString); return seasons; } @TypeConverter public static String fromGenreList(ArrayList genres) { if (genres == null) { return null; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < genres.size(); i++) { Genre s = genres.get(i); sb.append(s.toString()); sb.append("\t"); } return sb.toString(); } @TypeConverter public static ArrayList fromStringToGenres(String genresString) { if (genresString == null) { return (null); } Gson gson = new Gson(); String[] arr = genresString.split("\t"); ArrayList genres = new ArrayList<>(); for (String s : arr) { Genre genre = gson.fromJson(s , Genre.class); genres.add(genre); } System.out.println(genres); return genres; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/DatabaseClient.java ================================================ package com.theflexproject.thunder.database; import android.content.Context; import androidx.room.Room; public class DatabaseClient { private Context mCtx; private static DatabaseClient mInstance; //our app database object private AppDatabase appDatabase; private DatabaseClient(Context mCtx) { this.mCtx = mCtx; //creating the app database with Room database builder //MyToDos is the name of the database appDatabase = Room.databaseBuilder(mCtx, AppDatabase.class, "MyToDos").build(); } public static synchronized DatabaseClient getInstance(Context mCtx) { if (mInstance == null) { mInstance = new DatabaseClient(mCtx); } return mInstance; } public AppDatabase getAppDatabase() { return appDatabase; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/EpisodeDao.java ================================================ package com.theflexproject.thunder.database; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import com.theflexproject.thunder.model.TVShowInfo.Episode; import java.util.List; @Dao public interface EpisodeDao { @Query("SELECT * FROM Episode ") List getAll(); @Query("SELECT * FROM Episode WHERE id LIKE :id and disabled =0") Episode find(int id); @Query("SELECT * FROM Episode WHERE fileName LIKE :fileName and disabled =0") Episode findByFileName(String fileName); @Query("SELECT * FROM Episode WHERE season_id=:season_id AND played=0 and disabled =0 order by episode_number limit 1 ") Episode getNextEpisodeInSeason(int season_id); @Query("SELECT * FROM Episode WHERE show_id=:show_id AND played=0 and disabled =0 order by season_number,episode_number limit 1") Episode getNextEpisodeInTVShow(int show_id); @Query("SELECT * FROM Episode WHERE id=:id and disabled =0") List byEpisodeId(int id); @Query("SELECT * FROM Episode WHERE id=:id and disabled =0 ORDER BY cast(size as unsigned) desc limit 1") Episode byEpisodeIdLargest(int id); @Query("UPDATE Episode SET played = 1 WHERE id = :episodeId and disabled =0") void updatePlayed(int episodeId); @Query("SELECT * FROM Episode WHERE show_id=:show_id AND season_id=:season_id and disabled =0 GROUP BY id ORDER BY episode_number ASC") List getFromThisSeason(int show_id, int season_id); @Query("SELECT * FROM Episode WHERE season_id=:season_id and disabled =0") List getFromSeasonOnly(int season_id); @Query("SELECT * FROM Episode WHERE show_id=:show_id and disabled =0") List getFromThisShow(long show_id); @Insert void insert(Episode... episodes); @Delete void delete(Episode episode); @Query("Delete from Episode where index_id = :index_id") void deleteAllFromThisIndex(int index_id); @Query("select * from Episode where index_id = :index_id and disabled =0") Episode findByLink(int index_id); @Query("Delete from Episode where urlString=:link ") void deleteByLink(String link); @Query("select count( distinct show_id ) from Episode where index_id = :index_id ") int getNoOfShows(int index_id); @Query("UPDATE Episode set disabled=1 WHERE index_id = :index_id") void disableFromThisIndex(int index_id); @Query("UPDATE Episode set disabled=0 WHERE index_id = :index_id") void enableFromThisIndex(int index_id); @Query("SELECT * FROM Episode WHERE show_id=:show_id and disabled =0 order by season_number,episode_number limit 1 ") Episode getFirstAvailableEpisode(long show_id); @Query("SELECT * FROM Episode WHERE gd_id =:id") Episode findByGdId(String id); @Query("DELETE FROM Episode WHERE gd_id =:id") void deleteByGdId(String id); } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/IndexLinksDao.java ================================================ package com.theflexproject.thunder.database; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import com.theflexproject.thunder.model.IndexLink; import java.util.List; @Dao public interface IndexLinksDao { @Query("SELECT * FROM IndexLink") List getAll(); @Query("SELECT * FROM IndexLink where disabled=0") List getAllEnabled(); @Query("SELECT * FROM IndexLink WHERE link=:link") IndexLink find(String link); @Insert void insert(IndexLink... indexLinks); @Delete void delete(IndexLink indexLink); @Query("DELETE FROM IndexLink WHERE id=:id") void deleteById(int id); @Query("Update indexlink set disabled=1 WHERE id=:index_id ") void disableIndex(int index_id); @Query("Update indexlink set disabled=0 WHERE id=:index_id ") void enableIndex(int index_id); } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/MovieDao.java ================================================ package com.theflexproject.thunder.database; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import com.theflexproject.thunder.model.Movie; import java.util.List; @Dao public interface MovieDao { @Query("SELECT * FROM Movie WHERE title is not null and disabled=0 GROUP BY title ") List getAll(); @Query("SELECT * FROM Movie WHERE id=:id and disabled=0") Movie byId(int id); @Query("SELECT * FROM Movie WHERE id=:id and disabled=0") List getAllById(int id); @Query("SELECT * FROM Movie WHERE id=:id and disabled=0 ORDER BY size DESC limit 1 ") Movie byIdLargest(int id); @Query("SELECT * FROM Movie WHERE (fileName LIKE '%' || :string || '%' OR title like '%' || :string || '%' OR urlString like '%' || :string || '%' or overview like '%' || :string || '%') and disabled=0") List getSearchQuery(String string); @Query("SELECT * FROM Movie WHERE fileName LIKE :fileName and disabled=0") Movie getByFileName(String fileName); @Query("SELECT * FROM Movie WHERE poster_path IS NOT NULL and disabled=0 and vote_count>5000 Group by title ORDER BY vote_average DESC Limit 10 ") List getTopRated(); @Query("SELECT * from Movie WHERE backdrop_path IS NOT NULL and disabled=0 Group by title ORDER BY modifiedTime DESC Limit 10") List getrecentlyadded(); @Query("SELECT * FROM Movie WHERE poster_path IS NOT NULL and disabled=0 Group by title ORDER BY release_date DESC Limit 10") List getrecentreleases(); @Insert void insert(Movie... movies); @Delete void delete(Movie movie); @Query("Delete from Movie where index_id = :index_id") void deleteAllFromthisIndex(int index_id); @Query("SELECT * FROM Movie WHERE Played = 1 and title is not null group by title and disabled=0") List getPlayed(); @Query("Update Movie set played = 1 where id =:id and disabled=0") void updatePlayed(int id); @Query("SELECT * FROM Movie WHERE title is NULL and disabled=0") List getFilesWithNoTitle(); @Query("SELECT * FROM Movie WHERE fileName LIKE :fileName and disabled=0") List getAllByFileName(String fileName); @Query("SELECT COUNT (fileName) FROM Movie WHERE index_id =:index_id AND TITLE IS NOT NULL") int getNoOfMovies(int index_id); @Query("UPDATE Movie set disabled=1 WHERE index_id=:index_id ") void disableFromThisIndex(int index_id); @Query("Update movie set disabled = 0 where index_id=:index_id") void enableFromThisIndex(int index_id); @Query("SELECT * FROM Movie WHERE gd_id =:gd_id") Movie getByGdId(String gd_id); @Query("DELETE FROM Movie WHERE gd_id =:id") void deleteByGdId(String id); @Query("UPDATE Movie SET addToList=1 WHERE id=:movieId") void updateAddToList(int movieId); @Query("SELECT * FROM Movie WHERE addToList=1 and disabled=0") List getWatchlisted(); @Query("UPDATE Movie SET addToList=0 WHERE id=:movieId") void updateRemoveFromList(int movieId); } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/ResFormatDao.java ================================================ package com.theflexproject.thunder.database; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import com.theflexproject.thunder.model.ResFormat; import java.util.List; @Dao public interface ResFormatDao { @Query("SELECT * FROM ResFormat") List getAll(); @Insert void insert(ResFormat... resFormats); @Delete void delete(ResFormat resFormat); } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/TVShowDao.java ================================================ package com.theflexproject.thunder.database; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import java.util.List; @Dao public interface TVShowDao { @Query("SELECT * FROM TVShow") List getAll(); @Query("SELECT Distinct * FROM TVShow") List getAllByTitles(); @Query("SELECT * FROM TVShow WHERE TVShow.name LIKE '%' || :string || '%' OR TVShow.overview like '%' || :string || '%' ") List getSearchQuery(String string); @Query("SELECT * FROM TVShow WHERE id LIKE :id") TVShow find(long id); @Query("SELECT * FROM TVShow WHERE name LIKE :name") TVShow getByShowName(String name); @Query("SELECT * FROM TVShow order by last_air_date desc limit 10") List getNewShows(); @Query("SELECT * FROM TVShow order by vote_average desc limit 10") List getTopRated(); @Query("Delete FROM TVShow WHERE id = :show_id") void deleteById(int show_id); @Insert void insert(TVShow... tvShows); @Delete void delete(TVShow tvShow); @Query("select * from TVShow where name like :finalShowName ") TVShow findByName(String finalShowName); @Query("UPDATE TVShow SET addToList=1 WHERE id=:tvId") void updateAddToList(int tvId); @Query("select * from TVShow where addToList=1 ") List getWatchlisted(); @Query("UPDATE TVShow SET addToList=0 WHERE id=:tvShowId") void updateRemoveFromList(int tvShowId); } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/database/TVShowSeasonDetailsDao.java ================================================ package com.theflexproject.thunder.database; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; import java.util.List; @Dao public interface TVShowSeasonDetailsDao { @Query("SELECT * FROM TVShowSeasonDetails") List getAll(); @Insert void insert(TVShowSeasonDetails... movies); @Delete void delete(TVShowSeasonDetails movie); @Query("SELECT * FROM TVShowSeasonDetails WHERE id like :id") TVShowSeasonDetails find(int id); @Query("Delete FROM TVShowSeasonDetails WHERE id=:season_id") void deleteById(int season_id); @Query("Delete FROM TVShowSeasonDetails WHERE show_id=:show_id") void deleteByShowId(long show_id); @Query("SELECT * FROM TVShowSeasonDetails WHERE show_id=:show_id order by season_number") List findByShowId(long show_id); @Query("SELECT * FROM TVShowSeasonDetails WHERE show_id=:tvShowId and season_number=:finalSeasonNumber") TVShowSeasonDetails findByShowIdAndSeasonNumber(long tvShowId , String finalSeasonNumber); } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/AddNewIndexFragment.java ================================================ package com.theflexproject.thunder.fragments; import static com.theflexproject.thunder.utils.SendPostRequest.postRequestGDIndex; import static com.theflexproject.thunder.utils.SendPostRequest.postRequestGoIndex; import static com.theflexproject.thunder.utils.SendPostRequest.postRequestMapleIndex; import static com.theflexproject.thunder.utils.SendPostRequest.postRequestSimpleProgramIndex; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.theflexproject.thunder.R; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.IndexLink; public class AddNewIndexFragment extends BaseFragment { private EditText indexLinkView; private EditText userNameView; private EditText passWordView; private Button save; private ProgressBar progress_circular; private TextView refreshSuggest; // private MaterialButtonToggleGroup toggleIndexTypeGroup; // private MaterialButton toggleIndexTypeButton; // // private MaterialButtonToggleGroup toggleFolderTypeGroup; // private MaterialButton toggleFolderTypeButton; private AutoCompleteTextView actv1; private AutoCompleteTextView actv2; // private RadioGroup radioIndexTypeGroup; // private RadioButton radioIndexTypeButton; // // private RadioGroup radioFolderTypeGroup; // private RadioButton radioFolderTypeButton; @Nullable public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_add_index, container, false); } public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { indexLinkView =view.findViewById(R.id.indexlink); userNameView = view.findViewById(R.id.username); passWordView = view.findViewById(R.id.password); save = view.findViewById(R.id.save); progress_circular = view.findViewById(R.id.progress_circular); refreshSuggest = view.findViewById(R.id.suggestRefresh); // toggleIndexTypeGroup = view.findViewById(R.id.index_type_group); // toggleFolderTypeGroup = view.findViewById(R.id.folder_type_group); actv1 = view.findViewById(R.id.actv); actv2 = view.findViewById(R.id.actv2); String[] index_types = mActivity.getResources().getStringArray(R.array.index_types); ArrayAdapter arrayAdapter1 = new ArrayAdapter<>(mActivity , R.layout.item_index_type , index_types); actv1.setAdapter(arrayAdapter1); String[] folder_types = mActivity.getResources().getStringArray(R.array.folder_types); ArrayAdapter arrayAdapter2 = new ArrayAdapter<>(mActivity , R.layout.item_folder_type , folder_types); actv2.setAdapter(arrayAdapter2); // radioIndexTypeGroup=(RadioGroup)view.findViewById(R.id.rb_group); // radioFolderTypeGroup=(RadioGroup)view.findViewById(R.id.folderTypeRadioGroup); save.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { IndexLink indexLink = new IndexLink(); if(indexLinkView.getText().toString().equals("")){ indexLinkView.setError("Enter index link"); }else{ indexLink.setLink(indexLinkView.getText().toString()); } indexLink.setUsername(userNameView.getText().toString()); indexLink.setPassword(passWordView.getText().toString()); indexLink.setIndexType(actv1.getText().toString()); indexLink.setFolderType(actv2.getText().toString()); // int IndexTypeCheckedButtonId = toggleIndexTypeGroup.getCheckedButtonId(); // toggleIndexTypeButton = view.findViewById(IndexTypeCheckedButtonId); // int FolderTypeCheckedButtonId = toggleFolderTypeGroup.getCheckedButtonId(); // toggleFolderTypeButton = view.findViewById(FolderTypeCheckedButtonId); // int indexTypeButtonSelectedId=radioIndexTypeGroup.getCheckedRadioButtonId(); // int folderTypeButtonSelectedId=radioFolderTypeGroup.getCheckedRadioButtonId(); // radioIndexTypeButton= mActivity.findViewById(indexTypeButtonSelectedId); // radioFolderTypeButton= mActivity.findViewById(folderTypeButtonSelectedId); try{ if(indexLink.getLink().length()<1){ indexLinkView.setError("Invalid Link"); } // if(toggleIndexTypeButton == null || toggleFolderTypeButton == null){ // refreshSuggest.setVisibility(View.VISIBLE); // refreshSuggest.setText("Select Index and Folder Type"); // } // if(toggleIndexTypeButton != null || toggleFolderTypeButton != null && indexLink.getUsername().length()<1 && indexLink.getPassword().length()<1){ // userNameView.setVisibility(View.GONE); // passWordView.setVisibility(View.GONE); // indexLink.setIndexType(toggleIndexTypeButton.getText().toString()); // indexLink.setFolderType(toggleFolderTypeButton.getText().toString()); // } Thread thread = new Thread(new Runnable() { @Override public void run() { if(DatabaseClient.getInstance(mActivity).getAppDatabase().indexLinksDao().find(indexLink.getLink())!=null){ //refresh instead mActivity.runOnUiThread(new Runnable() { @Override public void run() { refreshSuggest.setVisibility(View.VISIBLE); } }); } else if(indexLink.getLink()!=null) { DatabaseClient.getInstance(mActivity).getAppDatabase().indexLinksDao().insert(indexLink); mActivity.runOnUiThread(new Runnable() { @Override public void run() { save.setText("Adding"); progress_circular.setVisibility(View.VISIBLE); } }); String folderType = indexLink.getFolderType(); String indexType = indexLink.getIndexType(); String link =indexLink.getLink(); String user =indexLink.getUsername(); String pass =indexLink.getPassword(); System.out.println("Before setting id"+ indexLink.getId()); IndexLink indexLinkAgain = DatabaseClient.getInstance(mActivity) .getAppDatabase() .indexLinksDao() .find(link); int index_id = indexLinkAgain.getId(); System.out.println("After setting id"+ indexLinkAgain.getId()); if(folderType.equals("Movies")) { if(indexType.equals("GDIndex")) { postRequestGDIndex(link,user,pass,false,index_id); } if(indexType.equals("GoIndex")) { postRequestGoIndex(link,user,pass,false,index_id); } if(indexType.equals("Maple")){ postRequestMapleIndex(link,user,pass,false,index_id); } if(indexType.equals("SimpleProgram")){ postRequestSimpleProgramIndex(link,user,pass,false,index_id); } } if(folderType.equals("TVShows")){ if(indexType.equals("GDIndex")) { postRequestGDIndex(link,user,pass,true,index_id); } if(indexType.equals("GoIndex")) { postRequestGoIndex(link,user,pass,true,index_id); } if(indexType.equals("MapleIndex")){ postRequestMapleIndex(link,user,pass,true,index_id); } if(indexType.equals("SimpleProgram")){ postRequestSimpleProgramIndex(link,user,pass,true,index_id); } } mActivity.runOnUiThread(new Runnable() { @Override public void run() { save.setText("Done"); progress_circular.setVisibility(View.GONE); } }); } } }); thread.start(); } catch (NullPointerException e) { e.printStackTrace(); } if(save.getText().equals("Done")){ mActivity.getSupportFragmentManager().popBackStack(); } } }); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/BaseFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.app.Activity; import android.content.Context; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentActivity; public abstract class BaseFragment extends Fragment { protected FragmentActivity mActivity; @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof Activity){ mActivity = (FragmentActivity) context; } } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/ChangeTMDBFragment.java ================================================ package com.theflexproject.thunder.fragments; import static com.theflexproject.thunder.utils.SendGetRequestTMDB.tmdbGetByID; import static com.theflexproject.thunder.utils.StringUtils.tmdbIdExtractor_FromLink; import static com.theflexproject.thunder.utils.StringUtils.tmdbIdExtractor_FromLink_TV; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.theflexproject.thunder.R; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.model.TVShowInfo.TVShow; public class ChangeTMDBFragment extends BaseFragment { MyMedia myMedia; EditText tmdbLinkText; Button changeTMDBIdButton; TextView invalidTMDBLink; public ChangeTMDBFragment() { // Required empty public constructor } public ChangeTMDBFragment(MyMedia myMedia) { this.myMedia=myMedia; } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_change_tmdb , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); tmdbLinkText = view.findViewById(R.id.tmdbLinkText); changeTMDBIdButton = view.findViewById(R.id.changeTMDBIdButton); invalidTMDBLink = view.findViewById(R.id.invalidTMDBLink); changeTMDBIdButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Thread thread = new Thread(new Runnable() { @Override public void run() { if(tmdbLinkText.getText()!=null){ String link = tmdbLinkText.getText().toString(); if(myMedia instanceof Movie){ //send get request tmdb movie long id = tmdbIdExtractor_FromLink(link); if(id!=0){ tmdbGetByID(myMedia,id,false); } else { boolean failed = false; try { id =Long.parseLong(link); tmdbGetByID(myMedia,id,false); }catch (Exception e){ failed = true; System.out.println("Failed to parse long"+e); mActivity.runOnUiThread(new Runnable() { @Override public void run() { tmdbLinkText.setError("Invalid Link"); } }); } } } else if(myMedia instanceof TVShow || myMedia instanceof Episode){ //send get request tmdb tvshow long id = tmdbIdExtractor_FromLink_TV(link); if(id!=0){ tmdbGetByID(myMedia,id,true); } else if(link.length()<15){ try { id =Long.parseLong(link); tmdbGetByID(myMedia,id,true); }catch (Exception e){ System.out.println("Failed to parse long"+e); } } else { invalidTMDBLink.setVisibility(View.VISIBLE); } } } } }); thread.start(); Toast.makeText(mActivity,"Changed",Toast.LENGTH_LONG).show(); } }); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/CustomFileListDialogFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.app.Activity; import android.content.Context; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.WindowManager; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.FileItemDialogAdapter; import com.theflexproject.thunder.model.MyMedia; import java.util.List; import eightbitlab.com.blurview.BlurView; import eightbitlab.com.blurview.RenderScriptBlur; public class CustomFileListDialogFragment extends DialogFragment { Context context; RecyclerView fileListInDialog; List mediaList; FileItemDialogAdapter.OnItemClickListener listener; public OnInputListener mOnInputListener; View source; public CustomFileListDialogFragment(Context context,View source, List mediaList) { this.context=context; this.mediaList=mediaList; this.source=source; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } // @SuppressLint("RestrictedApi") // @Override // public void setupDialog(@NonNull Dialog dialog , int style) { // super.setupDialog(dialog , style); // // if(getDialog() !=null){ // setDialogPosition(); // } // // } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // setDialogPosition(); return inflater.inflate(R.layout.fragment_custom_file_list_dialog , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); BlurView blurView; ViewGroup rootView; View decorView; blurView = view.findViewById(R.id.blurViewDialog); decorView =((Activity)view.getContext()).getWindow().getDecorView(); rootView = decorView.findViewById(android.R.id.content); ((Activity) context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); ((Activity) context).getWindow().setStatusBarColor(Color.TRANSPARENT); final float radius = 5f; final Drawable windowBackground = ((Activity) context).getWindow().getDecorView().getBackground(); blurView.setupWith(rootView, new RenderScriptBlur(context)) .setFrameClearDrawable(windowBackground) .setBlurRadius(radius); blurView.setOutlineProvider(ViewOutlineProvider.BACKGROUND); blurView.setClipToOutline(true); listener = (view1 , position) -> { mOnInputListener.sendInput(position); System.out.println("selected index number"+position); dismiss(); }; fileListInDialog = view.findViewById(R.id.fileListInDialog); fileListInDialog.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.VERTICAL , false)); fileListInDialog.setHasFixedSize(true); FileItemDialogAdapter fileItemDialogAdapter = new FileItemDialogAdapter(mediaList,listener); fileListInDialog.setAdapter(fileItemDialogAdapter); } @Override public void onAttach(@NonNull Context context) { super.onAttach(context); try { mOnInputListener = (OnInputListener)getActivity(); } catch (ClassCastException e) { System.out.println("onAttach: ClassCastException: " + e.getMessage()); } } // private void setDialogPosition() { // if (source == null) { // return; // Leave the dialog in default position // } // // // Find out location of source component on screen // // see https://stackoverflow.com/a/6798093/56285 // int[] location = new int[2]; // source.getLocationOnScreen(location); // int sourceX = location[0]; // int sourceY = location[1]; // // Window window =((Activity) getActivity()).getWindow(); // // // set "origin" to top left corner // window.setGravity(Gravity.TOP| Gravity.START); // // WindowManager.LayoutParams params = window.getAttributes(); // // // Just an example; edit to suit your needs. // params.x = sourceX - dpToPx(110); // about half of confirm button size left of source view // params.y = sourceY - dpToPx(80); // above source view // // window.setAttributes(params); // } // // public int dpToPx(float valueInDp) { // DisplayMetrics metrics = getActivity().getResources().getDisplayMetrics(); // return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, valueInDp, metrics); // } public interface OnInputListener { void sendInput(int selection); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/CustomFileSelectionDialog.java ================================================ //package com.theflexproject.thunder.fragments; // //import android.os.Bundle; //import android.view.LayoutInflater; //import android.view.View; //import android.view.ViewGroup; // //import androidx.annotation.NonNull; //import androidx.annotation.Nullable; //import androidx.fragment.app.DialogFragment; // //public class CustomFileSelectionDialog extends { // @Nullable // @Override // public View onCreateView(@NonNull LayoutInflater inflater , @Nullable ViewGroup container , @Nullable Bundle savedInstanceState) { // return super.onCreateView(inflater, container , savedInstanceState); // // initWidgets // // // } //} ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/EpisodeDetailsFragment.java ================================================ package com.theflexproject.thunder.fragments; import static com.theflexproject.thunder.Constants.TMDB_BACKDROP_IMAGE_BASE_URL; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TableRow; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.target.Target; import com.theflexproject.thunder.Constants; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.FileItemAdapter; import com.theflexproject.thunder.adapter.ScaleCenterItemLayoutManager; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; import com.theflexproject.thunder.player.PlayerActivity; import com.theflexproject.thunder.utils.StringUtils; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Locale; public class EpisodeDetailsFragment extends BaseFragment { TextView showName; TextView episodeName; ImageView episodeStill; ImageView poster; TextView seasonNumber; TextView runtime; TextView overview; TextView overviewText; ImageView ratings; TextView ratingsText; ImageButton play; TableRow air_date; TextView air_date_text; ImageView logo; TextView continueWatching; ImageView dot1; ImageView dot2; ImageView dot3; TextView episodeTitle; TVShow tvShow; TVShowSeasonDetails tvShowSeasonDetails; Episode largestFile;//default episode played on click of Play button Episode episode; RecyclerView recyclerViewEpisodeFiles; List episodeFileList; FileItemAdapter fileAdapter; public EpisodeDetailsFragment() { // Required empty public constructor } public EpisodeDetailsFragment(TVShow tvShow , TVShowSeasonDetails tvShowSeasonDetails , Episode episode) { this.tvShow = tvShow; this.tvShowSeasonDetails = tvShowSeasonDetails; this.episode = episode; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_episode_details_new , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { initWidgets(view); loadDetails(); super.onViewCreated(view , savedInstanceState); } private void initWidgets(View view) { showName = view.findViewById(R.id.tvShowTitleInEpisodeDetails); logo = view.findViewById(R.id.tvLogoInEp); episodeName = view.findViewById(R.id.episodeNameInEpisodeDetails); poster = view.findViewById(R.id.tvShowPosterInEpisodeDetails); episodeStill = view.findViewById(R.id.stillInEpisodeDetails); seasonNumber = view.findViewById(R.id.seasonNumberInEpisodeDetails); runtime = view.findViewById(R.id.runtimeInEpisodeDetails); // ratings = view.findViewById(R.id.ratingsInEpisodeDetails); ratingsText = view.findViewById(R.id.ratingsTextInEpisodeDetails); overview = view.findViewById(R.id.overviewInEpisodeDetails); overviewText = view.findViewById(R.id.overviewDescInEpisodeDetails); air_date = view.findViewById(R.id.episodeAirDate); air_date_text = view.findViewById(R.id.episodeAirDateText); continueWatching = view.findViewById(R.id.continueWatchingText); dot1 = view.findViewById(R.id.dot); dot2 = view.findViewById(R.id.dot2); dot3 = view.findViewById(R.id.dot3); play = view.findViewById(R.id.playInEpisodeDetails); } private void loadDetails() { String logoLink = tvShow.getLogo_path(); System.out.println("Logo Link"+logoLink); if(!logoLink.equals("")){ logo.setVisibility(View.VISIBLE); Glide.with(mActivity) .load(logoLink) .apply(new RequestOptions() .fitCenter() .override(Target.SIZE_ORIGINAL)) .diskCacheStrategy(DiskCacheStrategy.ALL) .placeholder(new ColorDrawable(Color.TRANSPARENT)) .into(logo); } if(logoLink.equals("")&&tvShow.getName()!=null){ showName.setVisibility(View.VISIBLE); showName.setText(tvShow.getName()); } String buttonText = "S" + episode.getSeason_number() + " E" + episode.getEpisode_number(); System.out.println(buttonText); continueWatching.setText(buttonText); // play.setText(buttonText); if(episode.getName()!=null){ dot3.setVisibility(View.VISIBLE); episodeName.setVisibility(View.VISIBLE); episodeName.setText(episode.getName()); } // if (episode.getName() != null) { // episodeName.setText(episode.getName()); // } else { String name = "Episode" + episode.getEpisode_number(); episodeName.setText(name); } if (episode.getVote_average() > 0) { // ratings.setVisibility(View.VISIBLE); dot1.setVisibility(View.VISIBLE); ratingsText.setVisibility(View.VISIBLE); String rating =(int) (episode.getVote_average() * 10) + "%"; ratingsText.setText(rating); } // if (tvShowSeasonDetails.getPoster_path() != null) { // Glide.with(mActivity) // .load(TMDB_IMAGE_BASE_URL + tvShowSeasonDetails.getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .into(poster); // } else { // if (tvShow.getPoster_path() != null) { // Glide.with(mActivity) // .load(TMDB_IMAGE_BASE_URL + tvShow.getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .into(poster); // } // } if (episode.getStill_path() != null) { Glide.with(mActivity.getApplicationContext()) .load(Constants.TMDB_BACKDROP_IMAGE_BASE_URL + episode.getStill_path()) .placeholder(new ColorDrawable(Color.BLACK)) .apply(RequestOptions.bitmapTransform(new RoundedCorners(14))) .into(episodeStill); } else { if (tvShow.getPoster_path() != null) { Glide.with(mActivity) .load(TMDB_BACKDROP_IMAGE_BASE_URL + tvShow.getPoster_path()) .placeholder(new ColorDrawable(Color.BLACK)) .into(episodeStill); } } if (episode.getOverview() != null) { // overview.setVisibility(View.VISIBLE); overviewText.setVisibility(View.VISIBLE); overviewText.setText(episode.getOverview()); } if (episode.getAir_date() != null) { air_date.setVisibility(View.VISIBLE); try { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd" , Locale.ENGLISH); Date date = formatter.parse(episode.getAir_date()); SimpleDateFormat formatter2 = new SimpleDateFormat("MMMM dd , yyyy", Locale.ENGLISH); String strDate = formatter2.format(date); air_date_text.setText(strDate); } catch (ParseException e) { System.out.println("parse Exception Date"+e); } } if (episode.getRuntime() != 0) { String result = StringUtils.runtimeIntegerToString(episode.getRuntime()); runtime.setVisibility(View.VISIBLE); runtime.setText(result); } if (!(tvShowSeasonDetails.getSeason_number() < 0)) { String season = "Season " + tvShowSeasonDetails.getSeason_number(); seasonNumber.setText(season); } loadEpisodeFilesRecycler(); } private void loadEpisodeFilesRecycler() { setOnClickListner(); Thread thread = new Thread(new Runnable() { @Override public void run() { Log.i(" " , "in thread"); episodeFileList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .episodeDao() .byEpisodeId(episode.getId()); mActivity.runOnUiThread(new Runnable() { @Override public void run() { Log.i("episodeFileList" , episodeFileList.toString()); recyclerViewEpisodeFiles = mActivity.findViewById(R.id.recyclerAvailableEpisodeFiles); ScaleCenterItemLayoutManager linearLayoutManager = new ScaleCenterItemLayoutManager(getContext() , LinearLayoutManager.VERTICAL , false); // recyclerView.setLayoutManager(new LinearLayoutManager(getContext(),RecyclerView.HORIZONTAL,false)); recyclerViewEpisodeFiles.setLayoutManager(linearLayoutManager); recyclerViewEpisodeFiles.setHasFixedSize(true); fileAdapter = new FileItemAdapter(getContext() ,(List)(List) episodeFileList); recyclerViewEpisodeFiles.setAdapter(fileAdapter); fileAdapter.notifyDataSetChanged(); } }); } }); thread.start(); } private void setOnClickListner() { Thread thread = new Thread(new Runnable() { @Override public void run() { largestFile = DatabaseClient .getInstance(mActivity) .getAppDatabase() .episodeDao() .byEpisodeIdLargest(episode.getId()); } }); thread.start(); SharedPreferences sharedPreferences = mActivity.getSharedPreferences("Settings" , Context.MODE_PRIVATE); boolean savedEXT = sharedPreferences.getBoolean("EXTERNAL_SETTING" , false); play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (savedEXT) { //External Player addToLastPlayed(); Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(largestFile.getUrlString())); intent.setDataAndType(Uri.parse(largestFile.getUrlString()) , "video/*"); startActivity(intent); } else { //Play video addToLastPlayed(); Intent in = new Intent(getActivity() , PlayerActivity.class); in.putExtra("url" , largestFile.getUrlString()); startActivity(in); Toast.makeText(getContext() , "Play" , Toast.LENGTH_LONG).show(); } } }); } private void addToLastPlayed() { Thread thread = new Thread(new Runnable() { @Override public void run() { DatabaseClient.getInstance(getContext()).getAppDatabase().episodeDao().updatePlayed(episode.getId()); } }); thread.start(); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/FilesLibraryFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.FileItemAdapter; import com.theflexproject.thunder.adapter.ScaleCenterItemLayoutManager; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import java.util.List; public class FilesLibraryFragment extends BaseFragment { RecyclerView recyclerViewFiles; FileItemAdapter fileItemAdapter; List files; List movieList; public FilesLibraryFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_files_library , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); showFileLibrary(); } private void showFileLibrary() { Thread thread = new Thread(new Runnable() { @Override public void run() { Log.i(" " , "in thread"); movieList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getFilesWithNoTitle(); showRecyclerFiles(movieList); } }); thread.start(); } private void showRecyclerFiles(List movieList) { mActivity.runOnUiThread(() -> { recyclerViewFiles = mActivity.findViewById(R.id.recyclerAvailableFiles); if(recyclerViewFiles!=null){ ScaleCenterItemLayoutManager linearLayoutManager = new ScaleCenterItemLayoutManager(mActivity, LinearLayoutManager.VERTICAL , false); recyclerViewFiles.setLayoutManager(linearLayoutManager); recyclerViewFiles.setHasFixedSize(true); fileItemAdapter = new FileItemAdapter(mActivity ,(List)(List) movieList); recyclerViewFiles.setAdapter(fileItemAdapter); fileItemAdapter.notifyDataSetChanged(); } }); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/HomeFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.BannerRecyclerAdapter; import com.theflexproject.thunder.adapter.MediaAdapter; import com.theflexproject.thunder.adapter.ScaleCenterItemLayoutManager; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import java.util.ArrayList; import java.util.List; public class HomeFragment extends BaseFragment { BannerRecyclerAdapter recentlyAddedRecyclerAdapter; MediaAdapter recentlyReleasedRecyclerViewAdapter; MediaAdapter topRatedMoviesRecyclerViewAdapter; MediaAdapter lastPlayedMoviesRecyclerViewAdapter; MediaAdapter watchlistRecyclerViewAdapter; MediaAdapter topRatedShowsRecyclerAdapter; MediaAdapter newSeasonRecyclerAdapter; TextView recentlyAddedRecyclerViewTitle; RecyclerView recentlyAddedRecyclerView; TextView recentlyReleasedRecyclerViewTitle; RecyclerView recentlyReleasedRecyclerView; TextView topRatedMoviesRecyclerViewTitle; RecyclerView topRatedMoviesRecyclerView; TextView lastPlayedMoviesRecyclerViewTitle; RecyclerView lastPlayedMoviesRecyclerView; TextView watchlistRecyclerViewTitle; RecyclerView watchlistRecyclerView; TextView topRatedShowsRecyclerViewTitle; RecyclerView topRatedShowsRecyclerView; TextView newSeasonRecyclerViewTitle; RecyclerView newSeasonRecyclerView; List recentlyAddedMovies; List recentlyReleasedMovies; List topRatedMovies; List lastPlayedList; List watchlist; List newSeason; List topRatedShows; BannerRecyclerAdapter.OnItemClickListener recentlyAddedListener; MediaAdapter.OnItemClickListener recentlyReleasedListener; MediaAdapter.OnItemClickListener topRatedMoviesListener; MediaAdapter.OnItemClickListener lastPlayedListener; MediaAdapter.OnItemClickListener watchlistListener; MediaAdapter.OnItemClickListener topRatedShowsListener; MediaAdapter.OnItemClickListener newSeasonListener; // List pairMoviesList; // List pairTvShowsList; public HomeFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_home, container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); loadRecentlyAddedMovies(); loadRecentlyReleasedMovies(); loadTopRatedMovies(); loadLastPlayedMovies(); loadWatchlist(); loadNewSeason(); loadTopRatedShows(); setOnClickListner(); // getLists(); // loadRecyclerViews(); } private void loadWatchlist() { Thread thread = new Thread(new Runnable() { @Override public void run() { List watchlistMovies = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getWatchlisted(); List watchlistShows = DatabaseClient .getInstance(mActivity) .getAppDatabase() .tvShowDao() .getWatchlisted(); watchlist = new ArrayList<>(); watchlist.addAll(watchlistMovies); watchlist.addAll(watchlistShows); if(watchlist!=null && watchlist.size()>0){ mActivity.runOnUiThread(new Runnable() { @Override public void run() { ScaleCenterItemLayoutManager linearLayoutManager3 = new ScaleCenterItemLayoutManager(getContext() , LinearLayoutManager.HORIZONTAL , false); watchlistRecyclerViewTitle = mActivity.findViewById(R.id.watchListMedia); watchlistRecyclerViewTitle.setVisibility(View.VISIBLE); watchlistRecyclerView = mActivity.findViewById(R.id.watchListMediaRecycler); watchlistRecyclerView.setVisibility(View.VISIBLE); watchlistRecyclerView.setLayoutManager(linearLayoutManager3); watchlistRecyclerView.setHasFixedSize(true); watchlistRecyclerViewAdapter = new MediaAdapter(getContext() ,(List)(List) watchlist , watchlistListener); watchlistRecyclerView.setAdapter(watchlistRecyclerViewAdapter); } }); } }}); thread.start(); } private void loadRecentlyAddedMovies() { Thread thread = new Thread(new Runnable() { @Override public void run() { recentlyAddedMovies = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getrecentlyadded(); if(recentlyAddedMovies!=null && recentlyAddedMovies.size()>0){ mActivity.runOnUiThread(new Runnable() { @Override public void run() { recentlyAddedRecyclerViewTitle = mActivity.findViewById(R.id.recentlyAdded); recentlyAddedRecyclerViewTitle.setVisibility(View.VISIBLE); recentlyAddedRecyclerView = mActivity.findViewById(R.id.recentlyAddedRecycler); recentlyAddedRecyclerView.setLayoutManager(new ScaleCenterItemLayoutManager(getContext() , RecyclerView.HORIZONTAL , false)); recentlyAddedRecyclerView.setHasFixedSize(true); recentlyAddedRecyclerAdapter = new BannerRecyclerAdapter(getContext(), recentlyAddedMovies , recentlyAddedListener); recentlyAddedRecyclerView.setAdapter(recentlyAddedRecyclerAdapter); } }); } }}); thread.start(); } private void loadRecentlyReleasedMovies () { Thread thread = new Thread(new Runnable() { @Override public void run() { recentlyReleasedMovies = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getrecentreleases(); if(recentlyReleasedMovies!=null && recentlyReleasedMovies.size()>0){ mActivity.runOnUiThread(new Runnable() { @Override public void run() { ScaleCenterItemLayoutManager linearLayoutManager1 = new ScaleCenterItemLayoutManager(getContext() , LinearLayoutManager.HORIZONTAL , false); recentlyReleasedRecyclerViewTitle = mActivity.findViewById(R.id.newReleasesMovies); recentlyReleasedRecyclerViewTitle.setVisibility(View.VISIBLE); recentlyReleasedRecyclerView = mActivity.findViewById(R.id.recentlyReleasedMoviesRecycler); recentlyReleasedRecyclerView.setLayoutManager(linearLayoutManager1); recentlyReleasedRecyclerView.setHasFixedSize(true); recentlyReleasedRecyclerViewAdapter = new MediaAdapter(getContext(),(List)(List) recentlyReleasedMovies, recentlyReleasedListener); recentlyReleasedRecyclerView.setAdapter(recentlyReleasedRecyclerViewAdapter); } }); } }}); thread.start(); } private void loadTopRatedMovies() { Thread thread = new Thread(new Runnable() { @Override public void run() { topRatedMovies = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getTopRated(); if(topRatedMovies!=null && topRatedMovies.size()>0){ mActivity.runOnUiThread(new Runnable() { @Override public void run() { ScaleCenterItemLayoutManager linearLayoutManager2 = new ScaleCenterItemLayoutManager(getContext() , LinearLayoutManager.HORIZONTAL , false); topRatedMoviesRecyclerViewTitle = mActivity.findViewById(R.id.topRatedMovies); topRatedMoviesRecyclerViewTitle.setVisibility(View.VISIBLE); topRatedMoviesRecyclerView = mActivity.findViewById(R.id.topRatedMoviesRecycler); topRatedMoviesRecyclerView.setLayoutManager(linearLayoutManager2); topRatedMoviesRecyclerView.setHasFixedSize(true); topRatedMoviesRecyclerViewAdapter = new MediaAdapter(getContext() ,(List)(List) topRatedMovies , topRatedMoviesListener); topRatedMoviesRecyclerView.setAdapter(topRatedMoviesRecyclerViewAdapter); } }); } }}); thread.start(); } private void loadLastPlayedMovies() { Thread thread = new Thread(new Runnable() { @Override public void run() { lastPlayedList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getPlayed(); if(lastPlayedList!=null && lastPlayedList.size()>0){ mActivity.runOnUiThread(new Runnable() { @Override public void run() { ScaleCenterItemLayoutManager linearLayoutManager3 = new ScaleCenterItemLayoutManager(getContext() , LinearLayoutManager.HORIZONTAL , false); lastPlayedMoviesRecyclerViewTitle = mActivity.findViewById(R.id.lastPlayedMovies); lastPlayedMoviesRecyclerViewTitle.setVisibility(View.VISIBLE); lastPlayedMoviesRecyclerView = mActivity.findViewById(R.id.lastPlayedMoviesRecycler); lastPlayedMoviesRecyclerView.setVisibility(View.VISIBLE); lastPlayedMoviesRecyclerView.setLayoutManager(linearLayoutManager3); lastPlayedMoviesRecyclerView.setHasFixedSize(true); lastPlayedMoviesRecyclerViewAdapter = new MediaAdapter(getContext() ,(List)(List) lastPlayedList , lastPlayedListener); lastPlayedMoviesRecyclerView.setAdapter(lastPlayedMoviesRecyclerViewAdapter); } }); } }}); thread.start(); } private void loadNewSeason(){ Thread thread = new Thread(new Runnable() { @Override public void run() { newSeason = DatabaseClient .getInstance(mActivity) .getAppDatabase() .tvShowDao() .getNewShows(); if(newSeason!=null && newSeason.size()>0){ mActivity.runOnUiThread(new Runnable() { @Override public void run() { ScaleCenterItemLayoutManager linearLayoutManager3 = new ScaleCenterItemLayoutManager(getContext() , LinearLayoutManager.HORIZONTAL , false); newSeasonRecyclerViewTitle = mActivity.findViewById(R.id.newSeason); newSeasonRecyclerViewTitle.setVisibility(View.VISIBLE); newSeasonRecyclerView = mActivity.findViewById(R.id.newSeasonRecycler); newSeasonRecyclerView.setVisibility(View.VISIBLE); newSeasonRecyclerView = mActivity.findViewById(R.id.newSeasonRecycler); newSeasonRecyclerView.setLayoutManager(linearLayoutManager3); newSeasonRecyclerView.setHasFixedSize(true); newSeasonRecyclerAdapter = new MediaAdapter(getContext() ,(List)(List) newSeason , newSeasonListener); newSeasonRecyclerView.setAdapter(newSeasonRecyclerAdapter); } }); } }}); thread.start(); } private void loadTopRatedShows(){ Thread thread = new Thread(new Runnable() { @Override public void run() { topRatedShows = DatabaseClient .getInstance(mActivity) .getAppDatabase() .tvShowDao() .getTopRated(); if(topRatedShows!=null && topRatedShows.size()>0){ mActivity.runOnUiThread(new Runnable() { @Override public void run() { ScaleCenterItemLayoutManager linearLayoutManager3 = new ScaleCenterItemLayoutManager(getContext() , LinearLayoutManager.HORIZONTAL , false); topRatedShowsRecyclerViewTitle = mActivity.findViewById(R.id.topRatedTVShows); topRatedShowsRecyclerViewTitle.setVisibility(View.VISIBLE); topRatedShowsRecyclerView = mActivity.findViewById(R.id.topRatedTVShowsRecycler); topRatedShowsRecyclerView.setLayoutManager(linearLayoutManager3); topRatedShowsRecyclerView.setHasFixedSize(true); topRatedShowsRecyclerAdapter = new MediaAdapter(getContext() , (List)(List) topRatedShows , topRatedShowsListener); topRatedShowsRecyclerView.setAdapter(topRatedShowsRecyclerAdapter); } }); } }}); thread.start(); } private void setOnClickListner() { recentlyAddedListener = new BannerRecyclerAdapter.OnItemClickListener() { @Override public void onClick(View view, int position) { MovieDetailsFragment movieDetailsFragment = new MovieDetailsFragment(recentlyAddedMovies.get(position).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,movieDetailsFragment).addToBackStack(null).commit(); } }; recentlyReleasedListener = new MediaAdapter.OnItemClickListener() { @Override public void onClick(View view, int position) { MovieDetailsFragment movieDetailsFragment = new MovieDetailsFragment(recentlyReleasedMovies.get(position).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,movieDetailsFragment).addToBackStack(null).commit(); } }; topRatedMoviesListener = new MediaAdapter.OnItemClickListener() { @Override public void onClick(View view, int position) { MovieDetailsFragment movieDetailsFragment = new MovieDetailsFragment(topRatedMovies.get(position).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,movieDetailsFragment).addToBackStack(null).commit(); } }; lastPlayedListener = new MediaAdapter.OnItemClickListener() { @Override public void onClick(View view, int position) { MovieDetailsFragment movieDetailsFragment = new MovieDetailsFragment(lastPlayedList.get(position).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,movieDetailsFragment).addToBackStack(null).commit(); } }; watchlistListener = new MediaAdapter.OnItemClickListener() { @Override public void onClick(View view , int position) { int id =0; if(watchlist.get(position) instanceof Movie){ id = ((Movie) watchlist.get(position)).getId(); MovieDetailsFragment movieDetailsFragment = new MovieDetailsFragment(id); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,movieDetailsFragment).addToBackStack(null).commit(); }else{ id = ((TVShow)(watchlist.get(position))).getId(); TvShowDetailsFragment tvShowDetailsFragment = new TvShowDetailsFragment(id); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,tvShowDetailsFragment).addToBackStack(null).commit(); } } }; newSeasonListener = new MediaAdapter.OnItemClickListener() { @Override public void onClick(View view, int position) { TvShowDetailsFragment tvShowDetailsFragment = new TvShowDetailsFragment(newSeason.get(position).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out) .add(R.id.container,tvShowDetailsFragment).addToBackStack(null).commit(); } }; topRatedShowsListener = new MediaAdapter.OnItemClickListener() { @Override public void onClick(View view, int position) { TvShowDetailsFragment tvShowDetailsFragment = new TvShowDetailsFragment(topRatedShows.get(position).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out) .add(R.id.container,tvShowDetailsFragment).addToBackStack(null).commit(); } }; } // private void loadRecentlyAdded(){ //// setOnClickListner(); // // pairMoviesList = new ArrayList<>(); //// pairMoviesList.add(new PairMovies("RecentlyAdded",recentlyAddedList)); //// pairMoviesList.add(new PairMovies("NewReleases",newmediaList)); //// pairMoviesList.add(new PairMovies("TopRated",topRatedList)); //// pairMoviesList.add(new PairMovies("RecentlyPlayed",lastPlayedList)); //// //// //// //// pairTvShowsList= new ArrayList<>(); //// pairTvShowsList.add(new PairTvShows("NewShows",newShows)); //// pairTvShowsList.add(new PairTvShows("TopRated",topRatedShows)); //// //// //// List items = new ArrayList<>(); //// items.addAll(pairMoviesList); //// int cutListIndex = items.size(); //// items.addAll(pairTvShowsList); //// //// mActivity.runOnUiThread(new Runnable() { //// @Override //// public void run() { //// recyclerView = mActivity.findViewById(R.id.nestedRecycler); //// recyclerView.setLayoutManager(new LinearLayoutManager(getContext(),RecyclerView.VERTICAL,false)); //// recyclerView.setHasFixedSize(true); //// HomeItemAdapter homeItemAdapter = new HomeItemAdapter(getContext(),items,cutListIndex); //// recyclerView.setAdapter(homeItemAdapter); //// homeItemAdapter.notifyDataSetChanged(); //// } //// }); // } // private void loadRecyclerViews(){} // private void getLists(){ // Thread thread = new Thread(new Runnable() { // @Override // public void run() { //// recentlyAddedMovies = DatabaseClient //// .getInstance(mActivity) //// .getAppDatabase() //// .movieDao() //// .getrecentlyadded(); //// //// recentlyReleasedMovies = DatabaseClient //// .getInstance(mActivity) //// .getAppDatabase() //// .movieDao() //// .getrecentreleases(); //// //// topRatedMovies = DatabaseClient //// .getInstance(mActivity) //// .getAppDatabase() //// .movieDao() //// .getTopRated(); //// //// lastPlayedList = DatabaseClient //// .getInstance(mActivity) //// .getAppDatabase() //// .movieDao() //// .getPlayed(); // //// newSeason = DatabaseClient //// .getInstance(mActivity) //// .getAppDatabase() //// .tvShowDao() //// .getNewShows(); //// //// topRatedShows = DatabaseClient //// .getInstance(mActivity) //// .getAppDatabase() //// .tvShowDao() //// .getTopRated(); // }}); // thread.start(); // } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/LibraryFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.viewpager2.widget.ViewPager2; import com.google.android.material.tabs.TabItem; import com.google.android.material.tabs.TabLayout; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.FragmentViewPagerAdapter; public class LibraryFragment extends BaseFragment { AutoCompleteTextView autoCompleteTextView; String[] sort_methods; ArrayAdapter arrayAdapter; TabLayout tabLayout ; TabItem moviesTab; TabItem tvTab; TabItem filesTab; ViewPager2 viewPagerLibrary; FragmentViewPagerAdapter fragmentViewPagerAdapter; public LibraryFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_library, container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); initWidgets(); tabLayout = mActivity.findViewById(R.id.tabLayout); moviesTab = mActivity.findViewById(R.id.movieTab); tvTab = mActivity.findViewById(R.id.tvTab); filesTab = mActivity.findViewById(R.id.filesTab); // tabLayout.addTab(moviesTab); // tabLayout.addTab(tvTab); // tabLayout.addTab(tabLayout.newTab().setText("Movies")); // tabLayout.addTab(tabLayout.newTab().setText("TV Shows")); tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { @Override public void onTabSelected(TabLayout.Tab tab) { viewPagerLibrary.setCurrentItem(tab.getPosition()); } @Override public void onTabUnselected(TabLayout.Tab tab) { } @Override public void onTabReselected(TabLayout.Tab tab) { } }); viewPagerLibrary.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() { @Override public void onPageSelected(int position) { tabLayout.selectTab(tabLayout.getTabAt(position)); } }); } private void initWidgets() { // sort_methods = mActivity.getResources().getStringArray(R.array.sort_methods); // arrayAdapter = new ArrayAdapter<>(mActivity,R.layout.dropdown_item,sort_methods); // autoCompleteTextView = mActivity.findViewById(R.id.AutoCompleteTextview); // autoCompleteTextView.setAdapter(arrayAdapter); tabLayout = mActivity.findViewById(R.id.tabLayout); viewPagerLibrary = mActivity.findViewById(R.id.viewPagerLibrary); fragmentViewPagerAdapter = new FragmentViewPagerAdapter(this); viewPagerLibrary.setSaveEnabled(false); viewPagerLibrary.setAdapter(fragmentViewPagerAdapter); } // // Thread threadmediaList = new Thread(new Runnable() { // @Override // public void run() { // autoCompleteTextView.setOnItemClickListener(new AdapterView.OnItemClickListener() { // @Override // public void onItemClick(AdapterView parent, View view, int position, long id) { //// String methodChosen = autoCompleteTextView.getText().toString(); //// Log.i("Method",methodChosen); //// switch(methodChosen){ //// case "FileName": //// sortName(); //// case "ReleaseDate": //// sortReleaseDate(); //// case "Size": //// sortSize(); //// case "TimeModified": //// sortTimeModified(); //// case "IndexLink": //// sortIndexLink(); //// case "Title": //// sortTitle(); //// } //// //// Toast.makeText(mActivity.getApplicationContext(), "" + autoCompleteTextView.getText().toString(), Toast.LENGTH_SHORT).show(); // } // }); // // } // }); // threadmediaList.setPriority(10); // threadmediaList.start(); // void sortName(){ // setOnClickListner(); /**set this every time*/ // Executors.newSingleThreadExecutor().execute(new Runnable() { // @Override // public void run() { // String methodChosen = autoCompleteTextView.getText().toString().trim(); // Log.i("Method",methodChosen); // newmediaList = DatabaseClient // .getInstance(mActivity) // .getAppDatabase() // .fileDao() // .sortByFileName(); // showRecycler(newmediaList); // } // }); // // // } // void sortReleaseDate(){ // Executors.newSingleThreadExecutor().execute(new Runnable() { // @Override // public void run() { // String methodChosen = autoCompleteTextView.getText().toString().trim(); // Log.i("inside sort function",methodChosen); // newmediaList = DatabaseClient // .getInstance(mActivity) // .getAppDatabase() // .fileDao() // .sortByRelease(); // Log.i("inside sort function",newmediaList.toString()); // showRecycler(newmediaList); // } // }); // // } // void sortSize(){ // Executors.newSingleThreadExecutor().execute(new Runnable() { // @Override // public void run() { // String methodChosen = autoCompleteTextView.getText().toString().trim(); // Log.i("Method",methodChosen); // newmediaList = DatabaseClient // .getInstance(mActivity) // .getAppDatabase() // .fileDao() // .sortBySize(); //// showRecycler(newmediaList); // } // }); // // } // // void sortIndexLink() { // Executors.newSingleThreadExecutor().execute(new Runnable() { // @Override // public void run() { // String methodChosen = autoCompleteTextView.getText().toString().trim(); // Log.i("Method",methodChosen); // newmediaList = DatabaseClient // .getInstance(mActivity) // .getAppDatabase() // .fileDao() // .sortByIndex(); //// showRecycler(newmediaList); // } // }); // // // } // // void sortTimeModified(){ // Executors.newSingleThreadExecutor().execute(new Runnable() { // @Override // public void run() { // String methodChosen = autoCompleteTextView.getText().toString(); // Log.i("Method",methodChosen); // newmediaList = DatabaseClient // .getInstance(mActivity) // .getAppDatabase() // .fileDao() // .sortByTime(); //// showRecycler(newmediaList); // } // }); // // } // // void sortTitle(){ // Executors.newSingleThreadExecutor().execute(new Runnable() { // @Override // public void run() { // String methodChosen = autoCompleteTextView.getText().toString().trim(); // Log.i("Method",methodChosen); // newmediaList = DatabaseClient // .getInstance(mActivity) // .getAppDatabase() // .fileDao() // .sortByTitle(); //// showRecycler(newmediaList); // } // }); // // } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/ManageDatabaseFragment.java ================================================ package com.theflexproject.thunder.fragments; import static com.theflexproject.thunder.utils.StorageUtils.verifyStoragePermissions; import android.Manifest; import android.os.Bundle; import android.os.Environment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.core.app.ActivityCompat; import androidx.room.Room; import com.theflexproject.thunder.R; import com.theflexproject.thunder.database.AppDatabase; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.nio.channels.FileChannel; public class ManageDatabaseFragment extends BaseFragment { Button importDatabase; Button exportDatabase; public ManageDatabaseFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_manage_database , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); initWidgets(); setMyOnClickListeners(); } private void setMyOnClickListeners() { importDatabase.setOnClickListener(v -> { mActivity.deleteDatabase("MyToDos"); // File folder = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/Thunder"); // File[] listOfFiles = folder.listFiles(); // // File database = mActivity.getDatabasePath("MyToDos"); // System.out.println("paths" + backup + "\npath2 " + database); // // if(listOfFiles!=null) // for (File file : listOfFiles) { // if (file.exists() && file.isFile()) { // try { // System.out.println("backup exists true"); // FileChannel src = new FileInputStream(file).getChannel(); // FileChannel dst = new FileOutputStream(database).getChannel(); // dst.transferFrom(src , 0 , src.size()); //// fco.transferFrom(fc2, fc1.size() - 1, fc2.size()); // } catch (Exception e) { // e.printStackTrace(); // } // System.out.println(file.getName()); // } // } File backup = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/Thunder" , "ThunderBackup.db"); File database = mActivity.getDatabasePath("MyToDos"); System.out.println("paths" + backup + "\npath2 " + database); try { if (backup.exists()) { System.out.println("backup exists true"); FileChannel src = new FileInputStream(backup).getChannel(); FileChannel dst = new FileOutputStream(database).getChannel(); dst.transferFrom(src , 0 , src.size()); src.close(); dst.close(); Room.databaseBuilder(mActivity , AppDatabase.class , "MyToDos") .fallbackToDestructiveMigration() .createFromFile(database) .build(); } } catch (Exception e) { e.printStackTrace(); } Toast.makeText(mActivity,"Import Successful",Toast.LENGTH_LONG).show(); }); exportDatabase.setOnClickListener(v -> { verifyStoragePermissions(mActivity); int EXTERNAL_STORAGE_PERMISSION_CODE = 23; // Requesting Permission to access External Storage ActivityCompat.requestPermissions(mActivity, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, EXTERNAL_STORAGE_PERMISSION_CODE); File folder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); File backupDB = new File(folder +"/Thunder", "ThunderBackup.db"); File currentDB = new File(mActivity.getDatabasePath("MyToDos").toString()); try { File backupDir = new File(folder+"/Thunder"); if(!backupDir.exists()) backupDir.mkdir(); if (currentDB.exists()) { FileChannel src = new FileInputStream(currentDB).getChannel(); FileChannel dst = new FileOutputStream(backupDB).getChannel(); dst.transferFrom(src , 0 , src.size()); src.close(); dst.close(); } } catch (Exception e) { e.printStackTrace(); } Toast.makeText(mActivity,"Export Successful",Toast.LENGTH_LONG).show(); }); } private void initWidgets() { importDatabase = mActivity.findViewById(R.id.importDatabase); exportDatabase = mActivity.findViewById(R.id.exportDatabase); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/ManageIndexesFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.IndexAdapter; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.IndexLink; import java.util.List; import java.util.concurrent.Executors; public class ManageIndexesFragment extends BaseFragment{ List list; private RecyclerView recyclerView; FloatingActionButton floatingActionButton; public ManageIndexesFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_manage_indexes , container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); Executors.newSingleThreadExecutor().execute(new Runnable() { @Override public void run() { list = DatabaseClient.getInstance(mActivity).getAppDatabase().indexLinksDao().getAll(); mActivity.runOnUiThread(new Runnable() { @Override public void run() { recyclerView = view.findViewById(R.id.recyclerviewindexes); recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); recyclerView.setHasFixedSize(true); IndexAdapter indexAdapter = new IndexAdapter(mActivity,list); recyclerView.setAdapter(indexAdapter); } }); } }); floatingActionButton = view.findViewById(R.id.floating_button_add); floatingActionButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { AddNewIndexFragment nextFrag= new AddNewIndexFragment(); mActivity.getSupportFragmentManager().beginTransaction().replace(R.id.containersettings, nextFrag).addToBackStack(null).commit(); } }); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/MovieDetailsFragment.java ================================================ package com.theflexproject.thunder.fragments; import static android.content.Context.DOWNLOAD_SERVICE; import static com.theflexproject.thunder.Constants.TMDB_BACKDROP_IMAGE_BASE_URL; import android.app.Activity; import android.app.DownloadManager; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.WindowManager; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TableRow; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.FragmentTransaction; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.target.Target; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.FileItemAdapter; import com.theflexproject.thunder.adapter.ScaleCenterItemLayoutManager; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.Genre; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.player.PlayerActivity; import com.theflexproject.thunder.utils.StringUtils; import java.util.ArrayList; import java.util.List; import eightbitlab.com.blurview.BlurView; import eightbitlab.com.blurview.RenderScriptBlur; public class MovieDetailsFragment extends BaseFragment{ BlurView blurView; ViewGroup rootView; View decorView; int movieId; String movieFileName; ImageView logo; TextView titleText; TextView yearText; TextView runtime; ImageButton play; ImageButton changeSource; ImageButton addToList; ImageButton download; TextView overview; // Button changeTMDB; // TextView size; // Button externalPlayer; TableRow director; TableRow writer; TableRow genres; TextView directorText; TextView writerText; TextView genresText; TextView ratingsText; ImageView dot1; ImageView ratings; ImageView poster; ImageView backdrop; Movie movieDetails; RecyclerView recyclerViewMovieFiles; List movieFileList; FileItemAdapter fileAdapter; FileItemAdapter.OnItemClickListener listenerFileItem; Movie largestFile; public MovieDetailsFragment() { // Required empty public constructor } public MovieDetailsFragment(int id){ this.movieId =id; } public MovieDetailsFragment(String fileName) { this.movieFileName = fileName; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_movie_details_new, container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); initWidgets(view); loadDetails(); final Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { loadMovieFilesRecycler(); } },300); // setMyOnClickLiseners(); } private void initWidgets(View view) { // blurView = view.findViewById(R.id.blurView4); // decorView = ((Activity) mActivity).getWindow().getDecorView(); // rootView = decorView.findViewById(android.R.id.content); // titleText = view.findViewById(R.id.title_text); logo = view.findViewById(R.id.movieLogo); yearText = view.findViewById(R.id.year_text); runtime = view.findViewById(R.id.RuntimeText); // size = view.findViewById(R.id.size); overview = view.findViewById(R.id.overviewdesc); // poster = view.findViewById(R.id.moviePosterInDetails); backdrop = view.findViewById(R.id.movieBackdrop); director = view.findViewById(R.id.Director); writer = view.findViewById(R.id.WrittenBy); genres = view.findViewById(R.id.Genres); directorText = view.findViewById(R.id.DirectorText); writerText = view.findViewById(R.id.WrittenByText); genresText = view.findViewById(R.id.GenresText); ratings = view.findViewById(R.id.ratings); dot1 = view.findViewById(R.id.dot); ratingsText = view.findViewById(R.id.ratingsText); play = view.findViewById(R.id.play); download = view.findViewById(R.id.downloadButton); addToList = view.findViewById(R.id.addToListButton); changeSource = view.findViewById(R.id.changeSourceButton); // changeTMDB = view.findViewById(R.id.changeTMDBId); // blurView = view.findViewById(R.id.blurView4); } private void loadDetails(){ try { Thread thread = new Thread(new Runnable() { @Override public void run() { Log.i("movieId",movieId+""); movieDetails = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .byId(movieId); if(movieDetails==null){ movieDetails = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getByFileName(movieFileName); } if(movieDetails!=null){ Log.i("insideLoadDetails",movieDetails.toString()); mActivity.runOnUiThread(new Runnable() { @Override public void run() { String logoLink = movieDetails.getLogo_path(); System.out.println("Logo Link"+logoLink); if(logoLink!=null && !logoLink.equals("")){ logo.setVisibility(View.VISIBLE); Glide.with(mActivity) .load(logoLink) .apply(new RequestOptions() .fitCenter() .override(Target.SIZE_ORIGINAL)) .diskCacheStrategy(DiskCacheStrategy.ALL) .placeholder(new ColorDrawable(Color.TRANSPARENT)) .into(logo); } if(logoLink!=null && logoLink.equals("") && movieDetails.getTitle()!=null){ titleText.setVisibility(View.VISIBLE); titleText.setText(movieDetails.getTitle()); }else { titleText.setVisibility(View.VISIBLE); titleText.setText(movieFileName); } if(movieDetails.getRuntime()>0){ String result = StringUtils.runtimeIntegerToString(movieDetails.getRuntime()); runtime.setVisibility(View.VISIBLE); runtime.setText(result); } if(movieDetails.getGenres()!=null){ genresText.setVisibility(View.VISIBLE); ArrayList genres = movieDetails.getGenres(); StringBuilder sb = new StringBuilder(); for (int i=0;i1) { yearText.setVisibility(View.VISIBLE); yearText.setText(year.substring(0,year.indexOf('-'))); } if(movieDetails.getOverview()!=null){overview.setVisibility(View.VISIBLE); overview.setText(movieDetails.getOverview());} if(movieDetails.getPoster_path()!=null) { // Glide.with(mActivity) // .load(TMDB_IMAGE_BASE_URL + movieDetails.getPoster_path()) // .diskCacheStrategy(DiskCacheStrategy.ALL) // .placeholder(new ColorDrawable(Color.TRANSPARENT)) // .into(poster); } if(movieDetails.getBackdrop_path()!=null) { // Glide.with(mActivity) // .load(TMDB_BACKDROP_IMAGE_BASE_URL + movieDetails.getBackdrop_path()) // .apply(bitmapTransform(new BlurTransformation(10, 3))) // .diskCacheStrategy(DiskCacheStrategy.ALL) // .into(backdrop); Glide.with(mActivity) .load(TMDB_BACKDROP_IMAGE_BASE_URL + movieDetails.getBackdrop_path()) .apply(new RequestOptions() .fitCenter() .override(Target.SIZE_ORIGINAL)) // .apply(bitmapTransform(new BlurTransformation(5, 3))) .placeholder(new ColorDrawable(Color.TRANSPARENT)) .diskCacheStrategy(DiskCacheStrategy.ALL) .into(backdrop); }else { if(movieDetails.getPoster_path()!=null) { Glide.with(mActivity) .load(TMDB_BACKDROP_IMAGE_BASE_URL + movieDetails.getPoster_path()) .apply(new RequestOptions() .fitCenter() .override(Target.SIZE_ORIGINAL)) // .apply(bitmapTransform(new BlurTransformation(5, 3))) .placeholder(new ColorDrawable(Color.TRANSPARENT)) .diskCacheStrategy(DiskCacheStrategy.ALL) .into(backdrop); } } } }); } }}); thread.start(); }catch (NullPointerException exception){Log.i("Error",exception.toString());} setMyOnClickLiseners(); } String urlLogo ; // private String getLogo(Long id) { // // Thread thread = new Thread(new Runnable() { // @Override // public void run() { // try{ // URL url = new URL("https://webservice.fanart.tv/v3/movies/"+ id +"?api_key="+getFanartApiKey()); // // HttpURLConnection conn = (HttpURLConnection)url.openConnection(); // conn.setRequestMethod("GET"); // // int code = conn.getResponseCode(); // System.out.println(("HTTP CODE" + code)); // // // BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")); // StringBuilder sb = new StringBuilder(); // for (int c; (c = br.read()) >= 0;) // sb.append((char)c); // br.close(); // // Gson om = new Gson(); // FanArtMovieResponseModel root = om.fromJson(sb.toString(), FanArtMovieResponseModel.class); // System.out.println("FanArtMovieResponse"+root); // if(root!=null && root.getHdmovielogo()!=null){ // for (int i = 0; i < root.getHdmovielogo().size(); i++) { // if(root.getHdmovielogo().get(i).getLang().equals("en") || root.getHdmovielogo().get(i).getLang().equals("hi")){ // urlLogo = root.getHdmovielogo().get(i).getUrl().toString(); // break; // } // } // } // if(urlLogo==null && root!=null && root.getMovielogo()!=null){ // root.getMovielogo().get(0).getUrl().toString(); // // } // System.out.println("inside getLogo"+urlLogo); // }catch (IOException e) { // System.out.println(e.toString()); // } // // } // }); // thread.start(); // // try { // thread.join(); // } catch (InterruptedException e) { // e.printStackTrace(); // } // // return urlLogo; // // } //to blur the backdrop void blurBottom(){ ((Activity) mActivity).getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); ((Activity) mActivity).getWindow().setStatusBarColor(Color.TRANSPARENT); final float radius = 14f; final Drawable windowBackground = ((Activity) mActivity).getWindow().getDecorView().getBackground(); blurView.setupWith(rootView, new RenderScriptBlur(mActivity)) .setFrameClearDrawable(windowBackground) .setBlurRadius(radius); blurView.setOutlineProvider(ViewOutlineProvider.BACKGROUND); blurView.setClipToOutline(true); } private void setMyOnClickLiseners(){ Thread thread = new Thread(new Runnable() { @Override public void run() { largestFile = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .byIdLargest(movieId); } }); thread.start(); SharedPreferences sharedPreferences = mActivity.getSharedPreferences("Settings", Context.MODE_PRIVATE); boolean savedEXT = sharedPreferences.getBoolean("EXTERNAL_SETTING", false); if(savedEXT){ //External Player play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { addToLastPlayed(); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(largestFile.getUrlString())); intent.setDataAndType(Uri.parse(largestFile.getUrlString()), "video/*"); startActivity(intent); } }); }else { //Play video play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { try { addToLastPlayed(); Intent in = new Intent(getActivity(), PlayerActivity.class); in.putExtra("url",movieDetails.getUrlString()); startActivity(in); Toast.makeText(getContext(),"Play",Toast.LENGTH_LONG).show(); }catch (Exception e){ e.printStackTrace(); } } }); } // Start download download.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { DownloadManager manager = (DownloadManager) mActivity.getSystemService(DOWNLOAD_SERVICE); Uri uri = Uri.parse(largestFile.getUrlString()); DownloadManager.Request request = new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE) .setDescription("Downloading"); long reference = manager.enqueue(request); Toast.makeText(getContext(),"Download Started",Toast.LENGTH_LONG).show(); } }); addToList.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(movieDetails.getAddToList()!=1){ new Thread(new Runnable() { @Override public void run() { DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .updateAddToList(movieId); } }).start(); Toast.makeText(mActivity , "Added To List" , Toast.LENGTH_LONG).show(); } else{ new Thread(new Runnable() { @Override public void run() { DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .updateRemoveFromList(movieId); } }).start(); Toast.makeText(mActivity , "Removed From List" , Toast.LENGTH_LONG).show(); } } }); // changeTMDB.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { // ChangeTMDBFragment changeTMDBFragment = new ChangeTMDBFragment(movieDetails); // // mActivity.getSupportFragmentManager().beginTransaction() // .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) // .add(R.id.container,changeTMDBFragment).addToBackStack(null).commit(); // } // }); final int[] checkedItem = {-1}; int indexSelected = 0; changeSource.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { CustomFileListDialogFragment dialog = new CustomFileListDialogFragment(mActivity,changeSource,(List)(List) movieFileList); mActivity. getSupportFragmentManager() .beginTransaction() .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) .add(android.R.id.content, dialog) .addToBackStack(null) .commit(); // dialog.show(mActivity.getSupportFragmentManager(),null); dialog.mOnInputListener = new CustomFileListDialogFragment.OnInputListener() { @Override public void sendInput(int selection) { largestFile = movieFileList.get(selection); System.out.println("selected file"+largestFile.getFileName()); } }; // largestFile = movieFileList.get(indexSelected); // AlertDialog.Builder alertDialog = new AlertDialog.Builder(mActivity); // // alertDialog.setTitle("Choose a File"); // // String[] listItems = new String[movieFileList.size()]; // for(int i=0; i { // checkedItem[0]=which; // largestFile = movieFileList.get(checkedItem[0]); // dialog.dismiss(); // }); // // // set the negative button if the user is not interested to select or change already selected item // alertDialog.setNegativeButton("Cancel", (dialog, which) -> { // // }); // // // create and build the AlertDialog instance with the AlertDialog builder instance // AlertDialog customAlertDialog = alertDialog.create(); // // // show the alert dialog when the button is clicked // customAlertDialog.show(); } }); } private void addToLastPlayed() { Thread thread = new Thread(new Runnable() { @Override public void run() { DatabaseClient.getInstance(getContext()).getAppDatabase().movieDao().updatePlayed(movieDetails.getId()); } }); thread.start(); } private void loadMovieFilesRecycler() { setMyOnClickLiseners(); Thread thread = new Thread(new Runnable() { @Override public void run() { Log.i(" " , "in thread"); if(movieId==0){ movieFileList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getAllByFileName(movieFileName); }else { movieFileList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getAllById(movieId); } mActivity.runOnUiThread(new Runnable() { @Override public void run() { Log.i("movieFileList" , movieFileList.toString()); recyclerViewMovieFiles = mActivity.findViewById(R.id.recyclerAvailableMovieFiles); ScaleCenterItemLayoutManager linearLayoutManager = new ScaleCenterItemLayoutManager(mActivity , LinearLayoutManager.VERTICAL , false); recyclerViewMovieFiles.setLayoutManager(linearLayoutManager); recyclerViewMovieFiles.setHasFixedSize(true); fileAdapter = new FileItemAdapter(getContext() , (List)(List) movieFileList); recyclerViewMovieFiles.setAdapter(fileAdapter); fileAdapter.notifyDataSetChanged(); } }); } }); thread.start(); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/MovieLibraryFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.os.Bundle; import android.util.DisplayMetrics; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.MediaAdapter; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import java.util.List; public class MovieLibraryFragment extends BaseFragment { RecyclerView recyclerViewMovies; MediaAdapter mediaAdapter; MediaAdapter.OnItemClickListener listenerMovie; List movieList; public MovieLibraryFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_movie_library , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); showLibraryMovies(); } void showLibraryMovies() { setOnClickListner(); Thread thread = new Thread(new Runnable() { @Override public void run() { Log.i(" " , "in thread"); if(movieList ==null){ movieList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao().getAll(); } showRecyclerMovies(movieList); } }); thread.start(); } private void showRecyclerMovies(List newmediaList) { mActivity.runOnUiThread(() -> { DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); float dpWidth = displayMetrics.widthPixels / displayMetrics.density; int noOfItems; noOfItems = (int) (dpWidth/120); // if (dpWidth < 600f) { // noOfItems = 3; // } else if (dpWidth < 840f) { // noOfItems = 6; // } else { // noOfItems = 8; // } Log.i(" " , newmediaList.toString()); recyclerViewMovies = mActivity.findViewById(R.id.recyclerLibraryMovies); if(recyclerViewMovies!=null){ recyclerViewMovies.setLayoutManager(new GridLayoutManager(mActivity , noOfItems)); recyclerViewMovies.setHasFixedSize(true); mediaAdapter = new MediaAdapter(mActivity ,(List)(List) newmediaList , listenerMovie); recyclerViewMovies.setAdapter(mediaAdapter); mediaAdapter.notifyDataSetChanged(); } }); } private void setOnClickListner() { listenerMovie = (view , position) -> { MovieDetailsFragment movieDetailsFragment = new MovieDetailsFragment(movieList.get(position).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in , R.anim.fade_out) .add(R.id.container , movieDetailsFragment).addToBackStack(null).commit(); }; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/SearchFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.util.DisplayMetrics; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ScrollView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.textfield.TextInputEditText; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.MediaAdapter; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import java.util.ArrayList; import java.util.List; import java.util.Timer; import java.util.TimerTask; public class SearchFragment extends BaseFragment { RecyclerView recyclerView; RecyclerView recyclerViewGenres; List genreList; MediaAdapter mediaAdapter; List movieList; List tvShowsList; List matchesFound; MediaAdapter.OnItemClickListener listener; TextInputEditText searchBox; Button search; ScrollView scrollview; public SearchFragment() { } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_search, container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); searchBox = view.findViewById(R.id.search_input); // search = view.findViewById(R.id.search_button); // scrollview= view.findViewById(R.id.scrollview); recyclerView = mActivity.findViewById(R.id.recyclersearch); // scrollview.setVisibility(View.VISIBLE); showSearchResults(); // search.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View view) { // showSearchResults(); // } // }); } void showSearchResults(){ setOnClickListner(); try{ searchBox.addTextChangedListener( new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) {} @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {} private Timer timer = new Timer(); private final long DELAY = 500; // milliseconds @Override public void afterTextChanged(final Editable s) { timer.cancel(); timer = new Timer(); timer.schedule( new TimerTask() { @Override public void run() { if(!s.toString().equals("")){ Thread thread = new Thread(new Runnable() { @Override public void run() { Log.i(" ", "in thread"); movieList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .movieDao() .getSearchQuery(searchBox.getText().toString()); tvShowsList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .tvShowDao() .getSearchQuery(searchBox.getText().toString()); matchesFound =new ArrayList<>(); matchesFound.addAll(movieList); matchesFound.addAll(tvShowsList); mActivity.runOnUiThread(new Runnable() { @Override public void run() { DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); float dpWidth = displayMetrics.widthPixels / displayMetrics.density; int noOfItems; if(dpWidth < 600f){noOfItems = 3;} else if(dpWidth < 840f){noOfItems = 6;} else {noOfItems = 8; } Log.i(" ", matchesFound.toString()); recyclerView.setLayoutManager(new GridLayoutManager(mActivity , noOfItems)); recyclerView.setHasFixedSize(true); mediaAdapter = new MediaAdapter(mActivity , matchesFound , listener); recyclerView.setAdapter(mediaAdapter); mediaAdapter.notifyDataSetChanged(); } }); }}); thread.start(); } } }, DELAY ); } } ); }catch (Exception e){ Log.i(e.toString(),"Exception"); } } /** To-Do */ void showbyGenre(){ // Thread thread = new Thread(new Runnable() { // @Override // public void run() { // Log.i(" ", "in thread"); // genreList = DatabaseClient // .getInstance(mCtx) // .getAppDatabase() // .fileDao() // .getSearchQuery(searchBox.getText().toString()); // getActivity().runOnUiThread(new Runnable() { // @Override // public void run() { // Log.i(" ", newmediaList.toString()); // recyclerViewGenres = getView().findViewById(R.id.recyclersearch); // recyclerViewGenres.setLayoutManager(new GridLayoutManager(getContext(), 2)); // recyclerViewGenres.setHasFixedSize(true); // movieRecyclerAdapterLibrary = new MovieRecyclerAdapterLibrary(getContext(),newmediaList,listener); // recyclerViewGenres.setAdapter(movieRecyclerAdapterLibrary); // movieRecyclerAdapterLibrary.notifyDataSetChanged(); // } // }); // }}); // thread.start(); } private void setOnClickListner() { listener = (view , position) -> { if(matchesFound.get(position) instanceof Movie){ MovieDetailsFragment movieDetailsFragment; if(((Movie)matchesFound.get(position)).getId()==0){ movieDetailsFragment = new MovieDetailsFragment(((Movie)matchesFound.get(position)).getFileName()); }else { movieDetailsFragment = new MovieDetailsFragment(((Movie)matchesFound.get(position)).getId()); } mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,movieDetailsFragment).addToBackStack(null).commit(); } if(matchesFound.get(position) instanceof TVShow){ TvShowDetailsFragment tvShowDetailsFragment = new TvShowDetailsFragment(((TVShow)matchesFound.get(position)).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,tvShowDetailsFragment).addToBackStack(null).commit(); } }; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/SeasonDetailsFragment.java ================================================ package com.theflexproject.thunder.fragments; import static com.theflexproject.thunder.Constants.TMDB_BACKDROP_IMAGE_BASE_URL; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.target.Target; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.EpisodeAdapter; import com.theflexproject.thunder.adapter.ScaleCenterItemLayoutManager; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.model.TVShowInfo.Season; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; import com.theflexproject.thunder.player.PlayerActivity; import java.util.List; public class SeasonDetailsFragment extends BaseFragment { String tvShowName; TextView tvShowTitleText; TextView seasonName; // TextView seasonNumber; TextView numberOfEpisodes; TextView overview; TextView overviewText; ImageButton play; ImageView logo; TextView continueWatching; ImageView dot3; TextView episodeTitle; // ImageView poster; ImageView backdrop; TVShowSeasonDetails tvShowSeasonDetails; TVShow tvShow; Season season; RecyclerView episodesRecycler; EpisodeAdapter episodeAdapter; EpisodeAdapter.OnItemClickListener listener; List episodes; Episode nextEpisode; public SeasonDetailsFragment() { // Required empty public constructor } public SeasonDetailsFragment(TVShow tvShow , TVShowSeasonDetails tvShowSeasonDetails) { this.tvShow = tvShow; this.tvShowSeasonDetails = tvShowSeasonDetails; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_season_details_new , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); initWidgets(view); loadDetails(); } private void initWidgets(View view) { tvShowTitleText = view.findViewById(R.id.showTitle); seasonName = view.findViewById(R.id.seasonTitle); // seasonNumber = view.findViewById(R.id.seasonNumber); numberOfEpisodes = view.findViewById(R.id.noOfEpisodesInSeason); overview = view.findViewById(R.id.overviewDescTVShowSeason); // overviewText = view.findViewById(R.id.overviewTextInSeason); // poster = view.findViewById(R.id.seasonPosterInDetails); backdrop = view.findViewById(R.id.tvShowBackdropInSeason); logo = view.findViewById(R.id.tvLogoInSeason); continueWatching = view.findViewById(R.id.continueWatchingText); episodeTitle = view.findViewById(R.id.episodeNameInTvSeason); dot3 = view.findViewById(R.id.dot3); play = view.findViewById(R.id.playInSeasonDetails); episodesRecycler = view.findViewById(R.id.recyclerEpisodes); } private void loadDetails() { try { tvShowName = tvShow.getName(); Thread thread = new Thread(new Runnable() { @Override public void run() { tvShowSeasonDetails = DatabaseClient .getInstance(mActivity) .getAppDatabase() .tvShowSeasonDetailsDao() .find(tvShowSeasonDetails.getId()); episodes = DatabaseClient .getInstance(mActivity) .getAppDatabase() .episodeDao() .getFromThisSeason(tvShow.getId() , tvShowSeasonDetails.getId()); nextEpisode = DatabaseClient .getInstance(mActivity) .getAppDatabase() .episodeDao() .getNextEpisodeInSeason(tvShowSeasonDetails.getId()); System.out.println("episodes in season details" + episodes); Log.i("tvShowDetails Object" , tvShowSeasonDetails.toString()); mActivity.runOnUiThread(new Runnable() { @Override public void run() { String logoLink = tvShow.getLogo_path(); System.out.println("Logo Link"+logoLink); if(!logoLink.equals("")){ logo.setVisibility(View.VISIBLE); Glide.with(mActivity) .load(logoLink) .apply(new RequestOptions() .fitCenter() .override(Target.SIZE_ORIGINAL)) .diskCacheStrategy(DiskCacheStrategy.ALL) .placeholder(new ColorDrawable(Color.TRANSPARENT)) .into(logo); } if(logoLink.equals("")&&tvShow.getName()!=null){ tvShowTitleText.setVisibility(View.VISIBLE); tvShowTitleText.setText(tvShow.getName()); } if (tvShowSeasonDetails.getName() != null) { seasonName.setVisibility(View.VISIBLE); seasonName.setText(tvShowSeasonDetails.getName()); } else { seasonName.setVisibility(View.VISIBLE); seasonName.setText("Season" + tvShowSeasonDetails.getSeason_number()); } int season_number = tvShowSeasonDetails.getSeason_number(); int number_of_episodes = episodes.size(); if (number_of_episodes > 0) { // seasonNumber.setVisibility(View.VISIBLE); // seasonNumber.setText("Season " + season_number); numberOfEpisodes.setVisibility(View.VISIBLE); numberOfEpisodes.setText(number_of_episodes + " Episodes"); } // if (tvShow.getName() != null) { // tvShowTitleText.setText(tvShow.getName()); // } if (tvShowSeasonDetails.getOverview().length() > 1) { // overviewText.setVisibility(View.VISIBLE); // overview.setVisibility(View.VISIBLE); overview.setText(tvShowSeasonDetails.getOverview()); } // if (tvShowSeasonDetails.getPoster_path() != null) { // Glide.with(mActivity) // .load(TMDB_IMAGE_BASE_URL + tvShowSeasonDetails.getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .into(poster); // } else { // Glide.with(mActivity) // .load(TMDB_IMAGE_BASE_URL + tvShow.getPoster_path()) // .placeholder(new ColorDrawable(Color.BLACK)) // .into(poster); // } if (nextEpisode != null && nextEpisode.getStill_path() != null) { Glide.with(mActivity) .load(TMDB_BACKDROP_IMAGE_BASE_URL + nextEpisode.getStill_path()) .placeholder(new ColorDrawable(Color.BLACK)) .into(backdrop); }else if (tvShowSeasonDetails.getPoster_path() != null) { Glide.with(mActivity) .load(TMDB_BACKDROP_IMAGE_BASE_URL + tvShowSeasonDetails.getPoster_path()) .placeholder(new ColorDrawable(Color.BLACK)) .into(backdrop); }else if (tvShow.getBackdrop_path() != null) { Glide.with(mActivity) .load(TMDB_BACKDROP_IMAGE_BASE_URL + tvShow.getBackdrop_path()) .placeholder(new ColorDrawable(Color.BLACK)) .into(backdrop); } else { if (tvShowSeasonDetails.getPoster_path() != null) { Glide.with(mActivity) .load(TMDB_BACKDROP_IMAGE_BASE_URL + tvShowSeasonDetails.getPoster_path()) .placeholder(new ColorDrawable(Color.BLACK)) .into(backdrop); } } if (nextEpisode != null) { mActivity.runOnUiThread(new Runnable() { @Override public void run() { continueWatching.setText("S" + nextEpisode.getSeason_number() + " E" + nextEpisode.getEpisode_number()); // play.setText("S" + nextEpisode.getSeason_number() + " E" + nextEpisode.getEpisode_number()); } }); if(nextEpisode.getName()!=null){ dot3.setVisibility(View.VISIBLE); episodeTitle.setVisibility(View.VISIBLE); episodeTitle.setText(nextEpisode.getName()); } } loadEpisodesRecycler(); } }); } }); thread.start(); } catch (NullPointerException exception) { Log.i("Error" , exception.toString()); } } private void loadEpisodesRecycler() { setOnClickListner(); Thread thread = new Thread(new Runnable() { @Override public void run() { Log.i(" " , "in thread"); mActivity.runOnUiThread(new Runnable() { @Override public void run() { Log.i(" " , episodes.toString()); episodesRecycler = mActivity.findViewById(R.id.recyclerEpisodes); episodesRecycler.setVisibility(View.VISIBLE); ScaleCenterItemLayoutManager linearLayoutManager = new ScaleCenterItemLayoutManager(getContext() , LinearLayoutManager.VERTICAL , false); // recyclerView.setLayoutManager(new LinearLayoutManager(getContext(),RecyclerView.HORIZONTAL,false)); episodesRecycler.setLayoutManager(linearLayoutManager); episodesRecycler.setHasFixedSize(true); episodeAdapter = new EpisodeAdapter(mActivity, episodes , listener); episodesRecycler.setAdapter(episodeAdapter); episodeAdapter.notifyDataSetChanged(); } }); } }); thread.start(); } private void setOnClickListner() { SharedPreferences sharedPreferences = mActivity.getSharedPreferences("Settings" , Context.MODE_PRIVATE); boolean savedEXT = sharedPreferences.getBoolean("EXTERNAL_SETTING" , false); play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (savedEXT) { //External Player addToLastPlayed(); Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(nextEpisode.getUrlString())); intent.setDataAndType(Uri.parse(nextEpisode.getUrlString()) , "video/*"); startActivity(intent); } else { //Play video addToLastPlayed(); Intent in = new Intent(getActivity() , PlayerActivity.class); in.putExtra("url" , nextEpisode.getUrlString()); startActivity(in); Toast.makeText(getContext() , "Play" , Toast.LENGTH_LONG).show(); } } private void addToLastPlayed() { Thread thread = new Thread(new Runnable() { @Override public void run() { DatabaseClient.getInstance(getContext()).getAppDatabase().episodeDao().updatePlayed(nextEpisode.getId()); } }); thread.start(); } }); listener = new EpisodeAdapter.OnItemClickListener() { @Override public void onClick(View view , int position) { EpisodeDetailsFragment episodeDetailsFragment = new EpisodeDetailsFragment(tvShow , tvShowSeasonDetails , episodes.get(position)); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in , R.anim.fade_out , R.anim.fade_in , R.anim.fade_out) .add(R.id.container , episodeDetailsFragment).addToBackStack(null).commit(); } }; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/SettingsFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageButton; import android.widget.NumberPicker; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.widget.AppCompatButton; import androidx.appcompat.widget.SwitchCompat; import com.google.android.material.switchmaterial.SwitchMaterial; import com.theflexproject.thunder.R; import com.theflexproject.thunder.model.GitHubResponse; import com.theflexproject.thunder.utils.CheckForUpdates; import com.theflexproject.thunder.utils.SettingsManager; import java.io.IOException; import java.util.concurrent.Executors; public class SettingsFragment extends BaseFragment { AppCompatButton addIndex; AppCompatButton viewIndexes; AppCompatButton importExportDatabase; AppCompatButton checkForUpdate; ImageButton discord; ImageButton github; ImageButton telegram; SwitchCompat externalPlayerToggle; SwitchMaterial castButtonToggle; SwitchCompat refreshPeriodicallyToggle; Dialog d; SettingsManager settingsManager; public SettingsFragment() {} @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_settings , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); initWidgets(); setStatesOfToggleSwitches(); setMyOnClickListeners(); } private void initWidgets() { addIndex = mActivity.findViewById(R.id.addIndexButton); viewIndexes = mActivity.findViewById(R.id.viewIndexes); importExportDatabase = mActivity.findViewById(R.id.importExportDatabase); checkForUpdate = mActivity.findViewById(R.id.checkforUpdates); discord = mActivity.findViewById(R.id.discordImageButton); github = mActivity.findViewById(R.id.githubImageButton); telegram = mActivity.findViewById(R.id.telegramImageButton); externalPlayerToggle = mActivity.findViewById(R.id.externalPlayerToggle); // castButtonToggle = mActivity.findViewById(R.id.castButtonVisibility); refreshPeriodicallyToggle =mActivity.findViewById(R.id.refreshPeriodicallyToggle); settingsManager = new SettingsManager(mActivity); d = new Dialog(mActivity); } private void setMyOnClickListeners() { addIndex.setOnClickListener(v -> { AddNewIndexFragment nextFrag= new AddNewIndexFragment(); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out) .replace(R.id.settingsContainer, nextFrag).addToBackStack(null).commit(); }); viewIndexes.setOnClickListener(v -> { ManageIndexesFragment manageIndexesFragment = new ManageIndexesFragment(); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.from_right,R.anim.to_left,R.anim.from_left,R.anim.to_right) .replace(R.id.settingsContainer, manageIndexesFragment).addToBackStack(null).commit(); }); importExportDatabase.setOnClickListener( v -> { ManageDatabaseFragment manageDatabaseFragment = new ManageDatabaseFragment(); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.from_right,R.anim.to_left,R.anim.from_left,R.anim.to_right) .replace(R.id.settingsContainer, manageDatabaseFragment).addToBackStack(null).commit(); }); externalPlayerToggle.setOnCheckedChangeListener((buttonView , isChecked) -> { settingsManager.saveExternal(isChecked); }); refreshPeriodicallyToggle.setOnCheckedChangeListener((buttonView , isChecked) -> { // settingsManager.saveRefresh(isChecked); if(isChecked){ showTimeDialog(); }else { settingsManager.saveRefresh(false,0); } }); checkForUpdate.setOnClickListener(v -> { Executors.newSingleThreadExecutor().execute(new Runnable() { @Override public void run() { try { GitHubResponse[] gitHubResponses = new CheckForUpdates().checkForUpdates(); if(gitHubResponses!=null){ UpdateAppFragment updateAppFragment = new UpdateAppFragment(gitHubResponses); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.from_right,R.anim.to_left,R.anim.from_left,R.anim.to_right) .add(R.id.container,updateAppFragment).addToBackStack(null).commit(); }else { mActivity.runOnUiThread(new Runnable() { public void run() { Toast.makeText(mActivity,"Latest Version",Toast.LENGTH_LONG).show(); } }); } } catch (IOException e) { e.printStackTrace(); } } }); }); // castButtonToggle.setOnCheckedChangeListener( // (buttonView , isChecked) -> { // if(isChecked){settingsManager.saveCast(true);}else{settingsManager.saveCast(false);} // }); discord.setOnClickListener(v -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://discord.gg/NWrz5euMJs")))); github.setOnClickListener(v -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/anujd64/Thunder")))); telegram.setOnClickListener(v -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://t.me/+qbLDmvEgC65lMWI1")))); } private void setStatesOfToggleSwitches() { SharedPreferences sharedPreferences = mActivity.getSharedPreferences("Settings", Context.MODE_PRIVATE); boolean savedREF = sharedPreferences.getBoolean("REFRESH_SETTING", false); String s = "Refresh at : "+ sharedPreferences.getInt("REFRESH_TIME",0)+":00"; mActivity.runOnUiThread(new Runnable() { @Override public void run() { refreshPeriodicallyToggle.setText(s); } }); boolean savedEXT = sharedPreferences.getBoolean("EXTERNAL_SETTING", false); boolean savedCAST = sharedPreferences.getBoolean("CAST_SETTING", false); externalPlayerToggle.setChecked(savedEXT); refreshPeriodicallyToggle.setChecked(savedREF); // castButtonToggle.setChecked(savedCAST); } Integer timeToRefresh =0; public void showTimeDialog() { d.setTitle("SelectTime"); d.setContentView(R.layout.refresh_time_dialog); Button b1 = d.findViewById(R.id.button1); // Button b2 = (Button) d.findViewById(R.id.button2); final NumberPicker np = d.findViewById(R.id.numberPicker1); np.setMaxValue(23); np.setMinValue(0); np.setWrapSelectorWheel(false); np.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() { @Override public void onValueChange(NumberPicker picker , int oldVal , int newVal) { timeToRefresh =newVal; } }); b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { settingsManager.saveRefresh(true,timeToRefresh); d.dismiss(); } }); // b2.setOnClickListener(new View.OnClickListener() // { // @Override // public void onClick(View v) { // d.dismiss(); // } // }); d.show(); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/TvShowDetailsFragment.java ================================================ package com.theflexproject.thunder.fragments; import static com.theflexproject.thunder.Constants.TMDB_BACKDROP_IMAGE_BASE_URL; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.net.Uri; import android.os.Bundle; import android.util.DisplayMetrics; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TableRow; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.target.Target; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.MediaAdapter; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.Genre; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; import com.theflexproject.thunder.player.PlayerActivity; import java.util.ArrayList; import java.util.List; public class TvShowDetailsFragment extends BaseFragment { int tvShowId; TextView tvShowTitleText; TextView numberOfSeasons; TextView numberOfEpisodes; TextView overview; TextView listOfFiles; ImageButton play; ImageButton changeTMDB; ImageButton addToList; TableRow genres; TableRow status; TableRow type; TableRow votesAvg; TableRow votesCount; TextView statusText; TextView typeText; TextView genresText; ImageView logo; TextView continueWatching; ImageView dot3; ImageView dot1; TextView episodeTitle; TextView voteAvgText; TextView votesCountText; TextView ratingsText; ImageView ratings; ImageView poster; ImageView backdrop; TVShow tvShowDetails; RecyclerView recyclerViewSeasons; List seasonsList; MediaAdapter mediaAdapter; MediaAdapter.OnItemClickListener listenerSeasonItem; Episode nextEpisode; public TvShowDetailsFragment() { // Required empty public constructor } public TvShowDetailsFragment(int tvShowId) { this.tvShowId = tvShowId; } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_show_details_new , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); initWidgets(view); loadDetails(); } private void initWidgets(View view) { tvShowTitleText = view.findViewById(R.id.tvShowTitle); logo = view.findViewById(R.id.tvLogo); numberOfSeasons = view.findViewById(R.id.noOfSeasons); numberOfEpisodes = view.findViewById(R.id.noOfEpisodes); overview = view.findViewById(R.id.overviewDescTVShow); // poster = view.findViewById(R.id.tvShowPosterInDetails); backdrop = view.findViewById(R.id.tvShowBackdrop); // //TableRows that do not change // type = view.findViewById(R.id.tvShowType); // status = view.findViewById(R.id.tvShowStatus); // genres = view.findViewById(R.id.tvShowGenres); //TextViews that change // statusText = view.findViewById(R.id.tvShowStatusText); // typeText = view.findViewById(R.id.tvShowtypeText); genresText = view.findViewById(R.id.tvShowGenresText); continueWatching = view.findViewById(R.id.continueWatchingText); dot3 = view.findViewById(R.id.dot3); dot1 = view.findViewById(R.id.dot); episodeTitle = view.findViewById(R.id.episodeNameInTv); // ratings = view.findViewById(R.id.ratingsTV); ratingsText = view.findViewById(R.id.ratingsTVText); play = view.findViewById(R.id.playInTVShowDetails); changeTMDB = view.findViewById(R.id.changeShowTMDBId); addToList = view.findViewById(R.id.addToListButtonTV); } private void loadDetails(){ try { Thread thread = new Thread(new Runnable() { @Override public void run() { tvShowDetails = DatabaseClient .getInstance(getContext()) .getAppDatabase() .tvShowDao() .find(tvShowId); nextEpisode = DatabaseClient .getInstance(getContext()) .getAppDatabase() .episodeDao() .getNextEpisodeInTVShow(tvShowDetails.getId()); if(nextEpisode==null){ nextEpisode = DatabaseClient.getInstance(getContext()) .getAppDatabase() .episodeDao() .getFirstAvailableEpisode(tvShowDetails.getId()); } Log.i("tvShowDetails Object",tvShowDetails.toString()); mActivity.runOnUiThread(new Runnable() { @Override public void run() { String logoLink = tvShowDetails.getLogo_path(); System.out.println("Logo Link"+logoLink); if(!logoLink.equals("")){ logo.setVisibility(View.VISIBLE); Glide.with(mActivity) .load(logoLink) .apply(new RequestOptions() .fitCenter() .override(Target.SIZE_ORIGINAL)) .diskCacheStrategy(DiskCacheStrategy.ALL) .placeholder(new ColorDrawable(Color.TRANSPARENT)) .into(logo); } if(logoLink.equals("")&&tvShowDetails.getName()!=null){ tvShowTitleText.setVisibility(View.VISIBLE); tvShowTitleText.setText(tvShowDetails.getName()); } if(tvShowDetails.getGenres()!=null){ // genres.setVisibility(View.VISIBLE); ArrayList genres = tvShowDetails.getGenres(); StringBuilder sb = new StringBuilder(); for (int i=0;i emptySeasons = new ArrayList<>(); // for(TVShowSeasonDetails season : seasonsList) { // List episodeList = DatabaseClient // .getInstance(mActivity) // .getAppDatabase() // .episodeDao() // .getFromThisSeason(tvShowDetails.getId(),season.getId()); // if(episodeList==null || episodeList.size()==0){ // emptySeasons.add(season); // DatabaseClient.getInstance(mActivity).getAppDatabase().tvShowSeasonDetailsDao().deleteById(season.getId()); // } // } // seasonsList.removeAll(emptySeasons); mActivity.runOnUiThread(new Runnable() { @Override public void run() { Log.i("SeasonList in loadSeas", seasonsList.toString()); recyclerViewSeasons = mActivity.findViewById(R.id.recyclerSeasons); // ScaleCenterItemLayoutManager linearLayoutManager = new ScaleCenterItemLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL,false); DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); float dpWidth = displayMetrics.widthPixels / displayMetrics.density; if(dpWidth>600f) { recyclerViewSeasons.setLayoutManager(new LinearLayoutManager(getContext(),RecyclerView.HORIZONTAL,false)); }else { recyclerViewSeasons.setLayoutManager(new GridLayoutManager(getContext(),3)); } // recyclerViewSeasons.setLayoutManager(linearLayoutManager); recyclerViewSeasons.setHasFixedSize(true); mediaAdapter = new MediaAdapter(getContext(),(List)(List) seasonsList,listenerSeasonItem); recyclerViewSeasons.setAdapter(mediaAdapter); mediaAdapter.notifyDataSetChanged(); } }); }}); thread.start(); } private void setOnClickListner(){ SharedPreferences sharedPreferences = mActivity.getSharedPreferences("Settings" , Context.MODE_PRIVATE); boolean savedEXT = sharedPreferences.getBoolean("EXTERNAL_SETTING" , false); play.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (savedEXT) { //External Player addToLastPlayed(); Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse(nextEpisode.getUrlString())); intent.setDataAndType(Uri.parse(nextEpisode.getUrlString()) , "video/*"); startActivity(intent); } else { //Play video addToLastPlayed(); Intent in = new Intent(getActivity() , PlayerActivity.class); in.putExtra("url" , nextEpisode.getUrlString()); startActivity(in); Toast.makeText(getContext() , "Play" , Toast.LENGTH_LONG).show(); } } private void addToLastPlayed() { Thread thread = new Thread(new Runnable() { @Override public void run() { DatabaseClient.getInstance(getContext()).getAppDatabase().episodeDao().updatePlayed(nextEpisode.getId()); } }); thread.start(); } }); addToList.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(tvShowDetails.getAddToList()!=1){ new Thread(new Runnable() { @Override public void run() { DatabaseClient .getInstance(mActivity) .getAppDatabase() .tvShowDao() .updateAddToList(tvShowId); } }).start(); Toast.makeText(mActivity , "Added To List" , Toast.LENGTH_LONG).show(); }else{ new Thread(new Runnable() { @Override public void run() { DatabaseClient .getInstance(mActivity) .getAppDatabase() .tvShowDao() .updateRemoveFromList(tvShowId); } }).start(); Toast.makeText(mActivity , "Removed From List" , Toast.LENGTH_LONG).show(); } } }); changeTMDB.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ChangeTMDBFragment changeTMDBFragment = new ChangeTMDBFragment(tvShowDetails); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out) .add(R.id.container,changeTMDBFragment).addToBackStack(null).commit(); } }); listenerSeasonItem = (view , position) -> { SeasonDetailsFragment seasonDetailsFragment = new SeasonDetailsFragment(tvShowDetails,seasonsList.get(position)); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in,R.anim.fade_out,R.anim.fade_in,R.anim.fade_out) .add(R.id.container,seasonDetailsFragment).addToBackStack(null).commit(); }; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/TvShowsLibraryFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.os.Bundle; import android.util.DisplayMetrics; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.theflexproject.thunder.R; import com.theflexproject.thunder.adapter.MediaAdapter; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import java.util.List; public class TvShowsLibraryFragment extends BaseFragment { RecyclerView recyclerViewTVShows; MediaAdapter mediaAdapter; MediaAdapter.OnItemClickListener listenerTVShow; List tvShowList; public TvShowsLibraryFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_tv_shows_library , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); showLibraryTVShows(); } void showLibraryTVShows() { setOnClickListner(); Thread thread = new Thread(new Runnable() { @Override public void run() { Log.i(" " , "in thread"); if(tvShowList==null){ tvShowList = DatabaseClient .getInstance(mActivity) .getAppDatabase() .tvShowDao().getAllByTitles(); // List emptyTVShows = new ArrayList<>(); // for(TVShow tvShow : tvShowList) { // List seasonsList = DatabaseClient // .getInstance(mActivity) // .getAppDatabase() // .tvShowSeasonDetailsDao() // .findByShowId(tvShow.getId()); // if(seasonsList==null|| seasonsList.size()==0){emptyTVShows.add(tvShow); // DatabaseClient.getInstance(mActivity).getAppDatabase().tvShowDao().deleteById(tvShow.getId()); // } // } // tvShowList.removeAll(emptyTVShows); } showRecyclerTVShows(tvShowList); } }); thread.start(); } private void showRecyclerTVShows(List tvShowList) { mActivity.runOnUiThread(() -> { DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); float dpWidth = displayMetrics.widthPixels / displayMetrics.density; int noOfItems; noOfItems = (int) (dpWidth/120); // if (dpWidth < 600f) { // noOfItems = 3; // } else if (dpWidth < 840f) { // noOfItems = 6; // } else { // noOfItems = 8; // } Log.i(" " , tvShowList.toString()); recyclerViewTVShows = mActivity.findViewById(R.id.recyclerLibraryTVShows); if(recyclerViewTVShows!=null){ recyclerViewTVShows.setLayoutManager(new GridLayoutManager(mActivity , noOfItems)); recyclerViewTVShows.setHasFixedSize(true); mediaAdapter = new MediaAdapter(mActivity, (List)(List)tvShowList, listenerTVShow); recyclerViewTVShows.setAdapter(mediaAdapter); mediaAdapter.notifyDataSetChanged(); } }); } private void setOnClickListner() { listenerTVShow = (view , position) -> { TvShowDetailsFragment tvShowDetailsFragment = new TvShowDetailsFragment(tvShowList.get(position).getId()); mActivity.getSupportFragmentManager().beginTransaction() .setCustomAnimations(R.anim.fade_in , R.anim.fade_out) .add(R.id.container , tvShowDetailsFragment) .addToBackStack(null) .commit(); }; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/fragments/UpdateAppFragment.java ================================================ package com.theflexproject.thunder.fragments; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.theflexproject.thunder.R; import com.theflexproject.thunder.model.GitHubResponse; public class UpdateAppFragment extends BaseFragment { GitHubResponse[] gitHubResponses; TextView whatsNew; Button update; Button notNow; public UpdateAppFragment(GitHubResponse[] gitHubResponse) { // Required empty public constructor this.gitHubResponses=gitHubResponse; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_update_app , container , false); } @Override public void onViewCreated(@NonNull View view , @Nullable Bundle savedInstanceState) { super.onViewCreated(view , savedInstanceState); update = mActivity.findViewById(R.id.update); notNow = mActivity.findViewById(R.id.NotNow); String whatsNewString = gitHubResponses[0].body; whatsNew= mActivity.findViewById(R.id.whatsNew); whatsNew.setText(whatsNewString); update.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(gitHubResponses[0].html_url))); } }); notNow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mActivity.getSupportFragmentManager().popBackStack(); } }); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/Data.java ================================================ package com.theflexproject.thunder.model; import java.util.ArrayList; public class Data { public ArrayList files; @Override public String toString() { return "Data{" + "files=" + files + '}'; } public ArrayList getFiles() { return files; } public void setFiles(ArrayList files) { this.files = files; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/ExternalIds.java ================================================ package com.theflexproject.thunder.model; public class ExternalIds{ public int id; public String imdb_id; public Object freebase_mid; public Object freebase_id; public int tvdb_id; public Object tvrage_id; public Object facebook_id; public String instagram_id; public String twitter_id; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getImdb_id() { return imdb_id; } public void setImdb_id(String imdb_id) { this.imdb_id = imdb_id; } public Object getFreebase_mid() { return freebase_mid; } public void setFreebase_mid(Object freebase_mid) { this.freebase_mid = freebase_mid; } public Object getFreebase_id() { return freebase_id; } public void setFreebase_id(Object freebase_id) { this.freebase_id = freebase_id; } public int getTvdb_id() { return tvdb_id; } public void setTvdb_id(int tvdb_id) { this.tvdb_id = tvdb_id; } public Object getTvrage_id() { return tvrage_id; } public void setTvrage_id(Object tvrage_id) { this.tvrage_id = tvrage_id; } public Object getFacebook_id() { return facebook_id; } public void setFacebook_id(Object facebook_id) { this.facebook_id = facebook_id; } public String getInstagram_id() { return instagram_id; } public void setInstagram_id(String instagram_id) { this.instagram_id = instagram_id; } public String getTwitter_id() { return twitter_id; } public void setTwitter_id(String twitter_id) { this.twitter_id = twitter_id; } @Override public String toString() { return "ExternalIds{" + "id=" + id + ", imdb_id='" + imdb_id + '\'' + ", freebase_mid=" + freebase_mid + ", freebase_id=" + freebase_id + ", tvdb_id=" + tvdb_id + ", tvrage_id=" + tvrage_id + ", facebook_id=" + facebook_id + ", instagram_id='" + instagram_id + '\'' + ", twitter_id='" + twitter_id + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/FanArt/Clearlogo.java ================================================ package com.theflexproject.thunder.model.FanArt; public class Clearlogo { public String id; public String url; public String lang; public String likes; @Override public String toString() { return "Clearlogo{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/FanArt/FanArtMovieResponseModel.java ================================================ package com.theflexproject.thunder.model.FanArt; import java.util.ArrayList; public class FanArtMovieResponseModel{ public String name; public String tmdb_id; public String imdb_id; public ArrayList hdmovielogo; public ArrayList moviebackground; public ArrayList movieposter; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getTmdb_id() { return tmdb_id; } public void setTmdb_id(String tmdb_id) { this.tmdb_id = tmdb_id; } public String getImdb_id() { return imdb_id; } public void setImdb_id(String imdb_id) { this.imdb_id = imdb_id; } public ArrayList getHdmovielogo() { return hdmovielogo; } public void setHdmovielogo(ArrayList hdmovielogo) { this.hdmovielogo = hdmovielogo; } public ArrayList getMoviebackground() { return moviebackground; } public void setMoviebackground(ArrayList moviebackground) { this.moviebackground = moviebackground; } public ArrayList getMovieposter() { return movieposter; } public void setMovieposter(ArrayList movieposter) { this.movieposter = movieposter; } public ArrayList getHdmovieclearart() { return hdmovieclearart; } public void setHdmovieclearart(ArrayList hdmovieclearart) { this.hdmovieclearart = hdmovieclearart; } public ArrayList getMovielogo() { return movielogo; } public void setMovielogo(ArrayList movielogo) { this.movielogo = movielogo; } public ArrayList getMoviethumb() { return moviethumb; } public void setMoviethumb(ArrayList moviethumb) { this.moviethumb = moviethumb; } public ArrayList getMoviedisc() { return moviedisc; } public void setMoviedisc(ArrayList moviedisc) { this.moviedisc = moviedisc; } public ArrayList getMoviebanner() { return moviebanner; } public void setMoviebanner(ArrayList moviebanner) { this.moviebanner = moviebanner; } public ArrayList getMovieart() { return movieart; } public void setMovieart(ArrayList movieart) { this.movieart = movieart; } public ArrayList hdmovieclearart; public ArrayList movielogo; public ArrayList moviethumb; public ArrayList moviedisc; public ArrayList moviebanner; public ArrayList movieart; @Override public String toString() { return "FanArtMovieResponseModel{" + "name='" + name + '\'' + ", tmdb_id='" + tmdb_id + '\'' + ", imdb_id='" + imdb_id + '\'' + ", hdmovielogo=" + hdmovielogo + ", moviebackground=" + moviebackground + ", movieposter=" + movieposter + ", hdmovieclearart=" + hdmovieclearart + ", movielogo=" + movielogo + ", moviethumb=" + moviethumb + ", moviedisc=" + moviedisc + ", moviebanner=" + moviebanner + ", movieart=" + movieart + '}'; } } class Hdmovieclearart{ public String id; public String url; public String lang; public String likes; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } @Override public String toString() { return "Hdmovieclearart{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } } class Movieart{ public String id; public String url; public String lang; public String likes; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } @Override public String toString() { return "Movieart{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } } class Moviebackground{ public String id; public String url; public String lang; public String likes; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } @Override public String toString() { return "Moviebackground{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } } class Moviebanner{ public String id; public String url; public String lang; public String likes; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } @Override public String toString() { return "Moviebanner{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } } class Moviedisc{ public String id; public String url; public String lang; public String likes; public String disc; public String disc_type; } class Movieposter{ public String id; public String url; public String lang; public String likes; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } @Override public String toString() { return "Movieposter{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } } class Moviethumb{ public String id; public String url; public String lang; public String likes; public void setId(String id) { this.id = id; } public void setUrl(String url) { this.url = url; } public void setLang(String lang) { this.lang = lang; } public void setLikes(String likes) { this.likes = likes; } @Override public String toString() { return "Moviethumb{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/FanArt/FanArtTvResponseModel.java ================================================ package com.theflexproject.thunder.model.FanArt; import java.util.ArrayList; class Characterart{ public String id; public String url; public String lang; public String likes; } class Clearart{ public String id; public String url; public String lang; public String likes; } class Hdclearart{ public String id; public String url; public String lang; public String likes; } public class FanArtTvResponseModel{ public String name; public String thetvdb_id; public ArrayList clearlogo; public ArrayList hdtvlogo; public ArrayList clearart; public ArrayList showbackground; public ArrayList tvthumb; public ArrayList seasonposter; public ArrayList seasonthumb; public ArrayList hdclearart; public ArrayList tvbanner; public ArrayList characterart; public ArrayList tvposter; public ArrayList seasonbanner; @Override public String toString() { return "FanArtTvResponseModel{" + "name='" + name + '\'' + ", thetvdb_id='" + thetvdb_id + '\'' + ", clearlogo=" + clearlogo + ", hdtvlogo=" + hdtvlogo + ", clearart=" + clearart + ", showbackground=" + showbackground + ", tvthumb=" + tvthumb + ", seasonposter=" + seasonposter + ", seasonthumb=" + seasonthumb + ", hdclearart=" + hdclearart + ", tvbanner=" + tvbanner + ", characterart=" + characterart + ", tvposter=" + tvposter + ", seasonbanner=" + seasonbanner + '}'; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getThetvdb_id() { return thetvdb_id; } public void setThetvdb_id(String thetvdb_id) { this.thetvdb_id = thetvdb_id; } public ArrayList getClearlogo() { return clearlogo; } public void setClearlogo(ArrayList clearlogo) { this.clearlogo = clearlogo; } public ArrayList getHdtvlogo() { return hdtvlogo; } public void setHdtvlogo(ArrayList hdtvlogo) { this.hdtvlogo = hdtvlogo; } public ArrayList getClearart() { return clearart; } public void setClearart(ArrayList clearart) { this.clearart = clearart; } public ArrayList getShowbackground() { return showbackground; } public void setShowbackground(ArrayList showbackground) { this.showbackground = showbackground; } public ArrayList getTvthumb() { return tvthumb; } public void setTvthumb(ArrayList tvthumb) { this.tvthumb = tvthumb; } public ArrayList getSeasonposter() { return seasonposter; } public void setSeasonposter(ArrayList seasonposter) { this.seasonposter = seasonposter; } public ArrayList getSeasonthumb() { return seasonthumb; } public void setSeasonthumb(ArrayList seasonthumb) { this.seasonthumb = seasonthumb; } public ArrayList getHdclearart() { return hdclearart; } public void setHdclearart(ArrayList hdclearart) { this.hdclearart = hdclearart; } public ArrayList getTvbanner() { return tvbanner; } public void setTvbanner(ArrayList tvbanner) { this.tvbanner = tvbanner; } public ArrayList getCharacterart() { return characterart; } public void setCharacterart(ArrayList characterart) { this.characterart = characterart; } public ArrayList getTvposter() { return tvposter; } public void setTvposter(ArrayList tvposter) { this.tvposter = tvposter; } public ArrayList getSeasonbanner() { return seasonbanner; } public void setSeasonbanner(ArrayList seasonbanner) { this.seasonbanner = seasonbanner; } } class Seasonbanner{ public String id; public String url; public String lang; public String likes; public String season; } class Seasonposter{ public String id; public String url; public String lang; public String likes; } class Seasonthumb{ public String id; public String url; public String lang; public String likes; public String season; } class Showbackground{ public String id; public String url; public String lang; public String likes; public String season; } class Tvbanner{ public String id; public String url; public String lang; public String likes; } class Tvposter{ public String id; public String url; public String lang; public String likes; } class Tvthumb{ public String id; public String url; public String lang; public String likes; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/FanArt/Hdmovielogo.java ================================================ package com.theflexproject.thunder.model.FanArt; public class Hdmovielogo { public String id; public String url; public String lang; public String likes; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } @Override public String toString() { return "Hdmovielogo{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/FanArt/Hdtvlogo.java ================================================ package com.theflexproject.thunder.model.FanArt; public class Hdtvlogo { public String id; public String url; public String lang; public String likes; @Override public String toString() { return "Hdtvlogo{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/FanArt/Movielogo.java ================================================ package com.theflexproject.thunder.model.FanArt; public class Movielogo { public String id; public String url; public String lang; public String likes; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getLikes() { return likes; } public void setLikes(String likes) { this.likes = likes; } @Override public String toString() { return "Movielogo{" + "id='" + id + '\'' + ", url='" + url + '\'' + ", lang='" + lang + '\'' + ", likes='" + likes + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/File.java ================================================ package com.theflexproject.thunder.model; import java.util.Date; public class File { public String id; public String name; public String mimeType; public Date modifiedTime; public String size; public String urlString; public String getUrlstring() { return urlString; } public void setUrlstring(String urlString) { this.urlString = urlString; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getMimeType() { return mimeType; } public void setMimeType(String mimeType) { this.mimeType = mimeType; } public Date getModifiedTime() { return modifiedTime; } public void setModifiedTime(Date modifiedTime) { this.modifiedTime = modifiedTime; } public String getSize() { return size; } public void setSize(String size) { this.size = size; } public String getUrlString() { return urlString; } public void setUrlString(String urlString) { this.urlString = urlString; } @Override public String toString() { return // "{" + "\"File\"" + ':' + "{" + // "\"id\"" + ':' + '\"' + id + '\"' + // ", \"name\"" + ':' + '\"' + name + '\"' + "\"mimeType\"" + ':' + '\"' + mimeType + '\"' + // ", \"modifiedTime\"" + ':' + '\"' + modifiedTime + '\"' + ", \"size\"" + ':' + '\"' + size + '\"' + ", \"urlString\"" + ':' + '\"' + urlString + '\"' + '}' ; // +"}"; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/Genre.java ================================================ package com.theflexproject.thunder.model; public class Genre { public int id; public String name; @Override public String toString() { return // "{" + "\"Genre\"" + ':' + "{" + "\"id\"" + ':' + '\"' + id + '\"' + ", \"name\"" + ':' + '\"' + name + '\"' + '}'; // +"}"; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/GitHubResponse.java ================================================ package com.theflexproject.thunder.model; import java.util.ArrayList; import java.util.Date; class Asset{ public String url; public int id; public String node_id; public String name; public Object label; public Uploader uploader; public String content_type; public String state; public int size; public int download_count; public Date created_at; public Date updated_at; public String browser_download_url; } class Author{ public String login; public int id; public String node_id; public String avatar_url; public String gravatar_id; public String url; public String html_url; public String followers_url; public String following_url; public String gists_url; public String starred_url; public String subscriptions_url; public String organizations_url; public String repos_url; public String events_url; public String received_events_url; public String type; public boolean site_admin; } public class GitHubResponse{ public String url; public String assets_url; public String upload_url; public String html_url; public int id; public Author author; public String node_id; public String tag_name; public String target_commitish; public String name; public boolean draft; public boolean prerelease; public Date created_at; public Date published_at; public ArrayList assets; public String tarball_url; public String zipball_url; public String body; } class Uploader{ public String login; public int id; public String node_id; public String avatar_url; public String gravatar_id; public String url; public String html_url; public String followers_url; public String following_url; public String gists_url; public String starred_url; public String subscriptions_url; public String organizations_url; public String repos_url; public String events_url; public String received_events_url; public String type; public boolean site_admin; } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/IndexLink.java ================================================ package com.theflexproject.thunder.model; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; @Entity public class IndexLink{ @PrimaryKey(autoGenerate = true) @NonNull public int id; public String link; public String username; public String password; public String indexType; public String folderType; public int getDisabled() { return disabled; } public void setDisabled(int disabled) { this.disabled = disabled; } @ColumnInfo(name = "disabled", defaultValue = "0") public int disabled; public String getIndexType() { return indexType; } public void setIndexType(String indexType) { this.indexType = indexType; } public String getFolderType() { return folderType; } public void setFolderType(String folderType) { this.folderType = folderType; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getLink() { return link; } public void setLink(String link) { this.link = link; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/Movie.java ================================================ package com.theflexproject.thunder.model; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; import java.util.ArrayList; import java.util.Date; @Entity public class Movie implements MyMedia{ @PrimaryKey(autoGenerate = true) @NonNull public int fileidForDB; public String fileName; public String mimeType; public Date modifiedTime; public String size; public String urlString; public String getLogo_path() { return logo_path; } public void setLogo_path(String logo_path) { this.logo_path = logo_path; } @ColumnInfo(name = "gd_id", defaultValue = "") public String gd_id; @ColumnInfo(name = "logo_path", defaultValue = "") public String logo_path; @ColumnInfo(name = "index_id", defaultValue = "0") public int index_id; public int getIndex_id() { return index_id; } public void setIndex_id(int index_id) { this.index_id = index_id; } public int getDisabled() { return disabled; } public void setDisabled(int disabled) { this.disabled = disabled; } public int getAddToList() { return addToList; } public void setAddToList(int addToList) { this.addToList = addToList; } @ColumnInfo(name = "addToList", defaultValue = "0") public int addToList; @ColumnInfo(name = "disabled", defaultValue = "0") public int disabled; public int Played; public boolean adult; public String backdrop_path; // public Object belongs_to_collection; public long budget; public ArrayList genres; public String homepage; public int id; public String imdb_id; public String original_language; public String original_title; public String overview; public double popularity; public String poster_path; // public ArrayList production_companies; // public ArrayList production_countries; public String release_date; public long revenue; public int runtime; // public ArrayList spoken_languages; public String status; public String tagline; public String title; public boolean video; public double vote_average; public int vote_count; @Override public String toString() { return "{" + "\"Movie\"" + ':' + "{" + "\"fileidForDB\"" + ':' + '\"' + fileidForDB + '\"' + ", \"fileName\"" + ':' + '\"' + fileName + '\"' + ", \"mimeType\"" + ':' + '\"' + mimeType + '\"' + ", \"modifiedTime\"" + ':' + '\"' + modifiedTime + '\"' + ", \"size\"" + ':' + '\"' + size + '\"' + ", \"urlString\"" + ':' + '\"' + urlString + '\"' + ", \"Played\"" + ':' + '\"' + Played + '\"' + ", \"runtime\"" + ':' + '\"' + runtime + '\"' + ", \"id\"" + ':' + '\"' +id +'\"' + ", \"overview\"" + ':' + '\"' +overview +'\"' + ", \"vote_average\"" + ':' + '\"' +vote_average +'\"' + ", \"vote_count\"" + ':' + '\"' +vote_count +'\"' + ", \"original_language\"" + ':' + '\"' +original_language +'\"' + ", \"imdb_id\"" + ':' + '\"' +imdb_id +'\"' + ", \"id\"" + ':' + '\"' +id +'\"' + ", \"homepage\"" + ':' + '\"' +homepage +'\"' + ", \"genres\"" + ':' + '\"' +genres +'\"' + ", \"budget\"" + ':' + '\"' +budget +'\"' + ", \"backdrop_path\"" + ':' + '\"' +backdrop_path +'\"' + ", \"adult\"" + ':' + '\"' +adult +'\"' + ", \"original_title\"" + ':' + '\"' +original_title +'\"' + ", \"overview\"" + ':' + '\"' +overview +'\"' + ", \"popularity\"" + ':' + '\"' +popularity +'\"' + ", \"poster_path\"" + ':' + '\"' +poster_path +'\"' + ", \"release_date\"" + ':' + '\"' +release_date +'\"' + ", \"revenue\"" + ':' + '\"' +revenue +'\"' + ", \"runtime\"" + ':' + '\"' +runtime +'\"' + ", \"video\"" + ':' + '\"' +video +'\"' + ", \"title\"" + ':' + '\"' +title +'\"' + ", \"tagline\"" + ':' + '\"' +tagline +'\"' + ", \"status\"" + ':' + '\"' +status +'\"' + ", \"logo_path\"" + ':' + '\"' +logo_path +'\"' + // ", production_companies=" + production_companies + // ", production_countries=" + production_countries + // ", spoken_languages=" + spoken_languages + '}' +"}"; } public String getGd_id() { return gd_id; } public void setGd_id(String gd_id) { this.gd_id = gd_id; } public int getFileidForDB() { return fileidForDB; } public void setFileidForDB(int fileidForDB) { this.fileidForDB = fileidForDB; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getMimeType() { return mimeType; } public void setMimeType(String mimeType) { this.mimeType = mimeType; } public Date getModifiedTime() { return modifiedTime; } public void setModifiedTime(Date modifiedTime) { this.modifiedTime = modifiedTime; } public String getSize() { return size; } public void setSize(String size) { this.size = size; } public String getUrlString() { return urlString; } public void setUrlString(String urlString) { this.urlString = urlString; } public int getPlayed() { return Played; } public void setPlayed(int played) { Played = played; } public boolean isAdult() { return adult; } public void setAdult(boolean adult) { this.adult = adult; } public String getBackdrop_path() { return backdrop_path; } public void setBackdrop_path(String backdrop_path) { this.backdrop_path = backdrop_path; } // public Object getBelongs_to_collection() { // return belongs_to_collection; // } // // public void setBelongs_to_collection(Object belongs_to_collection) { // this.belongs_to_collection = belongs_to_collection; // } public ArrayList getGenres() { return genres; } public void setGenres(ArrayList genres) { this.genres = genres; } public String getHomepage() { return homepage; } public void setHomepage(String homepage) { this.homepage = homepage; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getImdb_id() { return imdb_id; } public void setImdb_id(String imdb_id) { this.imdb_id = imdb_id; } public String getOriginal_language() { return original_language; } public void setOriginal_language(String original_language) { this.original_language = original_language; } public String getOriginal_title() { return original_title; } public void setOriginal_title(String original_title) { this.original_title = original_title; } public String getOverview() { return overview; } public void setOverview(String overview) { this.overview = overview; } public double getPopularity() { return popularity; } public void setPopularity(double popularity) { this.popularity = popularity; } public String getPoster_path() { return poster_path; } public void setPoster_path(String poster_path) { this.poster_path = poster_path; } // public ArrayList getProduction_companies() { // return production_companies; // } // // public void setProduction_companies(ArrayList production_companies) { // this.production_companies = production_companies; // } // // public ArrayList getProduction_countries() { // return production_countries; // } // // public void setProduction_countries(ArrayList production_countries) { // this.production_countries = production_countries; // } public String getRelease_date() { return release_date; } public void setRelease_date(String release_date) { this.release_date = release_date; } public int getRuntime() { return runtime; } public void setRuntime(int runtime) { this.runtime = runtime; } // public ArrayList getSpoken_languages() { // return spoken_languages; // } // // public void setSpoken_languages(ArrayList spoken_languages) { // this.spoken_languages = spoken_languages; // } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getTagline() { return tagline; } public void setTagline(String tagline) { this.tagline = tagline; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public boolean isVideo() { return video; } public void setVideo(boolean video) { this.video = video; } public double getVote_average() { return vote_average; } public void setVote_average(double vote_average) { this.vote_average = vote_average; } public int getVote_count() { return vote_count; } public void setVote_count(int vote_count) { this.vote_count = vote_count; } public void setBudget(long budget) { this.budget = budget; } public void setRevenue(long revenue) { this.revenue = revenue; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/MoviesResponseFromTMDB.java ================================================ package com.theflexproject.thunder.model; import java.util.ArrayList; public class MoviesResponseFromTMDB { public int page; public ArrayList results; public int total_pages; @Override public String toString() { return "TMDBResponse{" + "page=" + page + ", results=" + results + ", total_pages=" + total_pages + ", total_results=" + total_results + '}'; } public int total_results; } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/MyMedia.java ================================================ package com.theflexproject.thunder.model; public interface MyMedia { } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/ProductionCompany.java ================================================ package com.theflexproject.thunder.model; public class ProductionCompany { public int id; public String logo_path; public String name; public String origin_country; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getLogo_path() { return logo_path; } public void setLogo_path(String logo_path) { this.logo_path = logo_path; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOrigin_country() { return origin_country; } public void setOrigin_country(String origin_country) { this.origin_country = origin_country; } @Override public String toString() { return "ProductionCompany{" + "id=" + id + ", logo_path='" + logo_path + '\'' + ", name='" + name + '\'' + ", origin_country='" + origin_country + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/ProductionCountry.java ================================================ package com.theflexproject.thunder.model; public class ProductionCountry { public String iso_3166_1; public String name; } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/ResFormat.java ================================================ package com.theflexproject.thunder.model; import androidx.annotation.NonNull; import androidx.room.Entity; import androidx.room.PrimaryKey; @Entity public class ResFormat{ @PrimaryKey(autoGenerate = true) @NonNull public int id; public Data data; public String nextPageToken; public String curPageIndex; public int code; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getNextPageToken() { return nextPageToken; } public void setNextPageToken(String nextPageToken) { this.nextPageToken = nextPageToken; } public String getCurPageIndex() { return curPageIndex; } public void setCurPageIndex(String curPageIndex) { this.curPageIndex = curPageIndex; } public Data getData() { return data; } public void setData(Data data) { this.data = data; } @Override public String toString() { return "ResFormat{" + "nextPageToken='" + nextPageToken + '\'' + ", curPageIndex='" + curPageIndex + '\'' + ", data=" + data.getFiles().toString() + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/SimpleLink.java ================================================ package com.theflexproject.thunder.model; public class SimpleLink{ public String status; public String url; public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } @Override public String toString() { return "SimpleLink{" + "status='" + status + '\'' + ", url='" + url + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/SpokenLanguage.java ================================================ package com.theflexproject.thunder.model; public class SpokenLanguage { public String english_name; public String iso_639_1; public String name; } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/CreatedBy.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; public class CreatedBy { public int id; public String credit_id; public String name; public int gender; public String profile_path; } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/Crew.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; public class Crew { public String department; public String job; public String credit_id; public boolean adult; public int gender; public int id; public String known_for_department; public String name; public String original_name; public double popularity; public String profile_path; public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } public String getJob() { return job; } public void setJob(String job) { this.job = job; } public String getCredit_id() { return credit_id; } public void setCredit_id(String credit_id) { this.credit_id = credit_id; } public boolean isAdult() { return adult; } public void setAdult(boolean adult) { this.adult = adult; } public int getGender() { return gender; } public void setGender(int gender) { this.gender = gender; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getKnown_for_department() { return known_for_department; } public void setKnown_for_department(String known_for_department) { this.known_for_department = known_for_department; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOriginal_name() { return original_name; } public void setOriginal_name(String original_name) { this.original_name = original_name; } public double getPopularity() { return popularity; } public void setPopularity(double popularity) { this.popularity = popularity; } public String getProfile_path() { return profile_path; } public void setProfile_path(String profile_path) { this.profile_path = profile_path; } @Override public String toString() { return "Crew{" + "department='" + department + '\'' + ", job='" + job + '\'' + ", credit_id='" + credit_id + '\'' + ", adult=" + adult + ", gender=" + gender + ", id=" + id + ", known_for_department='" + known_for_department + '\'' + ", name='" + name + '\'' + ", original_name='" + original_name + '\'' + ", popularity=" + popularity + ", profile_path='" + profile_path + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/Episode.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; import com.fasterxml.jackson.annotation.JsonFormat; import com.theflexproject.thunder.model.MyMedia; import java.util.Date; @Entity public class Episode implements MyMedia { @PrimaryKey(autoGenerate = true) @NonNull public int idForDB; public String fileName; public String mimeType; @JsonFormat(pattern="E MMM dd HH:mm:ss z yyyy") public Date modifiedTime; public String size; public String urlString; public int getDisabled() { return disabled; } public void setDisabled(int disabled) { this.disabled = disabled; } @ColumnInfo(name = "index_id", defaultValue = "0") public int index_id; public int getIndex_id() { return index_id; } public void setIndex_id(int index_id) { this.index_id = index_id; } @ColumnInfo(name = "disabled", defaultValue = "0") public int disabled; @ColumnInfo(name = "gd_id", defaultValue = "") public String gd_id; public int Played; public int season_id; public String air_date; public int episode_number; public int id; public String name; public String overview; public String production_code; public int runtime; public int season_number; public long show_id; public String still_path; public double vote_average; public int vote_count; // public ArrayList crew; // public ArrayList guest_stars; @Override public String toString() { return // "{" + "\"Episode\"" + ':' + "{" + "\"idForDB\"" + ':' + '\"' + idForDB + '\"' + ", \"fileName\"" + ':' + '\"' + fileName + '\"' + ", \"mimeType\"" + ':' + '\"' + mimeType + '\"' + ", \"modifiedTime\"" + ':' + '\"' + modifiedTime + '\"' + ", \"size\"" + ':' + '\"' + size + '\"' + ", \"urlString\"" + ':' + '\"' + urlString + '\"' + ", \"Played\"" + ':' + '\"' + Played + '\"' + ", \"season_id\"" + ':' + '\"' + season_id + '\"' + ", \"air_date\"" + ':' + '\"' + air_date + '\"' + ", \"episode_number\"" + ':' + '\"' + episode_number + '\"' + ", \"production_code\"" + ':' + '\"' + production_code + '\"' + ", \"runtime\"" + ':' + '\"' + runtime + '\"' + ", \"season_number\"" + ':' + '\"' + season_number + '\"' + ", \"still_path\"" + ':' + '\"' + still_path + '\"' + ", \"id\"" + ':' + '\"' +id +'\"' + ", \"name\"" + ':' +'\"' + name + '\"' + ", \"overview\"" + ':' + '\"' +overview +'\"' + ", \"vote_average\"" + ':' + '\"' +vote_average +'\"' + ", \"vote_count\"" + ':' + '\"' +vote_count +'\"' + ", \"season_number\"" + ':' + '\"' +season_number +'\"' + ", \"show_id\"" + ':' + '\"' + show_id + '\"' + '}' ; // +"}" ; } public String getGd_id() { return gd_id; } public void setGd_id(String gd_id) { this.gd_id = gd_id; } public String getAir_date() { return air_date; } public void setAir_date(String air_date) { this.air_date = air_date; } public int getEpisode_number() { return episode_number; } public void setEpisode_number(int episode_number) { this.episode_number = episode_number; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOverview() { return overview; } public void setOverview(String overview) { this.overview = overview; } public String getProduction_code() { return production_code; } public void setProduction_code(String production_code) { this.production_code = production_code; } public int getRuntime() { return runtime; } public void setRuntime(int runtime) { this.runtime = runtime; } public int getSeason_number() { return season_number; } public void setSeason_number(int season_number) { this.season_number = season_number; } public long getShow_id() { return show_id; } public void setShow_id(long show_id) { this.show_id = show_id; } public String getStill_path() { return still_path; } public void setStill_path(String still_path) { this.still_path = still_path; } public double getVote_average() { return vote_average; } public void setVote_average(double vote_average) { this.vote_average = vote_average; } public int getVote_count() { return vote_count; } public void setVote_count(int vote_count) { this.vote_count = vote_count; } // public ArrayList getCrew() { // return crew; // } // // public void setCrew(ArrayList crew) { // this.crew = crew; // } // // public ArrayList getGuest_stars() { // return guest_stars; // } // // public void setGuest_stars(ArrayList guest_stars) { // this.guest_stars = guest_stars; // } public String getUrlString() { return urlString; } public void setUrlString(String urlString) { this.urlString = urlString; } public int getIdForDB() { return idForDB; } public void setIdForDB(int idForDB) { this.idForDB = idForDB; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getMimeType() { return mimeType; } public void setMimeType(String mimeType) { this.mimeType = mimeType; } public Date getModifiedTime() { return modifiedTime; } public void setModifiedTime(Date modifiedTime) { this.modifiedTime = modifiedTime; } public String getSize() { return size; } public void setSize(String size) { this.size = size; } public int getPlayed() { return Played; } public void setPlayed(int played) { Played = played; } public int getSeason_id() { return season_id; } public void setSeason_id(int season_id) { this.season_id = season_id; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/GuestStar.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; public class GuestStar { public String character; public String credit_id; public int order; public boolean adult; public int gender; public int id; public String known_for_department; public String name; public String original_name; public double popularity; public String profile_path; public String getCharacter() { return character; } public void setCharacter(String character) { this.character = character; } public String getCredit_id() { return credit_id; } public void setCredit_id(String credit_id) { this.credit_id = credit_id; } public int getOrder() { return order; } public void setOrder(int order) { this.order = order; } public boolean isAdult() { return adult; } public void setAdult(boolean adult) { this.adult = adult; } public int getGender() { return gender; } public void setGender(int gender) { this.gender = gender; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getKnown_for_department() { return known_for_department; } public void setKnown_for_department(String known_for_department) { this.known_for_department = known_for_department; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOriginal_name() { return original_name; } public void setOriginal_name(String original_name) { this.original_name = original_name; } public double getPopularity() { return popularity; } public void setPopularity(double popularity) { this.popularity = popularity; } public String getProfile_path() { return profile_path; } public void setProfile_path(String profile_path) { this.profile_path = profile_path; } @Override public String toString() { return "GuestStar{" + "character='" + character + '\'' + ", credit_id='" + credit_id + '\'' + ", order=" + order + ", adult=" + adult + ", gender=" + gender + ", id=" + id + ", known_for_department='" + known_for_department + '\'' + ", name='" + name + '\'' + ", original_name='" + original_name + '\'' + ", popularity=" + popularity + ", profile_path='" + profile_path + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/LastEpisodeToAir.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; public class LastEpisodeToAir { public String air_date; public int episode_number; public int id; public String name; public String overview; public String production_code; public int runtime; public int season_number; public int show_id; public String still_path; public double vote_average; public int vote_count; public String getAir_date() { return air_date; } public void setAir_date(String air_date) { this.air_date = air_date; } public int getEpisode_number() { return episode_number; } public void setEpisode_number(int episode_number) { this.episode_number = episode_number; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOverview() { return overview; } public void setOverview(String overview) { this.overview = overview; } public String getProduction_code() { return production_code; } public void setProduction_code(String production_code) { this.production_code = production_code; } public int getRuntime() { return runtime; } public void setRuntime(int runtime) { this.runtime = runtime; } public int getSeason_number() { return season_number; } public void setSeason_number(int season_number) { this.season_number = season_number; } public int getShow_id() { return show_id; } public void setShow_id(int show_id) { this.show_id = show_id; } public String getStill_path() { return still_path; } public void setStill_path(String still_path) { this.still_path = still_path; } public double getVote_average() { return vote_average; } public void setVote_average(double vote_average) { this.vote_average = vote_average; } public int getVote_count() { return vote_count; } public void setVote_count(int vote_count) { this.vote_count = vote_count; } @Override public String toString() { return "LastEpisodeToAir{" + "air_date='" + air_date + '\'' + ", episode_number=" + episode_number + ", id=" + id + ", name='" + name + '\'' + ", overview='" + overview + '\'' + ", production_code='" + production_code + '\'' + ", runtime=" + runtime + ", season_number=" + season_number + ", show_id=" + show_id + ", still_path='" + still_path + '\'' + ", vote_average=" + vote_average + ", vote_count=" + vote_count + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/Network.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; public class Network { public int id; public String name; public String logo_path; public String origin_country; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLogo_path() { return logo_path; } public void setLogo_path(String logo_path) { this.logo_path = logo_path; } public String getOrigin_country() { return origin_country; } public void setOrigin_country(String origin_country) { this.origin_country = origin_country; } @Override public String toString() { return "Network{" + "id=" + id + ", name='" + name + '\'' + ", logo_path='" + logo_path + '\'' + ", origin_country='" + origin_country + '\'' + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/Result.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; import java.util.ArrayList; public class Result { public String backdrop_path; public String first_air_date; public ArrayList genre_ids; public long id; public String name; public ArrayList origin_country; public String original_language; public String original_name; public String overview; public double popularity; public String poster_path; public double vote_average; public int vote_count; public String getBackdrop_path() { return backdrop_path; } public void setBackdrop_path(String backdrop_path) { this.backdrop_path = backdrop_path; } public String getFirst_air_date() { return first_air_date; } public void setFirst_air_date(String first_air_date) { this.first_air_date = first_air_date; } public ArrayList getGenre_ids() { return genre_ids; } public void setGenre_ids(ArrayList genre_ids) { this.genre_ids = genre_ids; } public long getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public ArrayList getOrigin_country() { return origin_country; } public void setOrigin_country(ArrayList origin_country) { this.origin_country = origin_country; } public String getOriginal_language() { return original_language; } public void setOriginal_language(String original_language) { this.original_language = original_language; } public String getOriginal_name() { return original_name; } public void setOriginal_name(String original_name) { this.original_name = original_name; } public String getOverview() { return overview; } public void setOverview(String overview) { this.overview = overview; } public double getPopularity() { return popularity; } public void setPopularity(double popularity) { this.popularity = popularity; } public String getPoster_path() { return poster_path; } public void setPoster_path(String poster_path) { this.poster_path = poster_path; } public double getVote_average() { return vote_average; } public void setVote_average(double vote_average) { this.vote_average = vote_average; } public int getVote_count() { return vote_count; } public void setVote_count(int vote_count) { this.vote_count = vote_count; } @Override public String toString() { return "Result{" + "backdrop_path='" + backdrop_path + '\'' + ", first_air_date='" + first_air_date + '\'' + ", genre_ids=" + genre_ids + ", id=" + id + ", name='" + name + '\'' + ", origin_country=" + origin_country + ", original_language='" + original_language + '\'' + ", original_name='" + original_name + '\'' + ", overview='" + overview + '\'' + ", popularity=" + popularity + ", poster_path='" + poster_path + '\'' + ", vote_average=" + vote_average + ", vote_count=" + vote_count + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/Season.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; public class Season { public String air_date; public int episode_count; public int id; public String name; public String overview; public String poster_path; public int season_number; public String getAir_date() { return air_date; } public void setAir_date(String air_date) { this.air_date = air_date; } public int getEpisode_count() { return episode_count; } public void setEpisode_count(int episode_count) { this.episode_count = episode_count; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOverview() { return overview; } public void setOverview(String overview) { this.overview = overview; } public String getPoster_path() { return poster_path; } public void setPoster_path(String poster_path) { this.poster_path = poster_path; } public int getSeason_number() { return season_number; } public void setSeason_number(int season_number) { this.season_number = season_number; } @Override public String toString() { // return "{" + "\"Season\"" + ':' + return "{" + "\"air_date\"" + ':' + '\"' + air_date + '\"' + ", \"episode_count\"" + ':' + '\"' + episode_count + '\"' + ", \"id\"" + ':' + '\"' +id +'\"' + ", \"name\"" + ':' +'\"' + name + '\"' + ", \"overview\"" + ':' + '\"' +overview +'\"' + ", \"poster_path\"" + ':' + '\"' + poster_path +'\"' + ", \"season_number\"" + ':' + '\"' +season_number +'\"' + '}' ; // +"}" ; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/TVShow.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; import com.theflexproject.thunder.model.Genre; import com.theflexproject.thunder.model.MyMedia; import java.util.ArrayList; @Entity public class TVShow implements MyMedia { @PrimaryKey (autoGenerate = true) @NonNull public int idForDB; public boolean adult; public String backdrop_path; public int getAddToList() { return addToList; } public void setAddToList(int addToList) { this.addToList = addToList; } @ColumnInfo(name = "addToList", defaultValue = "0") public int addToList; @ColumnInfo(name = "logo_path", defaultValue = "") public String logo_path; public String homepage; public String first_air_date; public int id; public boolean in_production; public String last_air_date; public String name; public int number_of_episodes; public int number_of_seasons; public String original_name; public String overview; public double popularity; public String original_language; public String poster_path; public String status; public ArrayList seasons; public String tagline; public String type; public double vote_average; public int vote_count; public ArrayList genres; // public ArrayList created_by; // public ArrayList episode_run_time; // public ArrayList networks; // public ArrayList production_companies; // public ArrayList production_countries; // public ArrayList spoken_languages; // public ArrayList origin_country; // public Object next_episode_to_air; // public LastEpisodeToAir last_episode_to_air; // // public ArrayList languages; public boolean isAdult() { return adult; } public void setAdult(boolean adult) { this.adult = adult; } public String getBackdrop_path() { return backdrop_path; } public void setBackdrop_path(String backdrop_path) { this.backdrop_path = backdrop_path; } public String getLogo_path() { return logo_path; } public void setLogo_path(String logo_path) { this.logo_path = logo_path; } // public ArrayList getCreated_by() { // return created_by; // } // // public void setCreated_by(ArrayList created_by) { // this.created_by = created_by; // } // // public ArrayList getEpisode_run_time() { // return episode_run_time; // } // // public void setEpisode_run_time(ArrayList episode_run_time) { // this.episode_run_time = episode_run_time; // } public String getFirst_air_date() { return first_air_date; } public void setFirst_air_date(String first_air_date) { this.first_air_date = first_air_date; } public ArrayList getGenres() { return genres; } public void setGenres(ArrayList genres) { this.genres = genres; } public String getHomepage() { return homepage; } public void setHomepage(String homepage) { this.homepage = homepage; } public int getId() { return id; } public void setId(int id) { this.id = id; } public boolean isIn_production() { return in_production; } public void setIn_production(boolean in_production) { this.in_production = in_production; } // public ArrayList getLanguages() { // return languages; // } // public void setLanguages(ArrayList languages) { // this.languages = languages; // } public String getLast_air_date() { return last_air_date; } public void setLast_air_date(String last_air_date) { this.last_air_date = last_air_date; } // public LastEpisodeToAir getLast_episode_to_air() { // return last_episode_to_air; // } // public void setLast_episode_to_air(LastEpisodeToAir last_episode_to_air) { // this.last_episode_to_air = last_episode_to_air; // } public String getName() { return name; } public void setName(String name) { this.name = name; } // public Object getNext_episode_to_air() { // return next_episode_to_air; // } // // public void setNext_episode_to_air(Object next_episode_to_air) { // this.next_episode_to_air = next_episode_to_air; // } // // public ArrayList getNetworks() { // return networks; // } // // public void setNetworks(ArrayList networks) { // this.networks = networks; // } public int getNumber_of_episodes() { return number_of_episodes; } public void setNumber_of_episodes(int number_of_episodes) { this.number_of_episodes = number_of_episodes; } public int getNumber_of_seasons() { return number_of_seasons; } public void setNumber_of_seasons(int number_of_seasons) { this.number_of_seasons = number_of_seasons; } // public ArrayList getOrigin_country() { // return origin_country; // } // // public void setOrigin_country(ArrayList origin_country) { // this.origin_country = origin_country; // } public String getOriginal_language() { return original_language; } public void setOriginal_language(String original_language) { this.original_language = original_language; } public String getOriginal_name() { return original_name; } public void setOriginal_name(String original_name) { this.original_name = original_name; } public String getOverview() { return overview; } public void setOverview(String overview) { this.overview = overview; } public double getPopularity() { return popularity; } public void setPopularity(double popularity) { this.popularity = popularity; } public String getPoster_path() { return poster_path; } public void setPoster_path(String poster_path) { this.poster_path = poster_path; } // // public ArrayList getProduction_companies() { // return production_companies; // } // // public void setProduction_companies(ArrayList production_companies) { // this.production_companies = production_companies; // } // // public ArrayList getProduction_countries() { // return production_countries; // } // // public void setProduction_countries(ArrayList production_countries) { // this.production_countries = production_countries; // } // public ArrayList getSeasons() { return seasons; } public void setSeasons(ArrayList seasons) { this.seasons = seasons; } // // public ArrayList getSpoken_languages() { // return spoken_languages; // } // // public void setSpoken_languages(ArrayList spoken_languages) { // this.spoken_languages = spoken_languages; // } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getTagline() { return tagline; } public void setTagline(String tagline) { this.tagline = tagline; } public String getType() { return type; } public void setType(String type) { this.type = type; } public double getVote_average() { return vote_average; } public void setVote_average(double vote_average) { this.vote_average = vote_average; } public int getVote_count() { return vote_count; } public void setVote_count(int vote_count) { this.vote_count = vote_count; } public int getIdForDB() { return idForDB; } public void setIdForDB(int idForDB) { this.idForDB = idForDB; } @Override public String toString() { return "TVShow{" + "idForDB=" + idForDB + ", adult=" + adult + ", backdrop_path='" + backdrop_path + '\'' + ", first_air_date='" + first_air_date + '\'' + ", homepage='" + homepage + '\'' + ", id=" + id + ", in_production=" + in_production + ", last_air_date='" + last_air_date + '\'' + ", name='" + name + '\'' + ", number_of_episodes=" + number_of_episodes + ", number_of_seasons=" + number_of_seasons + ", original_language='" + original_language + '\'' + ", original_name='" + original_name + '\'' + ", overview='" + overview + '\'' + ", popularity=" + popularity + ", poster_path='" + poster_path + '\'' + ", seasons=" + seasons + ", status='" + status + '\'' + ", tagline='" + tagline + '\'' + ", type='" + type + '\'' + ", logo_path=" + logo_path + ", vote_average=" + vote_average + ", vote_count=" + vote_count + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/TVShowSeasonDetails.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; import androidx.annotation.NonNull; import androidx.room.Entity; import androidx.room.PrimaryKey; import com.theflexproject.thunder.model.MyMedia; import java.util.ArrayList; @Entity public class TVShowSeasonDetails implements MyMedia { @PrimaryKey (autoGenerate = true) @NonNull public int idfordb; public String _id; public String air_date; public ArrayList episodes; public String name; public String overview; public int id; public String poster_path; public int season_number; public long show_id; @NonNull public String get_id() { return _id; } public void set_id(@NonNull String _id) { this._id = _id; } public String getAir_date() { return air_date; } public void setAir_date(String air_date) { this.air_date = air_date; } public ArrayList getEpisodes() { return episodes; } public void setEpisodes(ArrayList episodes) { this.episodes = episodes; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOverview() { return overview; } public void setOverview(String overview) { this.overview = overview; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getPoster_path() { return poster_path; } public void setPoster_path(String poster_path) { this.poster_path = poster_path; } public int getSeason_number() { return season_number; } public void setSeason_number(int season_number) { this.season_number = season_number; } @NonNull public int getIdfordb() { return idfordb; } public void setIdfordb(int idfordb) { this.idfordb = idfordb; } @Override public String toString() { return "TVShowSeasonDetails{" + "idfordb='" + idfordb + '\'' + ", _id='" + _id + '\'' + ", air_date='" + air_date + '\'' + ", episodes=" + episodes + ", name='" + name + '\'' + ", overview='" + overview + '\'' + ", id=" + id + ", show_id=" + show_id + ", poster_path='" + poster_path + '\'' + ", season_number=" + season_number + '}'; } public long getShow_id() { return show_id; } public void setShow_id(long show_id) { this.show_id = show_id; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/TVShowInfo/TVShowsResponseFromTMDB.java ================================================ package com.theflexproject.thunder.model.TVShowInfo; import java.util.ArrayList; public class TVShowsResponseFromTMDB{ public int page; public ArrayList results; public int total_pages; public int total_results; public int getPage() { return page; } public void setPage(int page) { this.page = page; } public ArrayList getResults() { return results; } public void setResults(ArrayList results) { this.results = results; } public int getTotal_pages() { return total_pages; } public void setTotal_pages(int total_pages) { this.total_pages = total_pages; } public int getTotal_results() { return total_results; } public void setTotal_results(int total_results) { this.total_results = total_results; } @Override public String toString() { return "TVShowsResponseFromTMDB{" + "page=" + page + ", results=" + results + ", total_pages=" + total_pages + ", total_results=" + total_results + '}'; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/tmdbImages/Backdrop.java ================================================ package com.theflexproject.thunder.model.tmdbImages; public class Backdrop { public double aspect_ratio; public int height; public String iso_639_1; public String file_path; public double vote_average; public int vote_count; public int width; public double getAspect_ratio() { return aspect_ratio; } public void setAspect_ratio(double aspect_ratio) { this.aspect_ratio = aspect_ratio; } public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } public String getIso_639_1() { return iso_639_1; } public void setIso_639_1(String iso_639_1) { this.iso_639_1 = iso_639_1; } public String getFile_path() { return file_path; } public void setFile_path(String file_path) { this.file_path = file_path; } public double getVote_average() { return vote_average; } public void setVote_average(double vote_average) { this.vote_average = vote_average; } public int getVote_count() { return vote_count; } public void setVote_count(int vote_count) { this.vote_count = vote_count; } public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/tmdbImages/Logo.java ================================================ package com.theflexproject.thunder.model.tmdbImages; public class Logo { public double aspect_ratio; public int height; public String iso_639_1; public String file_path; public double vote_average; public int vote_count; public int width; public double getAspect_ratio() { return aspect_ratio; } public void setAspect_ratio(double aspect_ratio) { this.aspect_ratio = aspect_ratio; } public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } public String getIso_639_1() { return iso_639_1; } public void setIso_639_1(String iso_639_1) { this.iso_639_1 = iso_639_1; } public String getFile_path() { return file_path; } public void setFile_path(String file_path) { this.file_path = file_path; } public double getVote_average() { return vote_average; } public void setVote_average(double vote_average) { this.vote_average = vote_average; } public int getVote_count() { return vote_count; } public void setVote_count(int vote_count) { this.vote_count = vote_count; } public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/tmdbImages/Poster.java ================================================ package com.theflexproject.thunder.model.tmdbImages; public class Poster { public double aspect_ratio; public int height; public String iso_639_1; public String file_path; public double vote_average; public int vote_count; public int width; public double getAspect_ratio() { return aspect_ratio; } public void setAspect_ratio(double aspect_ratio) { this.aspect_ratio = aspect_ratio; } public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } public String getIso_639_1() { return iso_639_1; } public void setIso_639_1(String iso_639_1) { this.iso_639_1 = iso_639_1; } public String getFile_path() { return file_path; } public void setFile_path(String file_path) { this.file_path = file_path; } public double getVote_average() { return vote_average; } public void setVote_average(double vote_average) { this.vote_average = vote_average; } public int getVote_count() { return vote_count; } public void setVote_count(int vote_count) { this.vote_count = vote_count; } public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/model/tmdbImages/TMDBImagesResponse.java ================================================ package com.theflexproject.thunder.model.tmdbImages; import java.util.ArrayList; public class TMDBImagesResponse{ public ArrayList backdrops; public int id; public ArrayList logos; public ArrayList posters; public ArrayList getBackdrops() { return backdrops; } public void setBackdrops(ArrayList backdrops) { this.backdrops = backdrops; } public int getId() { return id; } public void setId(int id) { this.id = id; } public ArrayList getLogos() { return logos; } public void setLogos(ArrayList logos) { this.logos = logos; } public ArrayList getPosters() { return posters; } public void setPosters(ArrayList posters) { this.posters = posters; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/player/DemoUtil.java ================================================ package com.theflexproject.thunder.player; import android.content.Context; import com.google.android.exoplayer2.DefaultRenderersFactory; import com.google.android.exoplayer2.RenderersFactory; import com.google.android.exoplayer2.database.DatabaseProvider; import com.google.android.exoplayer2.database.StandaloneDatabaseProvider; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DefaultDataSource; import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; import com.google.android.exoplayer2.upstream.cache.Cache; import com.google.android.exoplayer2.upstream.cache.CacheDataSource; import com.google.android.exoplayer2.upstream.cache.NoOpCacheEvictor; import com.google.android.exoplayer2.upstream.cache.SimpleCache; import java.io.File; import java.net.CookieHandler; import java.net.CookieManager; import java.net.CookiePolicy; /** Utility methods for the demo app. */ public final class DemoUtil { private static final String TAG = "DemoUtil"; private static final String DOWNLOAD_CONTENT_DIRECTORY = "downloads"; private static DataSource. Factory dataSourceFactory; private static DataSource. Factory httpDataSourceFactory; private static DatabaseProvider databaseProvider; private static File downloadDirectory; private static Cache downloadCache; public static RenderersFactory buildRenderersFactory( Context context, boolean preferExtensionRenderer) { @DefaultRenderersFactory.ExtensionRendererMode int extensionRendererMode = DefaultRenderersFactory.EXTENSION_RENDERER_MODE_ON; return new DefaultRenderersFactory(context.getApplicationContext()) .setExtensionRendererMode(extensionRendererMode); } public static synchronized DataSource.Factory getHttpDataSourceFactory(Context context) { if (httpDataSourceFactory == null) { if (httpDataSourceFactory == null) { // We don't want to use Cronet, or we failed to instantiate a CronetEngine. CookieManager cookieManager = new CookieManager(); cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ORIGINAL_SERVER); CookieHandler.setDefault(cookieManager); httpDataSourceFactory = new DefaultHttpDataSource.Factory(); } } return httpDataSourceFactory; } /** Returns a {@link DataSource.Factory}. */ public static synchronized DataSource.Factory getDataSourceFactory(Context context) { if (dataSourceFactory == null) { context = context.getApplicationContext(); DefaultDataSource.Factory upstreamFactory = new DefaultDataSource.Factory(context, getHttpDataSourceFactory(context)); dataSourceFactory = buildReadOnlyCacheDataSource(upstreamFactory, getDownloadCache(context)); } return dataSourceFactory; } private static synchronized Cache getDownloadCache(Context context) { if (downloadCache == null) { File downloadContentDirectory = new File(getDownloadDirectory(context), DOWNLOAD_CONTENT_DIRECTORY); downloadCache = new SimpleCache( downloadContentDirectory, new NoOpCacheEvictor(), getDatabaseProvider(context)); } return downloadCache; } private static synchronized DatabaseProvider getDatabaseProvider(Context context) { if (databaseProvider == null) { databaseProvider = new StandaloneDatabaseProvider(context); } return databaseProvider; } private static synchronized File getDownloadDirectory(Context context) { if (downloadDirectory == null) { downloadDirectory = context.getExternalFilesDir(/* type= */ null); if (downloadDirectory == null) { downloadDirectory = context.getFilesDir(); } } return downloadDirectory; } private static CacheDataSource.Factory buildReadOnlyCacheDataSource( DataSource.Factory upstreamFactory, Cache cache) { return new CacheDataSource.Factory() .setCache(cache) .setUpstreamDataSourceFactory(upstreamFactory) .setCacheWriteDataSinkFactory(null) .setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR); } private DemoUtil() {} } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/player/PlayerActivity.java ================================================ package com.theflexproject.thunder.player; import android.content.Intent; import android.content.pm.ActivityInfo; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.Toast; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.ExoPlayer; import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.PlaybackException; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.RenderersFactory; import com.google.android.exoplayer2.audio.AudioAttributes; import com.google.android.exoplayer2.drm.DefaultDrmSessionManagerProvider; import com.google.android.exoplayer2.source.DefaultMediaSourceFactory; import com.google.android.exoplayer2.source.MediaSource; import com.google.android.exoplayer2.trackselection.TrackSelectionParameters; import com.google.android.exoplayer2.ui.StyledPlayerControlView; import com.google.android.exoplayer2.ui.StyledPlayerView; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.util.EventLogger; import com.theflexproject.thunder.R; public class PlayerActivity extends AppCompatActivity implements View.OnClickListener, StyledPlayerView.ControllerVisibilityListener { private static final String KEY_TRACK_SELECTION_PARAMETERS = "track_selection_parameters"; private static final String KEY_ITEM_INDEX = "item_index"; private static final String KEY_POSITION = "position"; private static final String KEY_AUTO_PLAY = "auto_play"; public static final String PREFER_EXTENSION_DECODERS_EXTRA = "prefer_extension_decoders"; protected StyledPlayerView playerView; protected StyledPlayerControlView controlView; protected LinearLayout debugRootView; protected @Nullable ExoPlayer player; private DataSource.Factory dataSourceFactory; private MediaItem mediaItem; private TrackSelectionParameters trackSelectionParameters; private boolean startAutoPlay; private int startItemIndex; private long startPosition; private ImageButton buttonAspectRatio; int uiOptions; View decorView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); decorView = getWindow().getDecorView(); uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; decorView.setSystemUiVisibility(uiOptions); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); dataSourceFactory = DemoUtil.getDataSourceFactory(/* context= */ this); setContentView(); playerView = findViewById(R.id.player_view); playerView.setControllerVisibilityListener(this); playerView.requestFocus(); if (savedInstanceState != null) { trackSelectionParameters = TrackSelectionParameters.fromBundle( savedInstanceState.getBundle(KEY_TRACK_SELECTION_PARAMETERS)); startAutoPlay = savedInstanceState.getBoolean(KEY_AUTO_PLAY); startItemIndex = savedInstanceState.getInt(KEY_ITEM_INDEX); startPosition = savedInstanceState.getLong(KEY_POSITION); } else { trackSelectionParameters = new TrackSelectionParameters.Builder(/* context= */ this).build(); clearStartPosition(); } } @Override public void onNewIntent(Intent intent) { super.onNewIntent(intent); releasePlayer(); clearStartPosition(); setIntent(intent); } @Override public void onStart() { super.onStart(); if (Build.VERSION.SDK_INT > 23) { initializePlayer(); if (playerView != null) { playerView.onResume(); } } } @Override public void onResume() { super.onResume(); if (Build.VERSION.SDK_INT <= 23 || player == null) { initializePlayer(); if (playerView != null) { playerView.onResume(); } } } @Override public void onPause() { super.onPause(); if (Build.VERSION.SDK_INT <= 23) { if (playerView != null) { playerView.onPause(); } releasePlayer(); } } @Override public void onStop() { super.onStop(); if (Build.VERSION.SDK_INT > 23) { if (playerView != null) { playerView.onPause(); } releasePlayer(); } } @Override public void onDestroy() { super.onDestroy(); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); updateTrackSelectorParameters(); updateStartPosition(); outState.putBundle(KEY_TRACK_SELECTION_PARAMETERS, trackSelectionParameters.toBundle()); outState.putBoolean(KEY_AUTO_PLAY, startAutoPlay); outState.putInt(KEY_ITEM_INDEX, startItemIndex); outState.putLong(KEY_POSITION, startPosition); } // Activity input @Override public boolean dispatchKeyEvent(KeyEvent event) { // See whether the player view wants to handle media or DPAD keys events. return playerView.dispatchKeyEvent(event) || super.dispatchKeyEvent(event); } // OnClickListener methods // StyledPlayerView.ControllerVisibilityListener implementation @Override public void onVisibilityChanged(int visibility) { } @Override public void onClick(View view) { } // Internal methods protected void setContentView() { setContentView(R.layout.activity_player); } /** * @return Whether initialization was successful. */ protected boolean initializePlayer() { if (player == null) { Intent intent = getIntent(); String urlString = intent.getStringExtra("url"); Uri uri = Uri.parse(urlString); Log.i("Inside Player",uri.toString()); mediaItem = MediaItem.fromUri(uri); ExoPlayer.Builder playerBuilder = new ExoPlayer.Builder(/* context= */ this) .setMediaSourceFactory(createMediaSourceFactory()); setRenderersFactory( playerBuilder, intent.getBooleanExtra(PREFER_EXTENSION_DECODERS_EXTRA, false)); player = playerBuilder.build(); player.setTrackSelectionParameters(trackSelectionParameters); player.addListener(new PlayerEventListener()); player.addAnalyticsListener(new EventLogger()); player.setAudioAttributes(AudioAttributes.DEFAULT, /* handleAudioFocus= */ true); player.setPlayWhenReady(startAutoPlay); playerView.setPlayer(player); } boolean haveStartPosition = startItemIndex != C.INDEX_UNSET; if (haveStartPosition) { player.seekTo(startItemIndex, startPosition); } player.setMediaItem(mediaItem, /* resetPosition= */ !haveStartPosition); player.prepare(); return true; } private MediaSource.Factory createMediaSourceFactory() { DefaultDrmSessionManagerProvider drmSessionManagerProvider = new DefaultDrmSessionManagerProvider(); drmSessionManagerProvider.setDrmHttpDataSourceFactory( DemoUtil.getHttpDataSourceFactory(/* context= */ this)); return new DefaultMediaSourceFactory(/* context= */ this) .setDataSourceFactory(dataSourceFactory) .setDrmSessionManagerProvider(drmSessionManagerProvider); } private void setRenderersFactory( ExoPlayer.Builder playerBuilder, boolean preferExtensionDecoders) { RenderersFactory renderersFactory = DemoUtil.buildRenderersFactory(/* context= */ this, preferExtensionDecoders); playerBuilder.setRenderersFactory(renderersFactory); } protected void releasePlayer() { if (player != null) { updateTrackSelectorParameters(); updateStartPosition(); player.release(); player = null; playerView.setPlayer(/* player= */ null); } } private void updateTrackSelectorParameters() { if (player != null) { trackSelectionParameters = player.getTrackSelectionParameters(); } } private void updateStartPosition() { if (player != null) { startAutoPlay = player.getPlayWhenReady(); startItemIndex = player.getCurrentMediaItemIndex(); startPosition = Math.max(0, player.getContentPosition()); } } protected void clearStartPosition() { startAutoPlay = true; startItemIndex = C.INDEX_UNSET; startPosition = C.TIME_UNSET; } private void showControls() { } private void showToast(int messageId) { showToast(getString(messageId)); } private void showToast(String message) { Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show(); } private class PlayerEventListener implements Player.Listener { @Override public void onPlaybackStateChanged(@Player.State int playbackState) { if (playbackState == Player.STATE_ENDED) { showControls(); } decorView.setSystemUiVisibility(uiOptions); } @Override public void onPlayerError(PlaybackException error) { if (error.errorCode == PlaybackException.ERROR_CODE_BEHIND_LIVE_WINDOW) { player.seekToDefaultPosition(); player.prepare(); } else { showControls(); } } } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/AnimeNameExtractor.java ================================================ package com.theflexproject.thunder.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; public class AnimeNameExtractor { private static final Pattern ANIME_NAME_PATTERN = Pattern.compile("\\[(.+)?\\] (.+?) (S\\d* )?- (\\d+) (\\[(.+)\\])?"); public static String[] getAnimeName (String matchString) { String animeName; String seasonNumber; String episodeNumber; Matcher m = ANIME_NAME_PATTERN.matcher(matchString); if (m.matches()) { animeName= m.group(2); seasonNumber= m.group(3); episodeNumber= m.group(4); System.out.println("In animeExtractor"+animeName +seasonNumber+ episodeNumber); return new String[]{animeName , seasonNumber , episodeNumber}; } return null; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/BlurBitmap.java ================================================ //package com.theflexproject.thunder.utils; // //import android.graphics.Bitmap; // //public class BlurBitmap { // private static final int BLUR_RADIUS = 5; // private static final int BITMAP_SCALE = 1; // static Bitmap sentBitmap = null; // public static Bitmap fastBlur(Bitmap sentBitmap) { // // if(sentBitmap!=null){ // int radius = BLUR_RADIUS; // // int width = sentBitmap.getWidth(); // int height = sentBitmap.getHeight(); // sentBitmap = Bitmap.createScaledBitmap(sentBitmap , width , height , false); // // Bitmap bitmap = sentBitmap.copy(sentBitmap.getConfig() , true); // // int w = bitmap.getWidth(); // int h = bitmap.getHeight(); // // int[] pix = new int[w * h]; // // bitmap.getPixels(pix , 0 , w , 0 , 0 , w , h); // // int wm = w - 1; // int hm = h - 1; // int wh = w * h; // int div = radius + radius + 1; // // int[] r = new int[wh]; // int[] g = new int[wh]; // int[] b = new int[wh]; // int rsum, gsum, bsum, x, y, i, p, yp, yi, yw; // int[] vmin = new int[Math.max(w , h)]; // // int divsum = (div + 1) >> 1; // divsum *= divsum; // int[] dv = new int[256 * divsum]; // for (i = 0; i < 256 * divsum; i++) { // dv[i] = (i / divsum); // } // // yw = yi = 0; // // int[][] stack = new int[div][3]; // int stackpointer; // int stackstart; // int[] sir; // int rbs; // int r1 = radius + 1; // int routsum, goutsum, boutsum; // int rinsum, ginsum, binsum; // // for (y = 0; y < h; y++) { // rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; // for (i = -radius; i <= radius; i++) { // p = pix[yi + Math.min(wm , Math.max(i , 0))]; // sir = stack[i + radius]; // sir[0] = (p & 0xff0000) >> 16; // sir[1] = (p & 0x00ff00) >> 8; // sir[2] = (p & 0x0000ff); // rbs = r1 - Math.abs(i); // rsum += sir[0] * rbs; // gsum += sir[1] * rbs; // bsum += sir[2] * rbs; // if (i > 0) { // rinsum += sir[0]; // ginsum += sir[1]; // binsum += sir[2]; // } else { // routsum += sir[0]; // goutsum += sir[1]; // boutsum += sir[2]; // } // } // stackpointer = radius; // // for (x = 0; x < w; x++) { // // r[yi] = dv[rsum]; // g[yi] = dv[gsum]; // b[yi] = dv[bsum]; // // rsum -= routsum; // gsum -= goutsum; // bsum -= boutsum; // // stackstart = stackpointer - radius + div; // sir = stack[stackstart % div]; // // routsum -= sir[0]; // goutsum -= sir[1]; // boutsum -= sir[2]; // // if (y == 0) { // vmin[x] = Math.min(x + radius + 1 , wm); // } // p = pix[yw + vmin[x]]; // // sir[0] = (p & 0xff0000) >> 16; // sir[1] = (p & 0x00ff00) >> 8; // sir[2] = (p & 0x0000ff); // // rinsum += sir[0]; // ginsum += sir[1]; // binsum += sir[2]; // // rsum += rinsum; // gsum += ginsum; // bsum += binsum; // // stackpointer = (stackpointer + 1) % div; // sir = stack[(stackpointer) % div]; // // routsum += sir[0]; // goutsum += sir[1]; // boutsum += sir[2]; // // rinsum -= sir[0]; // ginsum -= sir[1]; // binsum -= sir[2]; // // yi++; // } // yw += w; // } // for (x = 0; x < w; x++) { // rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; // yp = -radius * w; // for (i = -radius; i <= radius; i++) { // yi = Math.max(0 , yp) + x; // // sir = stack[i + radius]; // // sir[0] = r[yi]; // sir[1] = g[yi]; // sir[2] = b[yi]; // // rbs = r1 - Math.abs(i); // // rsum += r[yi] * rbs; // gsum += g[yi] * rbs; // bsum += b[yi] * rbs; // // if (i > 0) { // rinsum += sir[0]; // ginsum += sir[1]; // binsum += sir[2]; // } else { // routsum += sir[0]; // goutsum += sir[1]; // boutsum += sir[2]; // } // // if (i < hm) { // yp += w; // } // } // yi = x; // stackpointer = radius; // for (y = 0; y < h; y++) { // // Preserve alpha channel: ( 0xff000000 & pix[yi] ) // pix[yi] = (0xff000000 & pix[yi]) | (dv[rsum] << 16) | (dv[gsum] << 8) | dv[bsum]; // // rsum -= routsum; // gsum -= goutsum; // bsum -= boutsum; // // stackstart = stackpointer - radius + div; // sir = stack[stackstart % div]; // // routsum -= sir[0]; // goutsum -= sir[1]; // boutsum -= sir[2]; // // if (x == 0) { // vmin[y] = Math.min(y + r1 , hm) * w; // } // p = x + vmin[y]; // // sir[0] = r[p]; // sir[1] = g[p]; // sir[2] = b[p]; // // rinsum += sir[0]; // ginsum += sir[1]; // binsum += sir[2]; // // rsum += rinsum; // gsum += ginsum; // bsum += binsum; // // stackpointer = (stackpointer + 1) % div; // sir = stack[stackpointer]; // // routsum += sir[0]; // goutsum += sir[1]; // boutsum += sir[2]; // // rinsum -= sir[0]; // ginsum -= sir[1]; // binsum -= sir[2]; // // yi += w; // } // } // // bitmap.setPixels(pix , 0 , w , 0 , 0 , w , h); // return (bitmap); // // } // return sentBitmap; // } // //} ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/CheckForUpdates.java ================================================ package com.theflexproject.thunder.utils; import android.util.Log; import com.google.gson.Gson; import com.theflexproject.thunder.BuildConfig; import com.theflexproject.thunder.fragments.BaseFragment; import com.theflexproject.thunder.model.GitHubResponse; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class CheckForUpdates extends BaseFragment { public GitHubResponse[] checkForUpdates() throws IOException { String GET_URL = "https://api.github.com/repos/anujd64/Thunder/releases"; int versionCode = BuildConfig.VERSION_CODE; String versionName = BuildConfig.VERSION_NAME; GitHubResponse[] gitHubResponse; StringBuffer response = null; URL obj = new URL(GET_URL); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); System.out.println("GET Response Code :: " + responseCode); if (responseCode == HttpURLConnection.HTTP_OK) { // success BufferedReader in = new BufferedReader(new InputStreamReader( con.getInputStream())); String inputLine; response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); Gson gson = new Gson(); gitHubResponse = gson.fromJson(response.toString() ,GitHubResponse[].class); String gitHubVersion = gitHubResponse[0].tag_name.substring(1); Log.i("Check fOr Update",gitHubVersion + "current" + versionName ); if(versionCompare(gitHubVersion,versionName)==1){ /**UpdateFragment*/ return gitHubResponse; } } else { System.out.println("GET request did not work"); } assert response != null; Log.i("Check fOr Update",response.toString()); return null; } static int versionCompare(String v1, String v2) { int vnum1 = 0, vnum2 = 0; for (int i = 0, j = 0; (i < v1.length() || j < v2.length());) { while (i < v1.length() && v1.charAt(i) != '.') { vnum1 = vnum1 * 10 + (v1.charAt(i) - '0'); i++; } while (j < v2.length() && v2.charAt(j) != '.') { vnum2 = vnum2 * 10 + (v2.charAt(j) - '0'); j++; } if (vnum1 > vnum2) return 1; if (vnum2 > vnum1) return -1; vnum1 = vnum2 = 0; i++; j++; } return 0; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/IndexUtils.java ================================================ package com.theflexproject.thunder.utils; import static com.theflexproject.thunder.MainActivity.context; import static com.theflexproject.thunder.utils.SendPostRequest.postRequestGDIndex; import static com.theflexproject.thunder.utils.SendPostRequest.postRequestGoIndex; import static com.theflexproject.thunder.utils.SendPostRequest.postRequestMapleIndex; import static com.theflexproject.thunder.utils.SendPostRequest.postRequestSimpleProgramIndex; import android.content.Context; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.IndexLink; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; import java.util.List; public class IndexUtils{ public static boolean refreshIndex(Context mContext , IndexLink indexLink) { Thread thread = null; // if(!deleteIndex(indexLink)){ thread = new Thread(new Runnable() { @Override public void run() { String folderType = indexLink.getFolderType(); String indexType = indexLink.getIndexType(); String link =indexLink.getLink(); String user =indexLink.getUsername(); String pass =indexLink.getPassword(); System.out.println("Before setting id"+ indexLink.getId()); // int id = indexLink.getId(); // DatabaseClient.getInstance(context).getAppDatabase().indexLinksDao().deleteById(indexLink.getId()); IndexLink indexLinkAgain = DatabaseClient.getInstance(mContext).getAppDatabase().indexLinksDao().find(link); if(indexLinkAgain==null){ DatabaseClient.getInstance(mContext).getAppDatabase().indexLinksDao().insert(indexLink); } int id =indexLinkAgain.getId(); System.out.println("After setting id"+ indexLinkAgain.getId()); if(folderType.equals("Movies")) { if(indexType.equals("GDIndex")) { postRequestGDIndex(link,user,pass,false,id); } if(indexType.equals("GoIndex")) { postRequestGoIndex(link,user,pass,false,id); } if(indexType.equals("MapleIndex")){ postRequestMapleIndex(link,user,pass,false,id); } if(indexType.equals("SimpleProgram")){ postRequestSimpleProgramIndex(link,user,pass,false,id); } } if(folderType.equals("TVShows")){ if(indexType.equals("GDIndex")) { postRequestGDIndex(link,user,pass,true,id); } if(indexType.equals("GoIndex")) { postRequestGoIndex(link,user,pass,true,id); } if(indexType.equals("MapleIndex")){ postRequestMapleIndex(link,user,pass,true,id); } if(indexType.equals("SimpleProgram")){ postRequestSimpleProgramIndex(link,user,pass,true,id); } } } }); thread.start(); return thread.isAlive(); // } // return thread.isAlive(); } public static boolean deleteIndex(Context mContext,IndexLink indexLink) { Thread thread = new Thread(new Runnable() { @Override public void run() { if (indexLink.getFolderType().equals("Movies")) { DatabaseClient.getInstance(mContext) .getAppDatabase() .movieDao() .deleteAllFromthisIndex(indexLink.getId()); } if (indexLink.getFolderType().equals("TVShows")) { DatabaseClient.getInstance(mContext) .getAppDatabase() .episodeDao() .deleteAllFromThisIndex(indexLink.getId()); List seasonsList = DatabaseClient .getInstance(mContext) .getAppDatabase() .tvShowSeasonDetailsDao() .getAll(); for(TVShowSeasonDetails season : seasonsList) { List episodeList = DatabaseClient .getInstance(mContext) .getAppDatabase() .episodeDao() .getFromSeasonOnly(season.getId()); if(episodeList==null || episodeList.size()==0){ DatabaseClient.getInstance(mContext).getAppDatabase().tvShowSeasonDetailsDao().deleteById(season.getId()); } } List tvShowList = DatabaseClient .getInstance(mContext) .getAppDatabase() .tvShowDao().getAll(); for(TVShow tvShow : tvShowList) { List seasonsInThisShow = DatabaseClient .getInstance(mContext) .getAppDatabase() .tvShowSeasonDetailsDao() .findByShowId(tvShow.getId()); if(seasonsInThisShow==null|| seasonsInThisShow.size()==0){ DatabaseClient.getInstance(mContext).getAppDatabase().tvShowDao().deleteById(tvShow.getId()); } } } DatabaseClient.getInstance(mContext) .getAppDatabase() .indexLinksDao() .deleteById(indexLink.getId()); } }); thread.start(); try{ thread.join(); }catch (InterruptedException e){ System.out.println(e.toString()); } return thread.isAlive(); } static int noOfMedia = 0; public static int getNoOfMedia(Context mContext,IndexLink t) { Thread thread = new Thread(new Runnable() { @Override public void run() { noOfMedia = 0; if(t.getFolderType()!=null && t.getFolderType().equals("Movies")){ noOfMedia = DatabaseClient.getInstance(mContext).getAppDatabase().movieDao().getNoOfMovies(t.getId()); System.out.println("noOfMedia after calculation"+noOfMedia); } if(t.getFolderType()!=null && t.getFolderType().equals("TVShows")){ noOfMedia = DatabaseClient.getInstance(mContext).getAppDatabase().episodeDao().getNoOfShows(t.getId()); System.out.println("noOfMedia after calculation"+noOfMedia); } } }); thread.start(); try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("noOfMedia after calculation"+noOfMedia); return noOfMedia; } public static void disableIndex(Context mContext,IndexLink indexLink){ Thread thread = new Thread(new Runnable() { @Override public void run() { if(indexLink.getFolderType().equals("Movies")){ DatabaseClient.getInstance(mContext).getAppDatabase().movieDao().disableFromThisIndex(indexLink.getId()); } if(indexLink.getFolderType().equals("TVShows")){ DatabaseClient.getInstance(mContext).getAppDatabase().episodeDao().disableFromThisIndex(indexLink.getId()); } DatabaseClient.getInstance(mContext).getAppDatabase().indexLinksDao().disableIndex(indexLink.getId()); } }); thread.start(); } public static void enableIndex(Context mContext,IndexLink indexLink){ Thread thread = new Thread(new Runnable() { @Override public void run() { if(indexLink.getFolderType().equals("Movies")){ DatabaseClient.getInstance(mContext).getAppDatabase().movieDao().enableFromThisIndex(indexLink.getId()); } if(indexLink.getFolderType().equals("TVShows")){ DatabaseClient.getInstance(mContext).getAppDatabase().episodeDao().enableFromThisIndex(indexLink.getId()); System.out.println("noOfMedia after calculation"+noOfMedia); } DatabaseClient.getInstance(mContext).getAppDatabase().indexLinksDao().enableIndex(indexLink.getId()); } }); thread.start(); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/MovieQualityExtractor.java ================================================ package com.theflexproject.thunder.utils; import java.util.regex.Pattern; public class MovieQualityExtractor { public static String extractQualtiy(String name){ if(Pattern.compile(Pattern.quote("DOVI"), Pattern.CASE_INSENSITIVE).matcher(name).find() && name.contains("2160")){return "4K Dolby Vision";} if(Pattern.compile(Pattern.quote("DOVI"), Pattern.CASE_INSENSITIVE).matcher(name).find() && name.contains("1080")){return "1080p Dolby Vision";} if(Pattern.compile(Pattern.quote("HDR"), Pattern.CASE_INSENSITIVE).matcher(name).find() && name.contains("2160")) return "4K HDR"; if(Pattern.compile(Pattern.quote("HDR"), Pattern.CASE_INSENSITIVE).matcher(name).find() && name.contains("1080")) return "1080p HDR"; if(Pattern.compile(Pattern.quote("Dolby Vision"), Pattern.CASE_INSENSITIVE).matcher(name).find() || Pattern.compile(Pattern.quote("DVSUX"), Pattern.CASE_INSENSITIVE).matcher(name).find()) return "Dolby Vision"; if(name.contains("2160")) return "2160p"; if(name.contains("1080")) return "1080p"; if(name.contains("720")) return "720p"; if(name.contains("480")) return "480p"; if(name.contains("XviD")||name.contains("XVID")) return "XVID"; if(name.contains("ION10")) return "ION10"; return null; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/MovieTitleExtractor2.java ================================================ package com.theflexproject.thunder.utils; import static com.theflexproject.thunder.utils.ParseUtils.BRACKETS; import static com.theflexproject.thunder.utils.ParseUtils.removeAfterEmptyParenthesis; import static com.theflexproject.thunder.utils.ParseUtils.yearExtractor; import android.util.Pair; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; public class MovieTitleExtractor2 { public static MovieTitleExtractor2 instance() { return INSTANCE; } private static final MovieTitleExtractor2 INSTANCE = new MovieTitleExtractor2(); private MovieTitleExtractor2() { } public static String[] getTitle2(String input) { String name = input; // extract the last year from the string String year = null; // matches "[space or punctuation/brackets etc]year", year is group 1 // "[\\s\\p{Punct}]((?:19|20)\\d{2})(?!\\d)" Pair nameYear = yearExtractor(name); name = nameYear.first; year = nameYear.second; // remove junk behind () that was containing year // applies to movieName (1928) junk -> movieName () junk -> movieName name = removeAfterEmptyParenthesis(name); // Strip out starting numbering for collections "1. ", "1) ", "1 - ", "1.-.", "1._"... but not "1.Foo" or "1-Foo" name = ParseUtils.removeNumbering(name); // Strip out starting numbering for collections "1-" name = ParseUtils.removeNumberingDash(name); // Strip out everything else in brackets <[{( .. )})>, most of the time teams names, etc name = StringUtils.replaceAll(name, "", BRACKETS); // strip away known case sensitive garbage name = cutOffBeforeFirstMatch(name, GARBAGE_CASESENSITIVE_PATTERNS); // replace all remaining whitespace & punctuation with a single space name = ParseUtils.removeInnerAndOutterSeparatorJunk(name); // append a " " to aid next step // > "Foo bar 1080p AC3 " to find e.g. " AC3 " name = name + " "; // try to remove more garbage, this time " garbage " syntax // method will compare with lowercase name automatically name = cutOffBeforeFirstMatch(name, GARBAGE_LOWERCASE); name = name.trim(); String[] nameYear2 ={name,year}; return nameYear2; } // Common garbage in movies names to determine where the garbage starts in the name // tested against strings like "real movie name dvdrip 1080p power " private static final String[] GARBAGE_LOWERCASE = { " dvdrip ", " dvd rip ", "dvdscreener ", " dvdscr ", " dvd scr ", " brrip ", " br rip ", " bdrip", " bd rip ", " blu ray ", " bluray ", " hddvd ", " hd dvd ", " hdrip ", " hd rip ", " hdlight ", " minibdrip ", " webrip ", " web rip ", " 720p ", " 1080p ", " 1080i ", " 720 ", " 1080 ", " 480i ", " 2160p ", " 4k ", " 480p ", " 576p ", " 576i ", " 240p ", " 360p ", " 4320p ", " 8k ", " hdtv ", " sdtv ", " m hd ", " ultrahd ", " mhd ", " h264 ", " x264 ", " aac ", " ac3 ", " ogm ", " dts ", " hevc ", " x265 ", " av1 ", " avi ", " mkv ", " xvid ", " divx ", " wmv ", " mpg ", " mpeg ", " flv ", " f4v ", " asf ", " vob ", " mp4 ", " mov ", " directors cut ", " dircut ", " readnfo ", " read nfo ", " repack ", " rerip ", " multi ", " remastered ", " truefrench ", " srt ", " extended cut ", " sbs ", " hsbs ", " side by side ", " sidebyside ", /* Side-By-Side 3d stuff */ " 3d ", " h sbs ", " h tb " , " tb ", " htb ", " top bot ", " topbot ", " top bottom ", " topbottom ", " tab ", " htab ", /* Top-Bottom 3d stuff */ " anaglyph ", " anaglyphe ", /* Anaglyph 3d stuff */ " truehd ", " atmos ", " uhd ", " hdr10+ ", " hdr10 ", " hdr ", " dolby ", " dts-x ", " dts-hd.ma ", " hfr ", }; // denoise filter Default = @"(([\(\{\[]|\b)((576|720|1080)[pi]|dir(ectors )?cut|dvd([r59]|rip|scr(eener)?)|(avc)?hd|wmv|ntsc|pal|mpeg|dsr|r[1-5]|bd[59]|dts|ac3|blu(-)?ray|[hp]dtv|stv|hddvd|xvid|divx|x264|dxva|(?-i)FEST[Ii]VAL|L[iI]M[iI]TED|[WF]S|PROPER|REPACK|RER[Ii]P|REAL|RETA[Ii]L|EXTENDED|REMASTERED|UNRATED|CHRONO|THEATR[Ii]CAL|DC|SE|UNCUT|[Ii]NTERNAL|[DS]UBBED)([\]\)\}]|\b)(-[^\s]+$)?)")] // stuff that could be present in real names is matched with tight case sensitive syntax // strings here will only match if separated by any of " .-_" private static final String[] GARBAGE_CASESENSITIVE = { "FRENCH", "TRUEFRENCH", "DUAL", "MULTISUBS", "MULTI", "MULTi", "SUBFORCED", "SUBFORCES", "UNRATED", "UNRATED[ ._-]DC", "EXTENDED", "IMAX", "COMPLETE", "PROPER", "iNTERNAL", "INTERNAL", "SUBBED", "ANiME", "LIMITED", "REMUX", "DCPRip", "TS", "TC", "REAL", "HD", "DDR", "WEB", "EN", "ENG", "FR", "ES", "IT", "NL", "VFQ", "VF", "VO", "VOF", "VOSTFR", "Eng", "VOST", "VFF", "VF2", "VFI", "VFSTFR", }; private static final Pattern[] GARBAGE_CASESENSITIVE_PATTERNS = new Pattern[GARBAGE_CASESENSITIVE.length]; static { for (int i = 0; i < GARBAGE_CASESENSITIVE.length; i++) { // case sensitive string wrapped in "space or . or _ or -", in the end either separator or end of line // end of line is important since .foo.bar. could be stripped to .foo and that would no longer match .foo. GARBAGE_CASESENSITIVE_PATTERNS[i] = Pattern.compile("[ ._-]" + GARBAGE_CASESENSITIVE[i] + "(?:[ ._-]|$)"); } } /** * assumes title is always first * @return substring from start to first finding of any garbage pattern */ private static String cutOffBeforeFirstMatch(String input, Pattern[] patterns) { String remaining = input; for (Pattern pattern : patterns) { if (remaining.isEmpty()) return ""; Matcher matcher = pattern.matcher(remaining); if (matcher.find()) { remaining = remaining.substring(0, matcher.start()); } } return remaining; } public static final String cutOffBeforeFirstMatch(String input, String[] garbageStrings) { // lower case input to test against lowercase strings String inputLowerCased = input.toLowerCase(Locale.US); int firstGarbage = input.length(); for (String garbage : garbageStrings) { int garbageIndex = inputLowerCased.indexOf(garbage); // if found, shrink to 0..index if (garbageIndex > -1 && garbageIndex < firstGarbage) firstGarbage = garbageIndex; } // return substring from input -> keep case return input.substring(0, firstGarbage); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/Pair.java ================================================ package com.theflexproject.thunder.utils; public interface Pair { } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/PairMovies.java ================================================ package com.theflexproject.thunder.utils; import com.theflexproject.thunder.model.Movie; import java.util.List; public class PairMovies implements Pair { private String recyclerTitle; private List mediaList; public PairMovies(String recyclerTitle , List mediaList){ this.mediaList= mediaList; this.recyclerTitle= recyclerTitle; } public String getRecyclerTitle() { return recyclerTitle; } public void setRecyclerTitle(String recyclerTitle) { this.recyclerTitle = recyclerTitle; } public List getmediaList() { return mediaList; } public void setmediaList(List mediaList) { this.mediaList = mediaList; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/PairTvShows.java ================================================ package com.theflexproject.thunder.utils; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import java.util.List; public class PairTvShows implements Pair { private String recyclerTitle; private List tvShowList; public PairTvShows(String recyclerTitle , List tvShowList){ this.tvShowList= tvShowList; this.recyclerTitle= recyclerTitle; } public String getRecyclerTitle() { return recyclerTitle; } public void setRecyclerTitle(String recyclerTitle) { this.recyclerTitle = recyclerTitle; } public List getTvShowList() { return tvShowList; } public void setTvShowList(List tvShowList) { this.tvShowList = tvShowList; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/ParseUtils.java ================================================ package com.theflexproject.thunder.utils; import android.util.Log; import android.util.Pair; import java.util.regex.Matcher; import java.util.regex.Pattern; public class ParseUtils { /* ( whitespace | punctuation)+, matches dots, spaces, brackets etc */ private static final Pattern MULTI_NON_CHARACTER_PATTERN = Pattern.compile("[\\s\\p{Punct}&&[^']]+"); /* * Matches dots in between Uppercase letters e.g. in "E.T.", "S.H.I.E.L.D." but not a "a.b.c." * Last dot is kept "a.F.O.O.is.foo" => "a.FOO.is.foo" **/ private static final Pattern ACRONYM_DOTS = Pattern.compile("(?<=(\\b|[._])\\p{Lu})[.](?=\\p{Lu}([.]|$))"); /* Matches "1. ", "1) ", "1 - ", "1.-.", "1._"... but not "1.Foo" (could be a starting date with space) or "1-Foo" ..*/ private static final Pattern LEADING_NUMBERING = Pattern.compile("^(\\d+([.)][\\s\\p{Punct}]+|\\s+\\p{Punct}[\\p{Punct}\\s]*))*"); // Matches "1-Foo" to be used with movies only because clashes with 24-s01e01 check with find . -type f -regex '.*/[0-9]+-[^/]*' private static final Pattern LEADING_NUMBERING_DASH = Pattern.compile("^(\\d+([-]|\\s+\\p{Punct}[\\p{Punct}\\s]*))*"); /** besides the plain ' there is the typographic ’ and ‘ which is actually not an apostrophe */ private static final char[] ALTERNATE_APOSTROPHES = new char[] { '’', '‘' }; public static final Pattern BRACKETS = Pattern.compile("[<({\\[].+?[>)}\\]]"); // matches "[space or punctuation/brackets etc]year", year is group 1 private static final Pattern YEAR_PATTERN = Pattern.compile("(.*)[\\s\\p{Punct}]((?:19|20)\\d{2})(?!\\d)"); // Strip out everything after empty parenthesis (after year pattern removal) // i.e. movieName (1969) garbage -> movieName () garbage -> movieName private static final Pattern EMPTY_PARENTHESIS_PATTERN = Pattern.compile("(.*)[\\s\\p{Punct}]+([(][)])"); private static final Pattern COUNTRY_OF_ORIGIN = Pattern.compile("(.*)[\\s\\p{Punct}]+\\(((US|UK|FR))\\)"); private static final Pattern PARENTHESIS_YEAR_PATTERN = Pattern.compile("(.*)[\\s\\p{Punct}]+\\(((?:19|20)\\d{2})\\)"); public static String removeNumbering(String input) { return StringUtils.replaceAll(input, "", LEADING_NUMBERING); } public static String removeNumberingDash(String input) { return StringUtils.replaceAll(input, "", LEADING_NUMBERING_DASH); } /** replaces "S.H.I.E.L.D." with "SHIELD", only uppercase letters */ public static String replaceAcronyms(String input) { return StringUtils.replaceAll(input, "", ACRONYM_DOTS); } /** replaces alternative apostrophes with a simple ' */ public static String unifyApostrophes(String input) { return StringUtils.replaceAllChars(input, ALTERNATE_APOSTROPHES, '\''); } /** removes all punctuation characters besides ' Also does apostrophe and Acronym replacement */ public static String removeInnerAndOutterSeparatorJunk(String input) { // replace ’ and ‘ by ' - both could be used as apostrophes String result = unifyApostrophes(input); result = replaceAcronyms(result); return StringUtils.replaceAll(result, " ", MULTI_NON_CHARACTER_PATTERN).trim(); } public static String removeAfterEmptyParenthesis(String input) { Log.i("ERROR","removeAfterEmptyParenthesis input: " + input); Matcher matcher = EMPTY_PARENTHESIS_PATTERN.matcher(input); int start = 0; int stop = 0; boolean found = false; while (matcher.find()) { Log.i("ERROR","removeAfterEmptyParenthesis: pattern found"); found = true; start = matcher.start(1); } // get the first match and extract it from the string if (found) input = input.substring(0, start); Log.i("ERROR","removeAfterEmptyParenthesis remove junk after (): " + input); return input; } private ParseUtils() { // static utilities } // matches "[space or punctuation/brackets etc]year", year is group 1 // "[\\s\\p{Punct}]((?:19|20)\\d{2})(?!\\d)" public static Pair yearExtractor(String input) { Log.i("ERROR","yearExtractor input: " + input); return twoPatternExtractor2(input, YEAR_PATTERN); } public static Pair twoPatternExtractor2(String input, Pattern pattern) { Log.i("ERROR","twoPatternExtractor2 input: " + input); String isolated = null; Matcher matcher = pattern.matcher(input); if (matcher.find()) { input = matcher.group(1); isolated = matcher.group(2); } Log.i("ERROR","twoPatternExtractor output: " + input + " isolated: " + isolated); return new Pair<>(input, isolated); } public static Pair getCountryOfOrigin(String input) { String countryOfOrigin = null; return twoPatternExtractor2(input, COUNTRY_OF_ORIGIN); } public static Pair parenthesisYearExtractor(String input) { return twoPatternExtractor2(input, PARENTHESIS_YEAR_PATTERN); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/PlexMovieExtractor.java ================================================ package com.theflexproject.thunder.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; public class PlexMovieExtractor { private static final String ANYTHING = "(.*)"; private static final String TMDB_TAG = ANYTHING+"(tmdb-([0-9]+))"+ANYTHING; private static final String TMDB_TAG_SIMPLE_PROGRAM = ANYTHING+"(TMDB([0-9]+))"+ANYTHING; private static final String VIDEO_DETAILS_TAG = ANYTHING+"(\\[([\\d]{3,4})p, ([a-zA-z\\d]{3,4}), ([a-zA-z\\d]{3,4})])"+ANYTHING; private static final Pattern NAME_TMDB_ID_PATTERN = Pattern.compile(TMDB_TAG); private static final Pattern NAME_TMDB_ID_PATTERN_SIMPLE_PROGRAM = Pattern.compile(TMDB_TAG_SIMPLE_PROGRAM); private static final Pattern NAME_VIDEO_DETAILS_PATTERN = Pattern.compile(VIDEO_DETAILS_TAG); public static String getTMDBId (String matchString) { String tmdb_id = ""; System.out.println("Before tmdb_id in plexExtractor matchString"+matchString); System.out.println("Before tmdb_id in plexExtractor"+tmdb_id); Matcher m = NAME_TMDB_ID_PATTERN.matcher(matchString); Matcher m2 = NAME_TMDB_ID_PATTERN_SIMPLE_PROGRAM.matcher(matchString); if (m.matches()) { System.out.println(m.group(3)); tmdb_id= m.group(3); System.out.println("After tmdb_id in plexExtractor"+tmdb_id); return tmdb_id; }else if(m2.matches()){ System.out.println(m2.group(3)); tmdb_id= m2.group(3); System.out.println("After tmdb_id in plexExtractor"+tmdb_id); return tmdb_id; } return null; } public static String[] getVideoDetails(String matchString){ Matcher m = NAME_VIDEO_DETAILS_PATTERN.matcher(matchString); if (m.matches()) { String video_res = m.group(3); String video_codec = m.group(4); String audio_codec = m.group(5); return new String[]{video_res,video_codec,audio_codec}; } return null; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/RefreshWorker.java ================================================ package com.theflexproject.thunder.utils; import static com.theflexproject.thunder.utils.IndexUtils.refreshIndex; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import androidx.annotation.NonNull; import androidx.work.Worker; import androidx.work.WorkerParameters; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.IndexLink; import java.util.List; public class RefreshWorker extends Worker { Context ctxt ; public RefreshWorker( @NonNull Context mContext, @NonNull WorkerParameters params) { super(mContext, params); ctxt = mContext; } @Override public Result doWork() { // Do the work here--in this case, upload the images. if(isNetworkAvailable()){ List indexLinkList = DatabaseClient.getInstance(ctxt).getAppDatabase().indexLinksDao().getAllEnabled(); for (IndexLink indexLink:indexLinkList) { refreshIndex(ctxt, indexLink); } return Result.success(); } return Result.failure(); // Indicate whether the work finished successfully with the Result } private boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) ctxt.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager != null ? connectivityManager.getActiveNetworkInfo() : null; return activeNetworkInfo != null && activeNetworkInfo.isConnected(); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/SceneMovieTitleExtractor.java ================================================ package com.theflexproject.thunder.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; public class SceneMovieTitleExtractor { public static SceneMovieTitleExtractor instance() { return INSTANCE; } static final SceneMovieTitleExtractor INSTANCE = new SceneMovieTitleExtractor(); SceneMovieTitleExtractor() { // singleton } public static String[] getTitleYear(String matchString) { Matcher m = NAME_YEAR_SCENE_PATTERN.matcher(matchString); if (m.matches()) { String name = StringUtils.replaceAll(m.group(1), " ", JUNK_PATTERN); name = ParseUtils.removeInnerAndOutterSeparatorJunk(name); String year = m.group(2); String[] nameYear = {name,year}; return nameYear; } return null; } // some junk that sometimes appears before the year private static final String JUNK = "(?i)(?:(?:DIR(?:ECTORS)?|EXTENDED)[\\s\\p{Punct}]?CUT|UNRATED|THEATRICAL[\\s\\p{Punct}]?EDITION)"; private static final Pattern JUNK_PATTERN = Pattern.compile(JUNK); // NOT ( whitespace | punctuation), matches A-Z, 0-9, localized characters etc private static final String CHARACTER = "[^\\s\\p{Punct}]"; // ( whitespace | punctuation), matches dots, spaces, brackets etc private static final String NON_CHARACTER = "[\\s\\p{Punct}]"; // matches "word" private static final String CHARACTER_GROUP = CHARACTER + "+"; // matches shortest "word.word.word." private static final String SEPARATED_CHARTER_GROUPS = "(?:" + CHARACTER_GROUP + NON_CHARACTER + ")+?"; // matches "19XX" and "20XX" - capture group private static final String YEAR_GROUP = "((?:19|20)\\d{2})"; // matches "word.word.word." - capture group private static final String MOVIENAME_GROUP = "(" + SEPARATED_CHARTER_GROUPS + ")"; // matches ".junk.junk.junk" private static final String REMAINING_JUNK = "(?:" + NON_CHARACTER + CHARACTER_GROUP + ")+"; // matches "Movie.Name.2011.JUNK.JUNK.avi" private static final String MOVIENAME_YEAR_JUNK = MOVIENAME_GROUP + YEAR_GROUP + REMAINING_JUNK; private static final Pattern NAME_YEAR_SCENE_PATTERN = Pattern.compile(MOVIENAME_YEAR_JUNK); } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/SendGetRequestTMDB.java ================================================ package com.theflexproject.thunder.utils; import static com.theflexproject.thunder.Constants.FANART_IMAGE_BASE_URL; import static com.theflexproject.thunder.Constants.TMDB_API_KEY; import static com.theflexproject.thunder.Constants.TMDB_BASE_URL; import static com.theflexproject.thunder.Constants.TMDB_IMAGE_BASE_URL; import static com.theflexproject.thunder.Constants.getFanartApiKey; import static com.theflexproject.thunder.MainActivity.context; import static com.theflexproject.thunder.utils.PlexMovieExtractor.getTMDBId; import static com.theflexproject.thunder.utils.ShowUtils.EPNUM; import static com.theflexproject.thunder.utils.ShowUtils.SEASON; import static com.theflexproject.thunder.utils.ShowUtils.SHOW; import android.util.Log; import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.ExternalIds; import com.theflexproject.thunder.model.FanArt.FanArtMovieResponseModel; import com.theflexproject.thunder.model.FanArt.FanArtTvResponseModel; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.MoviesResponseFromTMDB; import com.theflexproject.thunder.model.MyMedia; import com.theflexproject.thunder.model.TVShowInfo.Episode; import com.theflexproject.thunder.model.TVShowInfo.Result; import com.theflexproject.thunder.model.TVShowInfo.TVShow; import com.theflexproject.thunder.model.TVShowInfo.TVShowSeasonDetails; import com.theflexproject.thunder.model.TVShowInfo.TVShowsResponseFromTMDB; import com.theflexproject.thunder.model.tmdbImages.Logo; import com.theflexproject.thunder.model.tmdbImages.TMDBImagesResponse; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import java.util.regex.Matcher; import java.util.regex.Pattern; import me.xdrop.fuzzywuzzy.FuzzySearch; import me.xdrop.fuzzywuzzy.model.ExtractedResult; public class SendGetRequestTMDB { static void sendGet2(Movie movie) { String fileName = movie.getFileName(); //Match if the fileName contains tmdb id String movieIdFromPlexExtractor = (getTMDBId(fileName)); if (movieIdFromPlexExtractor != null) { System.out.println("movieId from plex extractor"); getMovieById(Long.parseLong(movieIdFromPlexExtractor) , movie); } //Match if the fileName follows scene naming pattern String[] titleYear; titleYear = SceneMovieTitleExtractor.getTitleYear(fileName.replaceAll("Copy of " , "")); //Match if the fileName follows other loosely followed naming conventions if (titleYear == null) { titleYear = MovieTitleExtractor2.getTitle2(fileName.replaceAll("Copy of " , "")); } //Extract title and year String titleExtracted = "", yearExtracted = "0"; if (titleYear != null) { if (titleYear[0] != null) { titleExtracted = titleYear[0]; if (titleYear[1] != null && titleYear[1].length() > 3) { yearExtracted = titleYear[1]; } else { yearExtracted = ParseUtils.yearExtractor(fileName).second; } } } //Sends tmdb request to search on tmdb and receive multiple responses String response = searchMovieOnTmdbByName(titleExtracted , yearExtracted); Gson gson = new Gson(); MoviesResponseFromTMDB moviesResponseFromTMDB = null; try { moviesResponseFromTMDB = gson.fromJson(response , MoviesResponseFromTMDB.class); } catch (Exception e) { System.out.println(e); } ArrayList titlesAndYearsFromTMDB = new ArrayList<>(); if (moviesResponseFromTMDB != null && moviesResponseFromTMDB.results.size() != 0) { for (int i = 0; i < moviesResponseFromTMDB.results.size(); i++) { String releaseDate = moviesResponseFromTMDB.results.get(i).getRelease_date(); if (releaseDate != null) if (releaseDate.length() == 4) { titlesAndYearsFromTMDB.add(moviesResponseFromTMDB.results.get(i).getTitle() + " " + releaseDate); } else { titlesAndYearsFromTMDB.add(moviesResponseFromTMDB.results.get(i).getTitle() + " " + releaseDate.split("-")[0]); } } int finalIndex = 0; if (!titleExtracted.equals("") && !yearExtracted.equals("0")) { finalIndex = findIndexOfClosestMatch(titleExtracted + " " + yearExtracted , titlesAndYearsFromTMDB); } int movieId = moviesResponseFromTMDB.results.get(finalIndex).getId(); getMovieById(movieId , movie); } else if (movie.getTitle() == null) { System.out.println("file with no tmdb info" + movie); DatabaseClient.getInstance(context).getAppDatabase().movieDao().insert(movie); } } private static String searchMovieOnTmdbByName(String titleExtracted , String yearExtracted) { StringBuilder response = new StringBuilder(); try { String finalUrl = TMDB_BASE_URL + "search/movie?api_key=" + TMDB_API_KEY + "&year=" + yearExtracted + "&language=en-US&page=1&include_adult=false&query=" + URLEncoder.encode(titleExtracted , "UTF-8"); URL url = new URL(finalUrl); System.out.println("TMDB GET REQUEST URL INSIDE searchMovieOnTmdbByName " + finalUrl); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); System.out.println("TMDB RESPONSE CODE" + responseCode); if (responseCode == HttpURLConnection.HTTP_OK) { BufferedReader in = new BufferedReader(new InputStreamReader( con.getInputStream())); String inputLine; response = new StringBuilder(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); } else { System.out.println("GET request did not work"); } } catch (IOException | JsonSyntaxException e) { e.printStackTrace(); } return response.toString(); } private static void getMovieById(long id , MyMedia myMedia) { //Get Movie by id //Get results from tmdb by Name Movie movie = (Movie) myMedia; DatabaseClient.getInstance(context).getAppDatabase().movieDao().delete(movie); StringBuilder responseById = new StringBuilder(); try { String TMDB_MOVIE_BY_ID_URL = TMDB_BASE_URL + "movie/" + id + "?api_key=" + TMDB_API_KEY + "&language=en-US"; URL url = new URL(TMDB_MOVIE_BY_ID_URL); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); Log.i("tmdb api response code" , String.valueOf(responseCode)); if (responseCode == HttpURLConnection.HTTP_OK) { // success BufferedReader in = new BufferedReader(new InputStreamReader( con.getInputStream())); String inputLine; responseById = new StringBuilder(); while ((inputLine = in.readLine()) != null) { responseById.append(inputLine); } in.close(); } else { System.out.println("GET request did not work"); } } catch (IOException | JsonSyntaxException e) { e.printStackTrace(); } System.out.println("responseById" + responseById.toString()); String fileName = movie.getFileName(); String mimeType = movie.getMimeType(); Date modifiedTime = movie.getModifiedTime(); String size = movie.getSize(); String urlString = movie.getUrlString(); String gd_id = movie.getGd_id(); int index_id = movie.getIndex_id(); String logo_path = getLogo2(id , false); if (logo_path.equals("")) logo_path = getLogo(id , false); System.out.println("logo_path in sendget2" + logo_path); try { Gson gson = new Gson(); movie = gson.fromJson(responseById.toString() , Movie.class); } catch (NumberFormatException e) { System.out.println("NumberFormatException" + e); } movie.setFileName(fileName); movie.setMimeType(mimeType); movie.setModifiedTime(modifiedTime); movie.setSize(size); movie.setUrlString(urlString); movie.setGd_id(gd_id); movie.setIndex_id(index_id); movie.setLogo_path(logo_path); System.out.println("movie after adding everything" + movie); if (DatabaseClient.getInstance(context).getAppDatabase().movieDao().getByFileName(movie.getGd_id()) == null) { DatabaseClient.getInstance(context).getAppDatabase().movieDao().insert(movie); } } static void sendGetTVShow(Episode episode) { String episodeFileName = episode.getFileName().replaceAll("Copy of " , ""); Map result = ShowUtils.parseShowName(episodeFileName); String finalShowName = null; String finalSeasonNumber = null; String finalEpisodeNumber = null; if (result != null) { finalShowName = result.get(SHOW); finalSeasonNumber = result.get(SEASON); finalEpisodeNumber = result.get(EPNUM); } String finalurl = ""; long tvShowId = 0; boolean failed = false; try { String string = getTMDBId(episode.getUrlString()); tvShowId = Long.parseLong(string); System.out.println("parsed show id " + tvShowId); TVShow tvShow = new TVShow(); getTVById(tvShowId , tvShow); //Request for season details if (tvShowId != 0) getTVSeasonById2(tvShowId , finalSeasonNumber , finalEpisodeNumber , episode); } catch (NumberFormatException | NullPointerException e) { failed = true; System.out.println("parse failed get tv" + e.getMessage()); } if (finalShowName != null) { TVShow test = DatabaseClient.getInstance(context).getAppDatabase().tvShowDao().findByName(finalShowName); if (test != null && test.getId() != 0) { getTVSeasonById2(test.getId() , finalSeasonNumber , finalEpisodeNumber , episode); } if (test == null && failed) { //request TV show results by name to extract showId StringBuilder response = new StringBuilder(); try { finalurl = TMDB_BASE_URL + "search/tv?api_key=" + TMDB_API_KEY + "&language=en-US&page=1&include_adult=false&query=" + URLEncoder.encode(finalShowName , "UTF-8"); System.out.println("finalUrl in sendGetTVShow" + finalurl); URL url = new URL(finalurl); Log.i("Show title" , finalurl); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); Log.i("tmdb api response" , String.valueOf(responseCode)); if (responseCode == HttpURLConnection.HTTP_OK) { // success BufferedReader in = new BufferedReader(new InputStreamReader( con.getInputStream())); String inputLine; response = new StringBuilder(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); } else { System.out.println("GET request did not work"); } Gson gson = new Gson(); TVShowsResponseFromTMDB tvShowsResponseFromTMDB = gson.fromJson(response.toString() , TVShowsResponseFromTMDB.class); Log.i("tvShowsResponseFromTMDB" , tvShowsResponseFromTMDB.toString()); /*better method for selection of tv show */ if (tvShowsResponseFromTMDB.results.size() > 0) { ArrayList tvTitlesFromTMDB = new ArrayList<>(); for (int i = 0; i < tvShowsResponseFromTMDB.getResults().size(); i++) { Result tv = tvShowsResponseFromTMDB.getResults().get(i); tvTitlesFromTMDB.add(tv.getName()); } ExtractedResult matchedTvTitle; int finalIndex = 0; matchedTvTitle = FuzzySearch.extractOne(finalShowName , tvTitlesFromTMDB); if (matchedTvTitle.getScore() == 100) { finalIndex = matchedTvTitle.getIndex(); } else if (matchedTvTitle.getScore() > 70) { finalIndex = matchedTvTitle.getIndex(); } tvShowId = tvShowsResponseFromTMDB.results.get(finalIndex).getId(); } if (tvShowId != 0) { //Request for tv show by id and TVShow tvShow = new TVShow(); getTVById(tvShowId , tvShow); //Request for season details getTVSeasonById2(tvShowId , finalSeasonNumber , finalEpisodeNumber , episode); } } catch (IOException e) { System.out.println(e.toString()); } } } } private static void getTVById(long tvShowId , MyMedia myMedia) { TVShow tvShow = (TVShow) myMedia; long oldTVShowID = tvShow.getId(); DatabaseClient.getInstance(context).getAppDatabase().tvShowDao().delete(tvShow); DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().deleteByShowId(oldTVShowID); TVShow test = DatabaseClient.getInstance(context).getAppDatabase().tvShowDao().find(tvShowId); if (test == null && tvShowId != 0) { String finalurl = TMDB_BASE_URL + "tv/" + tvShowId + "?api_key=" + TMDB_API_KEY + "&language=en-US"; StringBuilder responseTvShowDetails = new StringBuilder(); try { URL url = new URL(finalurl); Log.i("Show title" , finalurl); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); Log.i("tmdb api response" , String.valueOf(responseCode)); if (responseCode == HttpURLConnection.HTTP_OK) { // success BufferedReader in = new BufferedReader(new InputStreamReader( con.getInputStream())); String inputLine; responseTvShowDetails = new StringBuilder(); while ((inputLine = in.readLine()) != null) { responseTvShowDetails.append(inputLine); } in.close(); } else { System.out.println("GET request did not work"); } Log.i("tvShowById" , responseTvShowDetails.toString()); // long tvdb_id = getTVDBId(tvShowId); Gson gson = new Gson(); tvShow = gson.fromJson(responseTvShowDetails.toString() , TVShow.class); // String logoPath = getLogo(tvdb_id,true); String logoPath = getLogo2(tvShowId , true); if (logoPath.equals("")) { tvdb_id = getTVDBId(tvShowId); logoPath = getLogo(tvdb_id , true); } tvShow.setLogo_path(logoPath); Log.i("tvShow" , tvShow.toString()); DatabaseClient.getInstance(context).getAppDatabase().tvShowDao().insert(tvShow); } catch (IOException e) { e.printStackTrace(); } } //get all the episodes to be update with new info List episodeList = DatabaseClient.getInstance(context).getAppDatabase().episodeDao().getFromThisShow(oldTVShowID); for (Episode e : episodeList) { System.out.println("Inside for loop"); String episodeFileName = e.getFileName().replaceAll("Copy of " , ""); Map result = ShowUtils.parseShowName(episodeFileName); String finalShowName = null; String finalSeasonNumber = null; String finalEpisodeNumber = null; if (result != null) { finalShowName = result.get(SHOW); finalSeasonNumber = result.get(SEASON); finalEpisodeNumber = result.get(EPNUM); } getTVSeasonById2(tvShowId , finalSeasonNumber , finalEpisodeNumber , e); } } private static void getTVSeasonById2(long tvShowId , String finalSeasonNumber , String finalEpisodeNumber , Episode episode) { try { if (finalSeasonNumber != null) { // TVShowSeasonDetails tvShowSeasonDetails =null; TVShowSeasonDetails tvShowSeasonDetails = DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().findByShowIdAndSeasonNumber(tvShowId , finalSeasonNumber); if (tvShowSeasonDetails == null) { StringBuilder responseSeasonDetails = new StringBuilder(); String finalUrl = TMDB_BASE_URL + "tv/" + tvShowId + "/season/" + finalSeasonNumber + "?api_key=" + TMDB_API_KEY + "&language=en-US"; System.out.println("Season Number " + finalSeasonNumber + "finalurl " + finalUrl); URL url = new URL(finalUrl); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { // success BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream(), StandardCharsets.UTF_8)); String inputLine; responseSeasonDetails = new StringBuilder(); while ((inputLine = in.readLine()) != null) { responseSeasonDetails.append(inputLine); } in.close(); } else { System.out.println("Season details 2 GET request did not work"); } Gson gson = new Gson(); System.out.println("the received string season"+ String.valueOf(responseSeasonDetails)); try{ String s = responseSeasonDetails.toString(); Pattern pattern = Pattern.compile(Matcher.quoteReplacement("\\\"")); Matcher matcher = pattern.matcher(s); s = matcher.replaceAll(""); System.out.println("changed string"+s); tvShowSeasonDetails = gson.fromJson(s, TVShowSeasonDetails.class); // // JSONObject json = (JSONObject) new JSONParser().parse(responseSeasonDetails.toString().replaceAll(Matcher.quoteReplacement("\""),"").replaceAll(Matcher.quoteReplacement("\n"),"")); // tvShowSeasonDetails = gson.fromJson(json.toJSONString(), TVShowSeasonDetails.class); // tvShowSeasonDetails = gson.fromJson(String.valueOf(responseSeasonDetails), TVShowSeasonDetails.class); // tvShowSeasonDetails = gson.fromJson(String.valueOf(responseSeasonDetails).replace("\n","\\\n").replace("\"","\\\"") , TVShowSeasonDetails.class); }catch (Exception e){ System.out.println("MalformedURLException"); } if (tvShowSeasonDetails != null && tvShowSeasonDetails.getEpisodes() != null) { if (tvShowId != 0) { tvShowSeasonDetails.setShow_id(tvShowId); } Log.i("tvShowSeasonDetails" , tvShowSeasonDetails.toString()); System.out.println("tvShowSeasonDetails in getTVSeasonById2" + tvShowSeasonDetails); // TVShowSeasonDetails test = DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().find(tvShowSeasonDetails.getId()); // if (test == null) for (Episode e : tvShowSeasonDetails.getEpisodes()) { e.setModifiedTime(new Date()); } DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().insert(tvShowSeasonDetails); System.out.println("Episode Number" + finalEpisodeNumber); } } try { System.out.println("getTVSeasonById2 tvShowSeasonDetails " + tvShowSeasonDetails.toString()); for (Episode e: tvShowSeasonDetails.getEpisodes()) { if(Integer.parseInt(finalEpisodeNumber)== e.getEpisode_number()){ System.out.println("Episode before inserting in db found in tvseason details" + e.toString()); e.setFileName(episode.getFileName()); e.setMimeType(episode.getMimeType()); e.setModifiedTime(episode.getModifiedTime()); e.setSize(episode.getSize()); e.setUrlString(episode.getUrlString()); e.setGd_id(episode.getGd_id()); e.setIndex_id(episode.getIndex_id()); e.setSeason_id(tvShowSeasonDetails.getId()); e.setShow_id(tvShowId); DatabaseClient.getInstance(context).getAppDatabase().episodeDao().deleteByLink(e.getGd_id()); DatabaseClient.getInstance(context).getAppDatabase().episodeDao().insert(e); System.out.println("Episode after inserting in db" + Integer.parseInt(finalEpisodeNumber) + " Ep from the season details" + e.getEpisode_number()); } else { episode.setShow_id(tvShowId); DatabaseClient.getInstance(context).getAppDatabase().episodeDao().insert(episode); } } // Episode e = tvShowSeasonDetails.getEpisodes().stream() // .filter(episode1 -> (Integer.parseInt(finalEpisodeNumber) == episode1.getEpisode_number())) // .findAny() // .orElse(null); } catch (NullPointerException e) { System.out.println("caught exception in getTVSeasonById2.2"); } } } catch (IOException e) { System.out.println("caught exception in getTVSeasonById2" + e); } } public static void tmdbGetByID(MyMedia myMedia , long id , boolean isShow) { try { if (isShow) { getTVById(id , myMedia); } if (!isShow) { getMovieById(id , myMedia); } } catch (NullPointerException e) { System.out.println(e); } } private static int findIndexOfClosestMatch(String s , ArrayList titlesAndYearsFromTMDB) { try { ExtractedResult result = FuzzySearch.extractOne(s , titlesAndYearsFromTMDB); System.out.println("findIndexOfClosestMatch FuzzySearch RESULT" + result.toString()); System.out.println("final Title chosen by findIndexOfClosestMatch" + result.getString()); return result.getIndex(); } catch (JsonSyntaxException | NoSuchElementException elementException) { elementException.printStackTrace(); } return 0; } static String urlLogo = ""; private static String getLogo2(Long id , boolean isShow) { Thread thread = new Thread(new Runnable() { @Override public void run() { try { urlLogo = ""; String typeOfMedia = "movie"; if (isShow) typeOfMedia = "tv"; URL url = new URL(TMDB_BASE_URL + typeOfMedia + "/" + id + "/images?api_key=" + TMDB_API_KEY); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); int code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); StringBuilder sb = new StringBuilder(); for (int c; (c = br.read()) >= 0; ) sb.append((char) c); br.close(); Gson om = new Gson(); TMDBImagesResponse tmdbImagesResponse; tmdbImagesResponse = om.fromJson(sb.toString() , TMDBImagesResponse.class); ArrayList logoArrayList = tmdbImagesResponse.getLogos(); // Collections.sort(logoArrayList , new imageVotesComparator()); // ; System.out.println("TMDBImagesResponse" + tmdbImagesResponse); if (tmdbImagesResponse.getLogos() != null) { for (int i = 0; tmdbImagesResponse.getLogos().size() > 0 && i < tmdbImagesResponse.getLogos().size(); i++) { if (tmdbImagesResponse.getLogos().get(i).getIso_639_1() != null && (tmdbImagesResponse.getLogos().get(i).getIso_639_1().equals("en") // || tmdbImagesResponse.getLogos().get(i).getIso_639_1().equals("hi") ) && !tmdbImagesResponse.getLogos().get(i).getFile_path().contains(".svg")) { urlLogo = TMDB_IMAGE_BASE_URL + tmdbImagesResponse.getLogos().get(i).getFile_path().toString(); break; } } } System.out.println("inside getLogo" + urlLogo); } catch (IOException e) { System.out.println(e.toString()); } } }); thread.start(); try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } return urlLogo; } private static String getLogo(Long id , boolean isShow) { Thread thread = new Thread(new Runnable() { @Override public void run() { try { urlLogo = ""; String typeOfMedia = "movies"; if (isShow) typeOfMedia = "tv"; URL url = new URL(FANART_IMAGE_BASE_URL + typeOfMedia + "/" + id + "?api_key=" + getFanartApiKey()); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); int code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); StringBuilder sb = new StringBuilder(); for (int c; (c = br.read()) >= 0; ) sb.append((char) c); br.close(); Gson om = new Gson(); FanArtMovieResponseModel root; FanArtTvResponseModel tvResponseModel; if (isShow) { tvResponseModel = om.fromJson(sb.toString() , FanArtTvResponseModel.class); System.out.println("FanArtMovieResponse" + tvResponseModel); if (tvResponseModel != null && tvResponseModel.getHdtvlogo() != null) { for (int i = 0; i < tvResponseModel.getHdtvlogo().size(); i++) { if (tvResponseModel.getHdtvlogo().get(i).getLang().equals("en") || tvResponseModel.getHdtvlogo().get(i).getLang().equals("hi")) { urlLogo = tvResponseModel.getHdtvlogo().get(i).getUrl().toString(); break; } } } if (urlLogo.equals("") && tvResponseModel != null && tvResponseModel.getClearlogo() != null) { for (int i = 0; i < tvResponseModel.getClearlogo().size(); i++) { if (tvResponseModel.getClearlogo().get(i).getLang().equals("en") || tvResponseModel.getClearlogo().get(i).getLang().equals("hi")) { urlLogo = tvResponseModel.getClearlogo().get(i).getUrl(); break; } } } } else { root = om.fromJson(sb.toString() , FanArtMovieResponseModel.class); System.out.println("FanArtMovieResponse" + root); if (root != null && root.getHdmovielogo() != null) { for (int i = 0; i < root.getHdmovielogo().size(); i++) { if (root.getHdmovielogo().get(i).getLang().equals("en") || root.getHdmovielogo().get(i).getLang().equals("hi")) { urlLogo = root.getHdmovielogo().get(i).getUrl().toString(); break; } } } if (urlLogo.equals("") && root != null && root.getMovielogo() != null) { for (int i = 0; i < root.getMovielogo().size(); i++) { if (root.getMovielogo().get(i).getLang().equals("en") || root.getMovielogo().get(i).getLang().equals("hi")) { urlLogo = root.getMovielogo().get(i).getUrl(); break; } } } } System.out.println("inside getLogo" + urlLogo); } catch (IOException e) { System.out.println(e.toString()); } } }); thread.start(); try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } return urlLogo; } static long tvdb_id = 0; private static long getTVDBId(long tvShowId) { Thread thread = new Thread(new Runnable() { @Override public void run() { tvdb_id = 0; String finalurl = TMDB_BASE_URL + "tv/" + tvShowId + "/external_ids?api_key=" + TMDB_API_KEY + "&language=en-US"; StringBuilder responseExternalIds = new StringBuilder(); try { URL url = new URL(finalurl); Log.i("Show title" , finalurl); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); Log.i("tmdb api response" , String.valueOf(responseCode)); if (responseCode == HttpURLConnection.HTTP_OK) { // success BufferedReader in = new BufferedReader(new InputStreamReader( con.getInputStream())); String inputLine; responseExternalIds = new StringBuilder(); while ((inputLine = in.readLine()) != null) { responseExternalIds.append(inputLine); } in.close(); } else { System.out.println("GET request did not work"); } Log.i("tvShowById" , responseExternalIds.toString()); Gson gson = new Gson(); ExternalIds externalIds = gson.fromJson(responseExternalIds.toString() , ExternalIds.class); tvdb_id = externalIds.getTvdb_id(); } catch (IOException e) { e.printStackTrace(); } } }); thread.start(); try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } return tvdb_id; } } // static void sendGet(Movie movie) { // String finalurl = ""; // String[] titleYear1 = SceneMovieTitleExtractor.getTitleYear(movie.getFileName().replaceAll("Copy of " , "")); // String[] titleYear2 = MovieTitleExtractor2.getTitle2(movie.getFileName().replaceAll("Copy of " , "")); // String titleFromFile1 = "", titleFromFile2 = "", yearFromFile1 = "", yearFromFile2 = ""; // if (titleYear1 != null) { // titleFromFile1 = titleYear1[0]; // } else { // titleFromFile2 = titleYear2[0]; // } // if (titleYear1 != null) { // yearFromFile1 = titleYear1[0]; // } else { // yearFromFile2 = titleYear2[0]; // } // // try { // try { // if (SceneMovieTitleExtractor.getTitleYear(movie.getFileName()) != null) { // finalurl = TMDB_GET_REQUEST_BASE_URL + TMDB_API_KEY + "&language=en-US&page=1&include_adult=false&query=" // + URLEncoder.encode(titleFromFile1 , "UTF-8"); // } else { // finalurl = TMDB_GET_REQUEST_BASE_URL + TMDB_API_KEY + "&language=en-US&page=1&include_adult=false&query=" // + URLEncoder.encode(titleFromFile2 , "UTF-8"); // } // } catch (Exception e) { // Log.i("exc" , e.toString()); // e.printStackTrace(); // } // StringBuilder response = new StringBuilder(); // try { // URL url = new URL(finalurl); // Log.i("movie title" , finalurl); // HttpURLConnection con = (HttpURLConnection) url.openConnection(); // con.setRequestMethod("GET"); // int responseCode = con.getResponseCode(); // Log.i("tmdb api response" , String.valueOf(responseCode)); // if (responseCode == HttpURLConnection.HTTP_OK) { // success // BufferedReader in = new BufferedReader(new InputStreamReader( // con.getInputStream())); // String inputLine; // response = new StringBuilder(); // while ((inputLine = in.readLine()) != null) { // response.append(inputLine); // } // in.close(); // } else { // System.out.println("GET request did not work"); // } // Gson gson = new Gson(); // MoviesResponseFromTMDB moviesResponseFromTMDB = gson.fromJson(response.toString() , MoviesResponseFromTMDB.class); // // if (moviesResponseFromTMDB.results.size() > 0) { // //New Changes // ArrayList titlesFromTMDB = new ArrayList<>(); // ArrayList yearsFromTMDB = new ArrayList<>(); // ArrayList titlesandYearsFromTMDB = new ArrayList<>(); // for (int i = 0; i < moviesResponseFromTMDB.results.size(); i++) { // titlesFromTMDB.add(moviesResponseFromTMDB.results.get(i).getTitle()); // yearsFromTMDB.add(moviesResponseFromTMDB.results.get(i).getRelease_date()); // titlesandYearsFromTMDB.add(moviesResponseFromTMDB.results.get(i).getTitle() + " " + moviesResponseFromTMDB.results.get(i).getRelease_date()); // } // // ExtractedResult result; // String finalTitle; // int finalIndex = 0; // // Log.i("list of tmdb" , titlesFromTMDB.toString()); // try { // if (titleFromFile1 != null) { // result = FuzzySearch.extractOne(titleFromFile1 , titlesFromTMDB); // Log.i(result.toString() , "result"); // if (result.getScore() > 60) { // finalTitle = result.getString(); // finalIndex = result.getIndex(); // Log.i(result.toString() , finalTitle); // } else { // result = FuzzySearch.extractOne(titleFromFile1 + yearFromFile1 , titlesandYearsFromTMDB); // finalTitle = result.getString(); // finalIndex = result.getIndex(); // Log.i(result.toString() , finalTitle); // } // // } else { // result = FuzzySearch.extractOne(titleFromFile2 + " " + yearFromFile2 , titlesFromTMDB); // if (result.getScore() > 60) { // finalTitle = result.getString(); // finalIndex = result.getIndex(); // Log.i(result.toString() , finalTitle); // } else { // result = FuzzySearch.extractOne(titleFromFile2 + yearFromFile2 , titlesandYearsFromTMDB); // finalTitle = result.getString(); // finalIndex = result.getIndex(); // Log.i(result.toString() , finalTitle); // } // } // } catch (Exception e) { // e.printStackTrace(); // } // String fileName = movie.getFileName(); // String mimeType = movie.getMimeType(); // Date modifiedTime = movie.getModifiedTime(); // String size = movie.getSize(); // String urlString = movie.getUrlString(); // // movie = moviesResponseFromTMDB.results.get(finalIndex); // // movie.setFileName(fileName); // movie.setMimeType(mimeType); // movie.setModifiedTime(modifiedTime); // movie.setSize(size); // movie.setUrlString(urlString); // //// file.setGenre_ids(tmdbResponse.results.get(0).getGenre_ids()); // Log.i("sendGet: " , moviesResponseFromTMDB.results.get(finalIndex).toString()); // } // // } catch (MalformedURLException e) { // Log.i("exe" , e.toString()); // } // } catch (IOException e) { // e.printStackTrace(); // } // // // System.out.println("file with no tmdb info" + movie); // // movie.setTitle(movie.getFileName()); // // // if (DatabaseClient.getInstance(context).getAppDatabase().movieDao().getByFileName(movie.getFileName()) == null) { // DatabaseClient.getInstance(context).getAppDatabase().movieDao().insert(movie); // // } // } // private static void getSeasonInfo(int tvShowId, String seasonNumber) { // // // //Request for season details // StringBuilder responseSeasonDetails = new StringBuilder(); // try { // if (tvShowSeasonId != 0) { // finalurl ="https://api.themoviedb.org/3/tv/"+tvShowId+"/season/"+finalSeasonNumber+"?api_key=" + TMDB_API_KEY + "&language=en-US"; // URL url = new URL(finalurl); // Log.i("Show title" , finalurl); // HttpURLConnection con = (HttpURLConnection) url.openConnection(); // con.setRequestMethod("GET"); // int responseCode = con.getResponseCode(); // Log.i("tmdb api response" , String.valueOf(responseCode)); // if (responseCode == HttpURLConnection.HTTP_OK) { // success // BufferedReader in = new BufferedReader(new InputStreamReader( // con.getInputStream())); // String inputLine; // responseSeasonDetails = new StringBuilder(); // while ((inputLine = in.readLine()) != null) { // responseSeasonDetails.append(inputLine); // } // in.close(); // } else { // System.out.println("GET request did not work"); // } // // Gson gson = new Gson(); // // TVShowSeasonDetails tvShowSeasonDetails = gson.fromJson(responseSeasonDetails.toString() , TVShowSeasonDetails.class); // // // // // } // // } catch (IOException e) { // System.out.println(e); // } // // // // // // TVShowSeasonDetails test = DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().find(tvShowSeasonDetails.getId()); // if(test== null) DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().insert(tvShowSeasonDetails); // // System.out.println("Episode Number" +finalEpisodeNumber); // for (Episode e :tvShowSeasonDetails.getEpisodes() ) { // assert finalEpisodeNumber != null; // if(e.getEpisode_number()== Integer.parseInt(finalEpisodeNumber) ){ // System.out.println("Episode Number from title of the file " +Integer.parseInt(finalEpisodeNumber)+" Ep from the season details"+e.getEpisode_number()); // // e.setFileName(episode.getFileName()); // e.setMimeType(episode.getMimeType()); // e.setModifiedTime(episode.getModifiedTime());; // e.setSize(episode.getSize()); // e.setUrlString(episode.getUrlString()); // e.setSeason_id(tvShowSeasonDetails.getId()); // //why null here? // System.out.println("ep in season in seasondetails"+episode.toString()); // //// episode = gson.fromJson(e.toString(),Episode.class); // //// episode = e; //// episode.setSeason_id(tvShowSeasonDetails.getId()); //// episode.setFileName(fileName); //// episode.setMimeType(mimeType); //// episode.setModifiedTime(modifiedTime); //// episode.setSize(size); //// episode.setUrlString(urlString); // // System.out.println("ep in season in seasondetails after adding everything"+e.toString()); // Episode testEp = DatabaseClient.getInstance(context).getAppDatabase().episodeDao().findByFileName(e.getFileName()); // if(testEp == null){ // DatabaseClient.getInstance(context).getAppDatabase().episodeDao().insert(e); // } // } // } // } // private static void getTVSeasonById(long tvShowId , String finalSeasonNumber , String finalEpisodeNumber , Episode episode) { // StringBuilder responseSeasonDetails = new StringBuilder(); // try { // if (finalSeasonNumber != null) { // TVShowSeasonDetails tvShowSeasonDetails = DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().findByShowIdAndSeasonNumber(tvShowId , finalSeasonNumber); // if (tvShowSeasonDetails == null) { // System.out.println("Season Number " + finalSeasonNumber); // // String finalUrl = "https://api.themoviedb.org/3/tv/" + tvShowId + "/season/" + finalSeasonNumber + "?api_key=" + TMDB_API_KEY + "&language=en-US"; // URL url = new URL(finalUrl); // HttpURLConnection con = (HttpURLConnection) url.openConnection(); // con.setRequestMethod("GET"); // int responseCode = con.getResponseCode(); // if (responseCode == HttpURLConnection.HTTP_OK) { // success // BufferedReader in = new BufferedReader(new InputStreamReader( // con.getInputStream())); // String inputLine; // responseSeasonDetails = new StringBuilder(); // while ((inputLine = in.readLine()) != null) { // responseSeasonDetails.append(inputLine); // } // in.close(); // } else { // System.out.println("GET request did not work"); // } // // Gson gson = new Gson(); // // tvShowSeasonDetails = gson.fromJson(responseSeasonDetails.toString() , TVShowSeasonDetails.class); // // // if (tvShowSeasonDetails != null) { // // if (tvShowId != 0) { // tvShowSeasonDetails.setShow_id(tvShowId); // } // // System.out.println("tvShowSeasonDetails " + tvShowSeasonDetails); // TVShowSeasonDetails test = DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().find(tvShowSeasonDetails.getId()); // if (test == null) // DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().insert(tvShowSeasonDetails); // // } // // // } // // System.out.println("Episode Number" + finalEpisodeNumber); // // try { // // Episode e = tvShowSeasonDetails.getEpisodes().stream() // .filter(episode1 -> (Integer.parseInt(finalEpisodeNumber)==episode1.getEpisode_number())) // .findAny() // .orElse(null); // // // System.out.println("Episode before inserting in db found in tvseason details" +e.toString()); // if(e!=null) { // e.setFileName(episode.getFileName()); // e.setMimeType(episode.getMimeType()); // e.setModifiedTime(episode.getModifiedTime()); // e.setSize(episode.getSize()); // e.setUrlString(episode.getUrlString()); // e.setGd_id(episode.getGd_id()); // e.setIndex_id(episode.getIndex_id()); // // e.setSeason_id(tvShowSeasonDetails.getId()); // e.setShow_id(tvShowId); // //// DatabaseClient.getInstance(context).getAppDatabase().episodeDao().deleteByLink(e.getUrlString()); // // DatabaseClient.getInstance(context).getAppDatabase().episodeDao().insert(e); // System.out.println("Episode after inserting in db" + Integer.parseInt(finalEpisodeNumber) + " Ep from the season details" + e.getEpisode_number()); // } // // }catch (NullPointerException e){ // // } // // //// for (Episode e : tvShowSeasonDetails.getEpisodes()) { //// if (e.getEpisode_number() == Integer.parseInt(finalEpisodeNumber)) { //// System.out.println("Episode Number from title of the file " + Integer.parseInt(finalEpisodeNumber) + " Ep from the season details " + e.getEpisode_number()); //// //// e.setFileName(episode.getFileName()); //// e.setMimeType(episode.getMimeType()); //// e.setModifiedTime(episode.getModifiedTime()); //// e.setSize(episode.getSize()); //// e.setUrlString(episode.getUrlString()); //// e.setGd_id(episode.getGd_id()); //// e.setIndex_id(episode.getIndex_id()); //// //// e.setSeason_id(tvShowSeasonDetails.getId()); //// e.setShow_id(tvShowId); //// ////// DatabaseClient.getInstance(context).getAppDatabase().episodeDao().deleteByLink(e.getUrlString()); //// //// DatabaseClient.getInstance(context).getAppDatabase().episodeDao().insert(e); //// System.out.println("Episode after inserting in db" + Integer.parseInt(finalEpisodeNumber) + " Ep from the season details" + e.getEpisode_number()); //// //// } //// else { //// episode.setShow_id(tvShowId); //// if (DatabaseClient.getInstance(context).getAppDatabase().episodeDao().findByLink(episode.getIndex_id()) == null) //// DatabaseClient.getInstance(context).getAppDatabase().episodeDao().insert(episode); //// } //// } //// } // // // } // // } catch (IOException e) { // System.out.println(e); // } // } //THIS CODE WAS INSIDE TMDBGETBYID // //request for tv show by id and // TVShow oldTV = (TVShow) myMedia; // // //delete tv show (with older wrong info) // DatabaseClient.getInstance(context).getAppDatabase().tvShowDao().deleteById(oldTV.getId()); // // // for (Season tvseason: oldTV.getSeasons()) { // int tvSeasonId = tvseason.getId(); // //delete all the seasons // DatabaseClient.getInstance(context).getAppDatabase().tvShowSeasonDetailsDao().deleteById(tvSeasonId); // } // // // if(id!=null){ // String finalurl ="https://api.themoviedb.org/3/tv/"+id+"?api_key=" + TMDB_API_KEY + "&language=en-US"; // StringBuilder responseTvShowDetails = new StringBuilder(); // try { // URL url = new URL(finalurl); // Log.i("Show title" , finalurl); // HttpURLConnection con = (HttpURLConnection) url.openConnection(); // con.setRequestMethod("GET"); // int responseCode = con.getResponseCode(); // Log.i("tmdb api response" , String.valueOf(responseCode)); // if (responseCode == HttpURLConnection.HTTP_OK) { // success // BufferedReader in = new BufferedReader(new InputStreamReader( // con.getInputStream())); // String inputLine; // responseTvShowDetails = new StringBuilder(); // while ((inputLine = in.readLine()) != null) { // responseTvShowDetails.append(inputLine); // } // in.close(); // } else { // System.out.println("GET request did not work"); // } // Log.i("responseTvShowDetails" , responseTvShowDetails.toString()); // // Gson gson = new Gson(); // myMedia = gson.fromJson(responseTvShowDetails.toString() , TVShow.class); // // Log.i("tvShow" , myMedia.toString()); // // DatabaseClient.getInstance(context).getAppDatabase().tvShowDao().insert((TVShow) myMedia); // // } catch (IOException e) { // e.printStackTrace(); // } // } // // //get all the episodes to be update with new info // List episodeList = DatabaseClient.getInstance(context).getAppDatabase().episodeDao().getFromThisShow(oldTV.getId()); // // for (Episode episode: episodeList) { //// getSeasonInfo(episode.getSeason_number(),episode.getEpisode_number()); // } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/SendPostRequest.java ================================================ package com.theflexproject.thunder.utils; import static com.theflexproject.thunder.Constants.CF_CACHE_TOKEN; import static com.theflexproject.thunder.Constants.SIMPLE_PROGRAM_DOWNLOAD_API; import static com.theflexproject.thunder.MainActivity.context; import static com.theflexproject.thunder.utils.SendGetRequestTMDB.sendGet2; import static com.theflexproject.thunder.utils.SendGetRequestTMDB.sendGetTVShow; import android.os.Build; import android.util.Log; import com.google.gson.Gson; import com.google.gson.stream.JsonReader; import com.theflexproject.thunder.database.DatabaseClient; import com.theflexproject.thunder.model.File; import com.theflexproject.thunder.model.Movie; import com.theflexproject.thunder.model.ResFormat; import com.theflexproject.thunder.model.SimpleLink; import com.theflexproject.thunder.model.TVShowInfo.Episode; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.io.StringReader; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Base64; import java.util.Date; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; public class SendPostRequest { private static String nextPageToken = ""; private static int pageIndex = 0; // private static int retryLimit = 3; public static void postRequestGDIndex(String urlString , String user , String pass , boolean isTVShow , int index_id) { try { if (urlString.charAt(urlString.length() - 1) != '/') { urlString += '/'; } URL url = new URL(urlString); String user_pass = user + ":" + pass; byte[] user_pass_array = user_pass.getBytes(StandardCharsets.UTF_8); String authHeaderValue; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(user_pass_array); } else { authHeaderValue = "Basic " + Arrays.toString(android.util.Base64.encode(user_pass_array , android.util.Base64.DEFAULT));// Unresolved reference: decode } // String authHeaderValue = "Basic "+ Base64.getEncoder().encodeToString(user_pass_array); System.out.println(authHeaderValue); Log.i("token" , authHeaderValue); Map params = new LinkedHashMap<>(); params.put("authorization" , authHeaderValue); params.put("page_token" , nextPageToken); params.put("page_index" , pageIndex); StringBuilder postData = new StringBuilder(); for (Map.Entry param : params.entrySet()) { if (postData.length() != 0) postData.append('&'); postData.append(URLEncoder.encode(param.getKey() , "UTF-8")); postData.append('='); postData.append(URLEncoder.encode(String.valueOf(param.getValue()) , "UTF-8")); } byte[] postDataBytes = postData.toString().getBytes(StandardCharsets.UTF_8); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); BufferedReader br = null; boolean failed = false; conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type" , "application/x-www-form-urlencoded"); conn.setRequestProperty("Content-Length" , String.valueOf(postDataBytes.length)); conn.setRequestProperty("authorization" , authHeaderValue); // conn.setRequestProperty("Referer" , url.toString()); conn.setDoOutput(true); conn.getOutputStream().write(postDataBytes); try { br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); } catch (FileNotFoundException e) { failed = true; } int code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); int tryCount = 0; while ((code != 200 || failed) && tryCount < 5) { System.out.println("Request is not successful - " + tryCount); tryCount++; conn.disconnect(); conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type" , "application/x-www-form-urlencoded"); conn.setRequestProperty("Content-Length" , String.valueOf(postDataBytes.length)); conn.setRequestProperty("authorization" , authHeaderValue); // conn.setRequestProperty("Referer" , url.toString()); conn.setDoOutput(true); conn.getOutputStream().write(postDataBytes); try { br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); } catch (FileNotFoundException e) { failed = true; System.out.println("Failed again while retrying " + e); } } if (br != null) { StringBuilder sb = new StringBuilder(); for (int c; (c = br.read()) >= 0; ) sb.append((char) c); br.close(); System.out.println("Undecrypted response" + sb.toString()); if (sb.length() > 0 && sb.toString().contains("window.drive_names")) { String res = sb.substring(sb.indexOf("window.drive_names = JSON.parse('[") + 34 , sb.indexOf("]")); res = res.replaceAll("\"" , ""); String[] strings = res.split(","); System.out.println(Arrays.toString(strings)); for (int i = 0; i < strings.length; i++) { postRequestGDIndex(urlString + i + ":/" , user , pass , isTVShow , index_id); } } //Only for gd index as the response in encrypted StringBuilder reverseSb = sb.reverse(); String encodedString = reverseSb.substring(24 , reverseSb.length() - 20); byte[] decodedBytes; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { decodedBytes = Base64.getDecoder().decode(encodedString); } else { decodedBytes = android.util.Base64.decode(encodedString , android.util.Base64.DEFAULT);// Unresolved reference: decode } // byte[] decodedBytes = Base64.getDecoder().decode(encodedString); String decodedString = new String(decodedBytes , StandardCharsets.UTF_8); if(!decodedString.equals("undefined")){ System.out.println("Response from GD Index" + decodedString); Gson gson = new Gson(); ResFormat target = gson.fromJson(decodedString , ResFormat.class); List folders = new ArrayList<>(); List files = target.getData().getFiles(); DatabaseClient.getInstance(context).getAppDatabase().resFormatDao().insert(target); // if (files == null) { // while (retryLimit >= 0) { // postRequestGDIndex(urlString , user , pass , isTVShow , index_id); // retryLimit--; // } // } //send files to tmdb and insert them to db if (!isTVShow) { checkFilesAndSendToTMDBMovie(folders , files , urlString , index_id); } else { checkFilesAndSendToTMDBTVShow(folders , files , urlString , index_id); } if (target.nextPageToken != null) { nextPageToken = target.getNextPageToken(); pageIndex++; postRequestGDIndex(urlString , user , pass , isTVShow , index_id); } for (int i = 0; i < folders.size(); i++) { pageIndex = 0; nextPageToken = ""; postRequestGDIndex(folders.get(i) , user , pass , isTVShow , index_id); Log.i("Folder" , folders.get(i)); } } } } catch (IOException e) { System.out.println("IOExceptio Occured in gdIndex"); } } public static void postRequestGoIndex(String urlString , String user , String pass , boolean isTVShow , int index_id) { try { if (urlString.charAt(urlString.length() - 1) != '/') { urlString += '/'; } URL url = new URL(urlString); String user_pass = user + ":" + pass; byte[] user_pass_array = user_pass.getBytes(StandardCharsets.UTF_8); String authHeaderValue; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(user_pass_array); } else { authHeaderValue = "Basic " + Arrays.toString(android.util.Base64.encode(user_pass_array , android.util.Base64.DEFAULT));// Unresolved reference: decode } // String authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(user_pass_array); System.out.println(authHeaderValue); String json = "{ \"q\":\"\",\"password\": null , \"page_index\":" + pageIndex + "}"; byte[] postDataBytes = json.getBytes(StandardCharsets.UTF_8); BufferedReader br = null; boolean failed = false; HttpURLConnection conn = (HttpURLConnection) url.openConnection(); try { conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type" , "application/json"); conn.setRequestProperty("Accept" , "application/json"); conn.setRequestProperty("Authorization" , authHeaderValue); conn.setDoOutput(true); conn.getOutputStream().write(postDataBytes); } catch (FileNotFoundException e) { failed = true; System.out.println("Failed in the initial attempt " + e); } int code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); int tryCount = 0; while ((code != 200 || failed) && tryCount < 10) { System.out.println("Request is not successful - " + tryCount); tryCount++; // conn.getInputStream().close(); conn.disconnect(); conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type" , "application/json"); conn.setRequestProperty("Accept" , "application/json"); conn.setRequestProperty("Authorization" , authHeaderValue); conn.setDoOutput(true); conn.getOutputStream().write(postDataBytes); try { br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); } catch (FileNotFoundException e) { failed = true; System.out.println("Failed in the retry attempt" + e); } code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); } if (br != null) { StringBuilder sb = new StringBuilder(); for (int c; (c = br.read()) >= 0; ) sb.append((char) c); br.close(); System.out.println("" + sb); Gson gson = new Gson(); ResFormat target = gson.fromJson(String.valueOf(sb) , ResFormat.class); List folders = new ArrayList<>(); List files = target.getData().getFiles(); // if (files == null) { // while (retryLimit >= 0) { // postRequestGoIndex(urlString , user , pass , isTVShow , index_id); // retryLimit--; // } // } DatabaseClient.getInstance(context).getAppDatabase().resFormatDao().insert(target); if (!isTVShow) { checkFilesAndSendToTMDBMovie(folders , files , urlString , index_id); } else { checkFilesAndSendToTMDBTVShow(folders , files , urlString , index_id); } if (target.nextPageToken != null) { nextPageToken = target.nextPageToken; pageIndex++; postRequestGoIndex(urlString , user , pass , isTVShow , index_id); } for (int i = 0; i < folders.size(); i++) { pageIndex = 0; nextPageToken = ""; postRequestGoIndex(folders.get(i) , user , pass , isTVShow , index_id); Log.i("Folder" , folders.get(i)); } } } catch (IOException e) { System.out.println("Exception in Goindex"); } } public static void postRequestMapleIndex(String urlString , String user , String pass , boolean isTVShow , int index_id) { try { if (urlString.charAt(urlString.length() - 1) != '/') { urlString += '/'; } urlString += "?rootId=root"; URL url = new URL(urlString); String user_pass = user + ":" + pass; byte[] user_pass_array = user_pass.getBytes(StandardCharsets.UTF_8); String authHeaderValue; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(user_pass_array); } else { authHeaderValue = "Basic " + Arrays.toString(android.util.Base64.encode(user_pass_array , android.util.Base64.DEFAULT));// Unresolved reference: decode } // String authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(user_pass_array); System.out.println(authHeaderValue); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); BufferedReader br = null; boolean failed = false; try { conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type" , "application/json"); conn.setRequestProperty("Accept" , "application/json"); conn.setRequestProperty("Authorization" , authHeaderValue); conn.setDoOutput(true); br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); } catch (FileNotFoundException e) { failed = true; System.out.println("Failed in the initial attempt " + e); } int code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); int tryCount = 0; while ((code != 200 || failed) && tryCount < 5) { System.out.println("Request is not successful - " + tryCount); tryCount++; // conn.getInputStream().close(); conn.disconnect(); conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type" , "application/json"); conn.setRequestProperty("Accept" , "application/json"); conn.setRequestProperty("Authorization" , authHeaderValue); conn.setDoOutput(true); try { br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); } catch (FileNotFoundException e) { failed = true; System.out.println("Failed in the retry attempt " + e); } } if (br != null) { StringBuilder sb = new StringBuilder(); for (int c; (c = br.read()) >= 0; ) sb.append((char) c); br.close(); System.out.println("Response from Maple Index" + sb); Gson gson = new Gson(); ResFormat target = gson.fromJson(sb.toString() , ResFormat.class); List folders = new ArrayList<>(); List files = target.getData().getFiles(); // if (files == null) { // // while (retryLimit >= 0) { // postRequestMapleIndex(urlString , user , pass , isTVShow , index_id); // retryLimit--; // } // } DatabaseClient.getInstance(context).getAppDatabase().resFormatDao().insert(target); if (!isTVShow) { checkFilesAndSendToTMDBMovie(folders , files , urlString , index_id); } else { checkFilesAndSendToTMDBTVShow(folders , files , urlString , index_id); } if (target.nextPageToken != null) { nextPageToken = target.getNextPageToken(); pageIndex++; postRequestMapleIndex(urlString , user , pass , isTVShow , index_id); } for (int i = 0; i < folders.size(); i++) { pageIndex = 0; nextPageToken = ""; postRequestMapleIndex(folders.get(i) , user , pass , isTVShow , index_id); Log.i("Folder" , folders.get(i)); } } } catch (IOException e) { System.out.println("Exception in maple"); } } public static void postRequestSimpleProgramIndex(String urlString , String user , String pass , boolean isTVShow , int index_id) { try { if (urlString.charAt(urlString.length() - 1) != '/') { urlString += '/'; } Map params = new LinkedHashMap<>(); params.put("page_token" , nextPageToken); params.put("page_index" , pageIndex); params.put("password" , ""); StringBuilder postData = new StringBuilder(); for (Map.Entry param : params.entrySet()) { if (postData.length() != 0) postData.append('&'); postData.append(URLEncoder.encode(param.getKey() , "UTF-8")); postData.append('='); postData.append(URLEncoder.encode(String.valueOf(param.getValue()) , "UTF-8")); } String s = "?" + postData; System.out.println("inside simple" + urlString); URL url = new URL(urlString + s); System.out.println("Url built with params" + postData); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); BufferedReader br = null; boolean failed = false; try { conn.setRequestMethod("GET"); conn.setRequestProperty("cf_cache_token" ,CF_CACHE_TOKEN); br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); } catch (FileNotFoundException e) { failed = true; System.out.println("Failed in the initial attempt " + e); } int code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); int tryCount = 0; while ((code != 200 || failed) && tryCount < 5) { System.out.println("Request is not successful - " + tryCount); tryCount++; // conn.getInputStream().close(); conn.disconnect(); conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); conn.setRequestProperty("cf_cache_token" , "UKsVpQqBMxB56gBfhYKbfCVkRIXMh42pk6G4DdkXXoVh7j4BjV"); try { br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); } catch (FileNotFoundException e) { failed = true; System.out.println("Failed in the retry attempt " + e); } } if (br != null) { StringBuilder sb = new StringBuilder(); for (int c; (c = br.read()) >= 0; ) sb.append((char) c); br.close(); System.out.println("Response from GD Index" + sb); Gson gson = new Gson(); ResFormat target = gson.fromJson(sb.toString() , ResFormat.class); List folders = new ArrayList<>(); List files = target.getData().getFiles(); DatabaseClient.getInstance(context).getAppDatabase().resFormatDao().insert(target); //send files to tmdb and insert them to db if (!isTVShow) { checkFilesAndSendToTMDBMovie(folders , files , urlString , index_id); } else { checkFilesAndSendToTMDBTVShow(folders , files , urlString , index_id); } if (target.nextPageToken != null) { nextPageToken = target.getNextPageToken(); pageIndex++; postRequestSimpleProgramIndex(urlString , user , pass , isTVShow , index_id); } // if (files == null) { // while (retryLimit >= 0) { // System.out.println("likely a worker exception occurred"); // postRequestSimpleProgramIndex(urlString , user , pass , isTVShow , index_id); // retryLimit--; // } // } for (int i = 0; i < folders.size(); i++) { pageIndex = 0; nextPageToken = ""; postRequestSimpleProgramIndex(folders.get(i) , user , pass , isTVShow , index_id); Log.i("Folder" , folders.get(i)); } } } catch (IOException e) { System.out.println("Exception in simple"); } } private static void checkFilesAndSendToTMDBMovie(List folders , List files , String urlString , int index_id) { Gson gson = new Gson(); if (files != null) { try { System.out.println("Files from the index" + files); for (int i = 0; i < files.size(); i++) { File file = files.get(i); if (file.getMimeType().equals("video/x-matroska") || file.getMimeType().equals("video/mp4") || file.getMimeType().equals("video/x-msvideo") || file.getMimeType().equals("video/mpeg") || file.getMimeType().equals("video/webm")) { boolean test = isAlreadyPresent(file.getId() , file.getModifiedTime()); if (!test) { System.out.println("the file is not present"); String callingMethodName = Thread.currentThread().getStackTrace()[3].getMethodName(); System.out.println("Calling method name " + callingMethodName); if (callingMethodName.equals("postRequestSimpleProgramIndex")) { file.setUrlstring(generateDownloadLinkSimpleProgram(file.getId())); } else { file.setUrlstring(urlString + file.getName()); } System.out.println("File to string" +file.toString()); try { JsonReader reader = new JsonReader(new StringReader(file.toString())); reader.setLenient(true); Movie movie = gson.fromJson(reader, Movie.class); // Movie movie = gson.fromJson(file.toString() , Movie.class); movie.setFileName(file.getName()); movie.setGd_id(file.getId()); movie.setIndex_id(index_id); // long modifiedTimeLong = dateToLong(file.getModifiedTime()); movie.setModifiedTime(file.getModifiedTime()); // movie.setModifiedTime(modifiedTimeLong); sendGet2(movie);//tmdbrequest Log.i("Movie" , movie.toString()); }catch (Exception e){ System.out.println("Malformed Json in checkFilesAndSendToTMDBMovie"+e.toString()); } } } else if (file.getMimeType().equals("application/vnd.google-apps.folder")) { folders.add(urlString + file.getName() + "/"); } } } catch (NullPointerException e) { Log.i("Exception null pointer" , e.toString()); } } } private static boolean isAlreadyPresent(String id , Date modifiedTime) { System.out.println("id to test " + id); Movie movie = DatabaseClient.getInstance(context).getAppDatabase().movieDao().getByGdId(id); Episode episode = DatabaseClient.getInstance(context).getAppDatabase().episodeDao().findByGdId(id); if (movie != null && modifiedTime.after(movie.getModifiedTime())) { DatabaseClient.getInstance(context).getAppDatabase().movieDao().deleteByGdId(id); return false; } if (episode != null && modifiedTime.after(episode.getModifiedTime())) { DatabaseClient.getInstance(context).getAppDatabase().episodeDao().deleteByGdId(id); return false; } if (movie == null && episode == null) { System.out.println("not present in movies"); return false; } else { return true; } } private static String generateDownloadLinkSimpleProgram(String id) { try { URL url = new URL(SIMPLE_PROGRAM_DOWNLOAD_API+ id); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); int code = conn.getResponseCode(); System.out.println(("HTTP CODE" + code)); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream() , StandardCharsets.UTF_8)); StringBuilder sb = new StringBuilder(); for (int c; (c = br.read()) >= 0; ) sb.append((char) c); br.close(); Gson gson = new Gson(); SimpleLink target = gson.fromJson(sb.toString() , SimpleLink.class); System.out.println("Response from link generator" + target); return target.getUrl(); } catch (IOException e) { e.printStackTrace(); } return null; } private static void checkFilesAndSendToTMDBTVShow(List showFolders , List files , String urlString , int index_id) { Gson gson = new Gson(); if (files != null) { try { for (int i = 0; i < files.size(); i++) { File file = files.get(i); if (file.getMimeType().equals("video/x-matroska") || file.getMimeType().equals("video/mp4") || file.getMimeType().equals("video/x-msvideo") || file.getMimeType().equals("video/mpeg") || file.getMimeType().equals("video/webm")) { boolean test = isAlreadyPresent(file.getId() , file.getModifiedTime()); if (!test) { String callingMethodName = Thread.currentThread().getStackTrace()[3].getMethodName(); if (callingMethodName.equals("postRequestSimpleProgramIndex")) { file.setUrlstring(generateDownloadLinkSimpleProgram(file.getId())); } else { file.setUrlstring(urlString + file.getName()); } Episode episode = gson.fromJson(file.toString() , Episode.class); episode.setFileName(file.getName()); episode.setModifiedTime(file.getModifiedTime()); episode.setGd_id(file.getId()); episode.setIndex_id(index_id); System.out.println("episode before tmdb" + episode); sendGetTVShow(episode);//tmdbrequest } } else if (file.getMimeType().equals("application/vnd.google-apps.folder")) { showFolders.add(urlString + file.getName() + "/"); Log.i("showFolders" , showFolders + file.getName()); } } } catch (NumberFormatException e) { Log.i("Exception" , e.toString()); } } } // @RequiresApi(api = Build.VERSION_CODES.O) // public static void postRequestGDIndexTVShow(String urlString , String user , String pass) throws IOException { // // if(urlString.charAt(urlString.length()-1)!='/'){urlString+='/';} // // URL url = new URL(urlString); // // String user_pass = user+":"+pass; // byte[] user_pass_array = user_pass.getBytes(StandardCharsets.UTF_8); // String authHeaderValue = "Basic "+ Base64.getEncoder().encodeToString(user_pass_array); // // System.out.println(authHeaderValue); // // // Map params = new LinkedHashMap<>(); // params.put("authorization", authHeaderValue); // params.put("page_token", nextPageToken); // params.put("page_index", pageIndex); // // StringBuilder postData = new StringBuilder(); // for (Map.Entry param : params.entrySet()) { // if (postData.length() != 0) postData.append('&'); // postData.append(URLEncoder.encode(param.getKey(), "UTF-8" )); // postData.append('='); // postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8")); // } // byte[] postDataBytes = postData.toString().getBytes(StandardCharsets.UTF_8); // // HttpURLConnection conn = (HttpURLConnection)url.openConnection(); // conn.setRequestMethod("POST"); // conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); // conn.setRequestProperty("Content-Length", String.valueOf(postDataBytes.length)); // conn.setRequestProperty("authorization",authHeaderValue); // conn.setDoOutput(true); // conn.getOutputStream().write(postDataBytes); // // // int code = conn.getResponseCode(); // System.out.println(("HTTP CODE" + code)); // // /* Infinite recursion not a good solution */ // if(code==500){ // postRequestGDIndexTVShow(urlString,user,pass); // } // // BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8)); // StringBuilder sb = new StringBuilder(); // for (int c; (c = br.read()) >= 0;) // sb.append((char)c); // br.close(); // // //Only for gdindex as the response in encrypted // StringBuilder reverseSb = sb.reverse(); // String encodedString = reverseSb.substring(24,reverseSb.length()-20); // byte[] decodedBytes = Base64.getDecoder().decode(encodedString); // String decodedString = new String(decodedBytes,StandardCharsets.UTF_8); // // System.out.println("Response from GD Index"+decodedString); // Gson gson = new Gson(); // ResFormat target = gson.fromJson(decodedString, ResFormat.class); // // DatabaseClient.getInstance(context).getAppDatabase().resFormatDao().insert(target); // // List showFolders = new ArrayList<>(); // List files = target.getData().getFiles(); // // checkFilesAndSendToTMDBTVShow(showFolders,files,url); // // if(target.nextPageToken!=null){ // nextPageToken =target.getNextPageToken(); // pageIndex++; // postRequestGDIndexTVShow(urlString,user,pass); // } // for (int i = 0; i < showFolders.size(); i++) { // pageIndex = 0; // nextPageToken = ""; // postRequestGDIndexTVShow(showFolders.get(i),user,pass); // Log.i("Folder", showFolders.get(i)); // } // // // // } // // @RequiresApi(api = Build.VERSION_CODES.O) // public static void postRequestGoIndexTVShow(String urlString, String user, String pass) throws IOException, JSONException { // if (urlString.charAt(urlString.length() - 1) != '/') {urlString += '/';} // // URL url = new URL(urlString); // // String user_pass = user + ":" + pass; // byte[] user_pass_array = user_pass.getBytes(StandardCharsets.UTF_8); // String authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(user_pass_array); // // System.out.println(authHeaderValue); // // String json = "{ \"q\":\"\",\"password\": null , \"page_index\":" + pageIndex + "}"; // byte[] postDataBytes = json.getBytes(StandardCharsets.UTF_8); // // // // HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // conn.setRequestMethod("POST"); // conn.setRequestProperty("Content-Type", "application/json"); // conn.setRequestProperty("Accept", "application/json"); // conn.setRequestProperty("Authorization", authHeaderValue); // conn.setDoOutput(true); // conn.getOutputStream().write(postDataBytes); // // int code = conn.getResponseCode(); // System.out.println(("HTTP CODE" + code)); // // /* Infinite recursion not a good solution */ // if(code==500){ // postRequestGoIndexTVShow(urlString,user,pass); // } // // BufferedReader br = new BufferedReader(new InputStreamReader( conn.getInputStream(), StandardCharsets.UTF_8)); // // StringBuilder sb = new StringBuilder(); // for (int c; (c = br.read()) >= 0;) // sb.append((char)c); // br.close(); // System.out.println(""+ sb); // Gson gson = new Gson(); // ResFormat target = gson.fromJson(String.valueOf(sb), ResFormat.class); // // DatabaseClient.getInstance(context).getAppDatabase().resFormatDao().insert(target); // // List folders = new ArrayList<>(); // List files = target.getData().getFiles(); // // // checkFilesAndSendToTMDBTVShow(folders,files,url); // // // // // if(target.nextPageToken!=null){ // nextPageToken =target.nextPageToken; // pageIndex++; // postRequestGoIndexTVShow(urlString,user,pass); // } // // for (int i = 0; i < folders.size(); i++) { // pageIndex = 0; // nextPageToken = ""; // postRequestGoIndexTVShow(folders.get(i),user,pass); // Log.i("Folder", folders.get(i)); // } // // } // // @RequiresApi(api = Build.VERSION_CODES.O) // public static void postRequestMapleIndexTVShow(String urlString, String user, String pass) throws IOException { // // if (urlString.charAt(urlString.length() - 1) != '/') {urlString += '/';} // urlString +="?rootId=root"; // // URL url = new URL(urlString); // // String user_pass = user + ":" + pass; // byte[] user_pass_array = user_pass.getBytes(StandardCharsets.UTF_8); // String authHeaderValue = "Basic " + Base64.getEncoder().encodeToString(user_pass_array); // // System.out.println(authHeaderValue); // // HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // conn.setRequestMethod("POST"); // conn.setRequestProperty("Content-Type", "application/json"); // conn.setRequestProperty("Accept", "application/json"); // conn.setRequestProperty("Authorization", authHeaderValue); // conn.setDoOutput(true); // // // int code = conn.getResponseCode(); // System.out.println(("HTTP CODE" + code)); // // /* Infinite recursion not a good solution */ // if(code==500){ // postRequestMapleIndexTVShow(urlString,user,pass); // } // // BufferedReader br = new BufferedReader(new InputStreamReader( conn.getInputStream(), StandardCharsets.UTF_8)); // StringBuilder sb = new StringBuilder(); // for (int c; (c = br.read()) >= 0;) // sb.append((char)c); // br.close(); // // System.out.println("Response from Maple Index"+ sb); // Gson gson = new Gson(); // ResFormat target = gson.fromJson(sb.toString(), ResFormat.class); // // DatabaseClient.getInstance(context).getAppDatabase().resFormatDao().insert(target); // // List folders = new ArrayList<>(); // List files = target.getData().getFiles(); // // checkFilesAndSendToTMDBTVShow(folders,files,url); // // if(target.nextPageToken!=null){ // nextPageToken =target.getNextPageToken(); // pageIndex++; // postRequestMapleIndexTVShow(urlString,user,pass); // } // // for (int i = 0; i < folders.size(); i++) { // pageIndex = 0; // nextPageToken = ""; // postRequestMapleIndexTVShow(folders.get(i),user,pass); // Log.i("Folder", folders.get(i)); // } // // // // } // @RequiresApi(api = Build.VERSION_CODES.O) // public static void postRequestGoExtendedIndex(String urlString, String user, String pass) throws IOException { // if(urlString.charAt(urlString.length()-1)!='/'){urlString+='/';} // URL url = new URL(urlString); // String user_pass = user+":"+pass; // byte[] user_pass_array = user_pass.getBytes(StandardCharsets.UTF_8); // String token = "Basic "+ Base64.getEncoder().encodeToString(user_pass_array); // // Log.i("token",token); // Map params = new LinkedHashMap<>(); // params.put("authorization", token); // params.put("page_token", nextPageToken); // params.put("page_index", pageIndex); // // // StringBuilder postData = new StringBuilder(); // for (Map.Entry param : params.entrySet()) { // if (postData.length() != 0) postData.append('&'); // postData.append(URLEncoder.encode(param.getKey(), "UTF-8" )); // postData.append('='); // postData.append(URLEncoder.encode(String.valueOf(param.getValue()), "UTF-8")); // } // byte[] postDataBytes = postData.toString().getBytes(StandardCharsets.UTF_8); // // HttpURLConnection conn = (HttpURLConnection)url.openConnection(); // conn.setRequestMethod("POST"); // conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); // conn.setRequestProperty("Content-Length", String.valueOf(postDataBytes.length)); // conn.setRequestProperty("authorization",token); // conn.setDoOutput(true); // conn.getOutputStream().write(postDataBytes); // // // int code = conn.getResponseCode(); // System.out.println(("HTTP CODE" + String.valueOf(code))); // // /** Infinite recursion not a good solution */ // if(code==500){ // postRequestGDIndex(urlString,user,pass); // } // // Reader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")); // // StringBuilder sb = new StringBuilder(); // for (int c; (c = in.read()) >= 0;) // sb.append((char)c); // // // Gson gson = new Gson(); // ResFormat target = gson.fromJson(sb.toString(), ResFormat.class); // // try{ // Log.i("Error",sb.toString()); // }catch (NullPointerException w){ w.toString();} // // DatabaseClient.getInstance(mCtx).getAppDatabase().resFormatDao().insert(target); // // List folders = new ArrayList<>(); // // try{ // for (int i = 0; i < target.data.files.size(); i++) { // File file = target.data.files.get(i); // if(file.getMimeType().equals("video/x-matroska") // ||file.getMimeType().equals("video/mp4") // || file.getMimeType().equals("video/x-msvideo") // || file.getMimeType().equals("video/mpeg") // || file.getMimeType().equals("video/webm")){ // file.setUrlstring(url+file.getName()); // sendGet2(file); // DatabaseClient.getInstance(mCtx).getAppDatabase().fileDao().insert(target.data.files.get(i)); // }else if( file.getMimeType().equals("application/vnd.google-apps.folder")){ // folders.add(url+file.getName()+"/"); // } // } // }catch (NullPointerException e){Log.i("Exception",e.toString());} // Log.i("Folder",folders.toString()); // if(target.nextPageToken!=null){ // nextPageToken =target.nextPageToken; // pageIndex++; // postRequestGDIndex(urlString,user,pass); // } // for (int i = 0; i < folders.size(); i++) { // pageIndex = 0; // nextPageToken = ""; // postRequestGDIndex(folders.get(i),user,pass); // Log.i("Folder",folders.get(i).toString()); // } // // // // } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/SettingsManager.java ================================================ package com.theflexproject.thunder.utils; import android.content.Context; import android.content.SharedPreferences; public class SettingsManager { Context context; SharedPreferences sharedPreferences; public SettingsManager(Context context) { sharedPreferences = context.getSharedPreferences("Settings", Context.MODE_PRIVATE); this.context = context; } // public void firstTimeLaunch(Boolean isFirstTime) { // SharedPreferences.Editor editor = sharedPreferences.edit(); // editor.putBoolean("RESTORE_DATABASE", isFirstTime); // editor.commit(); // } public void saveRefresh(Boolean REFRESH_PERIODICALLY_BUTTON,Integer timeToRefresh) { SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean("REFRESH_SETTING", REFRESH_PERIODICALLY_BUTTON); editor.putInt("REFRESH_TIME", timeToRefresh); editor.commit(); } public void saveCast(Boolean CAST_BUTTON) { SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean("CAST_SETTING", CAST_BUTTON); editor.commit(); } public void saveExternal(Boolean EXTERNAL_PLAYER_BUTTON) { SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean("EXTERNAL_SETTING", EXTERNAL_PLAYER_BUTTON); editor.commit(); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/ShowUtils.java ================================================ package com.theflexproject.thunder.utils; import static com.theflexproject.thunder.utils.ParseUtils.getCountryOfOrigin; import static com.theflexproject.thunder.utils.ParseUtils.parenthesisYearExtractor; import static com.theflexproject.thunder.utils.ParseUtils.removeAfterEmptyParenthesis; import android.util.Pair; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Class used to parse the file names and try to guess if we have a tv show. */ public final class ShowUtils { // disable for now the SxxEyy-showName does not exist and makes ./serie/The Flash/S02/S02E01 lahlah.mkv not identified private static final boolean ENABLE_PATTERNS_EPISODE_FIRST = false; public static final String EPNUM = "epnum"; public static final String SEASON = "season"; public static final String SHOW = "show"; public static final String YEAR = "year"; public static final String ORIGIN = "origin"; /** These are considered equivalent to space */ public static final char[] REPLACE_ME = new char[] { '.', // "The.Good.Wife" will not be found '_', // "The_Good_Wife" would be found but we need the clean name for local display }; private ShowUtils() { // do not make instances of me } // Separators: Punctuation or Whitespace // remove the "(" and ")" in punctuation to avoid matching end parenthesis of date in "show (1987) s01e01 title.mkv" private static final String SEP_OPTIONAL = "[[\\p{Punct}&&[^()]]\\s]*+"; private static final String SEP_MANDATORY = "[[\\p{Punct}&&[^()]]\\s]++"; // Name patterns where the show is present first. Examples below. private static final Pattern[] patternsShowFirst = { // almost anything that has S 00 E 00 in it and recognize shows with year as season number Pattern.compile("(.+?)" + SEP_MANDATORY + "(?:s|seas|season)" + SEP_OPTIONAL + "(20\\d{2}|\\d{1,2})" + SEP_OPTIONAL + "(?:e|ep|episode)" + SEP_OPTIONAL + "(\\d{1,3})(?!\\d).*", Pattern.CASE_INSENSITIVE), // almost anything that has 00 x 00, note mandatory separator to fixe detection of movies 5.1x264 as Season 1 episode 264 Pattern.compile("(.+?)" + SEP_MANDATORY + "(20\\d{2}|\\d{1,2})" + SEP_OPTIONAL + "x" + SEP_MANDATORY + "(\\d{1,3})(?!\\d).*", Pattern.CASE_INSENSITIVE), // special case to avoid x264 or x265 Pattern.compile("(.+?)" + SEP_MANDATORY + "(20\\d{2}|\\d{1,2})" + SEP_OPTIONAL + "x" + SEP_OPTIONAL + "(?!(?:264|265|720))(\\d{1,3})(?!\\d).*", Pattern.CASE_INSENSITIVE), // Disable following pattern since it makes L.627 or OSS 117 movies identified as TV serie // foo.103 and similar // Note: can detect movies that contain 3 digit numbers like "127 hours" or shows that have such numbers in their name like "zoey 101" // Limit first digit to be >0 in order not to identify "James Bond 007" as tv show //Pattern.compile("(.+)" + SEP_MANDATORY + "(?!(?:264|265|720))([1-9])(\\d{2,2})" + SEP_MANDATORY + ".*", Pattern.CASE_INSENSITIVE), }; // Name patterns which begin with the number of the episode private static final Pattern[] patternsEpisodeFirst = { // anything that starts with S 00 E 00, text after "-" getting ignored Pattern.compile(SEP_OPTIONAL + "(?:s|seas|season)" + SEP_OPTIONAL + "(\\d{1,2})" + SEP_OPTIONAL + "(?:e|ep|episode)" + SEP_OPTIONAL + "(\\d{1,3})(?!\\d)" + SEP_OPTIONAL + "([^-]*+).*", Pattern.CASE_INSENSITIVE), // anything that starts with 00 x 00, text after "-" getting ignored like in "S01E15 - ShowName - Ignored - still ignored" Pattern.compile(SEP_OPTIONAL + "(\\d{1,2})" + SEP_OPTIONAL + "x" + SEP_OPTIONAL + "(\\d{1,3})(?!\\d)" + SEP_OPTIONAL + "([^-]*+).*", Pattern.CASE_INSENSITIVE), }; public static String cleanUpName(String name) { name = ParseUtils.unifyApostrophes(name); name = ParseUtils.removeNumbering(name); name = ParseUtils.replaceAcronyms(name); name = StringUtils.replaceAllChars(name, REPLACE_ME, ' '); return name.trim(); } /** * Parse the filename and returns a Map containing the keys "show", * "season" and "epnum" and their associated values. * If the filename doesn't match a tv show pattern, returns null. */ public static Map parseShowName(String filename) { final HashMap buffer = new HashMap(); Pair nameYear; Pair nameCountry; String name; for(Pattern regexp: patternsShowFirst) { Matcher matcher = regexp.matcher(filename); try { if(matcher.find()) { nameYear = parenthesisYearExtractor(matcher.group(1)); // remove junk behind () that was containing year // applies to movieName (1928) junk -> movieName () junk -> movieName name = removeAfterEmptyParenthesis(nameYear.first); name = cleanUpName(name); nameCountry = getCountryOfOrigin(name); buffer.put(SHOW, nameCountry.first); buffer.put(SEASON, matcher.group(2)); buffer.put(EPNUM, matcher.group(3)); buffer.put(YEAR, nameYear.second); buffer.put(ORIGIN, nameCountry.second); return buffer; } } catch (IllegalArgumentException ignored) {} } if (ENABLE_PATTERNS_EPISODE_FIRST) for(Pattern regexp: patternsEpisodeFirst) { Matcher matcher = regexp.matcher(filename); try { if(matcher.find()) { nameYear = parenthesisYearExtractor(matcher.group(3)); // remove junk behind () that was containing year // applies to movieName (1928) junk -> movieName () junk -> movieName name = removeAfterEmptyParenthesis(nameYear.first); name = cleanUpName(name); nameCountry = getCountryOfOrigin(name); buffer.put(SHOW, nameCountry.first); buffer.put(SEASON, matcher.group(1)); buffer.put(EPNUM, matcher.group(2)); buffer.put(YEAR, nameYear.second); buffer.put(ORIGIN, nameCountry.second); return buffer; } } catch (IllegalArgumentException ignored) {} } return null; } /** * Function to know if a given filename matches one of the patterns and as * such, can have show and episode number extracted. * Uses searchString instead of filename if present. */ public static boolean isTvShow(String file, String searchString) { String filename = file; if (searchString != null && !searchString.isEmpty()) { filename = searchString; } for(Pattern regexp: patternsShowFirst) { Matcher m = regexp.matcher(filename); try { if(m.matches()) { return true; } } catch (IllegalArgumentException ignored) { } } if (ENABLE_PATTERNS_EPISODE_FIRST) for(Pattern regexp: patternsEpisodeFirst) { Matcher m = regexp.matcher(filename); try { if(m.matches()) return true; } catch (IllegalArgumentException ignored) {} } return false; } public static String urlEncode(String input) { String encode = ""; try { encode = URLEncoder.encode(input, "UTF-8"); } catch (UnsupportedEncodingException e1) { } return encode; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/StorageUtils.java ================================================ package com.theflexproject.thunder.utils; import android.Manifest; import android.app.Activity; import android.content.pm.PackageManager; import androidx.core.app.ActivityCompat; public class StorageUtils { private static final int REQUEST_EXTERNAL_STORAGE = 1; private static String[] PERMISSIONS_STORAGE = { Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE }; /** * Checks if the app has permission to write to device storage * * If the app does not has permission then the user will be prompted to grant permissions * * @param activity */ public static boolean verifyStoragePermissions(Activity activity) { // Check if we have write permission int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); if (permission != PackageManager.PERMISSION_GRANTED) { // We don't have permission so prompt the user ActivityCompat.requestPermissions( activity, PERMISSIONS_STORAGE, REQUEST_EXTERNAL_STORAGE ); return true; } return false; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/StringUtils.java ================================================ package com.theflexproject.thunder.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; public class StringUtils { public static String replaceAll(String input, String replacement, Pattern pattern) { return pattern.matcher(input).replaceAll(replacement); } public static String replaceAllChars(String input, char[] badChars, char newChar) { if (badChars == null || badChars.length == 0) return input; int inputLength = input.length(); int replacementLenght = badChars.length; boolean modified = false; char[] buffer = new char[inputLength]; input.getChars(0, inputLength, buffer, 0); for (int inputIdx = 0; inputIdx < inputLength; inputIdx++) { char current = buffer[inputIdx]; for (int replacementIdx = 0; replacementIdx < replacementLenght; replacementIdx++) { if (current == badChars[replacementIdx]) { buffer[inputIdx] = newChar; modified = true; break; } } } return modified ? new String(buffer) : input; } public static String runtimeIntegerToString(int runtime){ StringBuilder sb = new StringBuilder(); double f = (double)(runtime)/60; String hour = Integer.toString((int)(Math.floor(f))); String mins = Integer.toString(runtime%60); if(hour.equals("0")){ sb.append(mins).append("m"); }else { sb.append(hour).append("h ").append(mins).append("m"); } return sb.toString(); } private StringUtils() { } final public static Pattern TMDB_LINK_PATTERN_MOVIE = Pattern.compile("(.*)(themoviedb\\.org\\/movie\\/(\\d+))"); public static long tmdbIdExtractor_FromLink(String input) { long id = 0; System.out.println("input to change tmdb"+input); Matcher m = TMDB_LINK_PATTERN_MOVIE.matcher(input); if (m.matches()) { id = Long.parseLong(m.group(3)); System.out.println("input to change tmdb"+id); return id; } return id; } final public static Pattern TMDB_LINK_PATTERN_TV = Pattern.compile("(.*)(themoviedb\\.org\\/tv\\/(\\d+))"); public static long tmdbIdExtractor_FromLink_TV(String input) { long id = 0; System.out.println("input to change tmdb"+input); Matcher m = TMDB_LINK_PATTERN_TV.matcher(input); if (m.matches()) { id = Long.parseLong(m.group(3)); System.out.println("input to change tmdb"+input); return id; } return id; } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/UpdateUtils.java ================================================ package com.theflexproject.thunder.utils; import androidx.appcompat.app.AppCompatActivity; import com.theflexproject.thunder.R; import com.theflexproject.thunder.fragments.UpdateAppFragment; import com.theflexproject.thunder.model.GitHubResponse; import java.io.IOException; import java.util.concurrent.Executors; public class UpdateUtils { public static void checkForUpdates(AppCompatActivity appCompatActivity){ Executors.newSingleThreadExecutor().execute(new Runnable() { @Override public void run() { try { GitHubResponse[] gitHubResponses = new CheckForUpdates().checkForUpdates(); if (gitHubResponses != null) { UpdateAppFragment updateAppFragment = new UpdateAppFragment(gitHubResponses); appCompatActivity.getSupportFragmentManager().beginTransaction().add(R.id.container , updateAppFragment).addToBackStack(null).commit(); } } catch (IOException e) { e.printStackTrace(); } } }); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/downloadUtils.java ================================================ package com.theflexproject.thunder.utils; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.net.URL; import java.net.URLConnection; public class downloadUtils { private static void downloadFile(String url, File outputFile) { try { URL u = new URL(url); URLConnection conn = u.openConnection(); int contentLength = conn.getContentLength(); DataInputStream stream = new DataInputStream(u.openStream()); byte[] buffer = new byte[contentLength]; stream.readFully(buffer); stream.close(); DataOutputStream fos = new DataOutputStream(new FileOutputStream(outputFile)); fos.write(buffer); fos.flush(); fos.close(); } catch(FileNotFoundException e) { return; // swallow a 404 } catch (IOException e) { return; // swallow a 404 } } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/imageVotesComparator.java ================================================ package com.theflexproject.thunder.utils; import com.theflexproject.thunder.model.tmdbImages.Logo; import java.util.Comparator; public class imageVotesComparator implements Comparator { @Override public int compare(Logo o1 , Logo o2) { return o2.getVote_count() - o1.getVote_count(); } } ================================================ FILE: app/src/main/java/com/theflexproject/thunder/utils/sizetoReadablesize.java ================================================ package com.theflexproject.thunder.utils; import java.text.CharacterIterator; import java.text.StringCharacterIterator; public class sizetoReadablesize { public static String humanReadableByteCountBin(long bytes) { long absB = bytes == Long.MIN_VALUE ? Long.MAX_VALUE : Math.abs(bytes); if (absB < 1024) { return bytes + " B"; } long value = absB; CharacterIterator ci = new StringCharacterIterator("KMGTPE"); for (int i = 40; i >= 0 && absB > 0xfffccccccccccccL >> i; i -= 10) { value >>= 10; ci.next(); } value *= Long.signum(bytes); return String.format("%.1f %cB", value / 1024.0, ci.current()); } } ================================================ FILE: app/src/main/res/anim/fade_in.xml ================================================ ================================================ FILE: app/src/main/res/anim/fade_out.xml ================================================ ================================================ FILE: app/src/main/res/anim/from_left.xml ================================================ ================================================ FILE: app/src/main/res/anim/from_right.xml ================================================ ================================================ FILE: app/src/main/res/anim/pop_in.xml ================================================ ================================================ FILE: app/src/main/res/anim/to_left.xml ================================================ ================================================ FILE: app/src/main/res/anim/to_right.xml ================================================ ================================================ FILE: app/src/main/res/color/about_item_bg_color.xml ================================================ ================================================ FILE: app/src/main/res/color/button_text_color.xml ================================================ ================================================ FILE: app/src/main/res/color/delete_button_color.xml ================================================ ================================================ FILE: app/src/main/res/color/download_button_bg_color.xml ================================================ ================================================ FILE: app/src/main/res/color/episode_item_bg_color.xml ================================================ ================================================ FILE: app/src/main/res/color/media_item_bg_color.xml ================================================ ================================================ FILE: app/src/main/res/color/switch_bg_color.xml ================================================ ================================================ FILE: app/src/main/res/drawable/bottom_navigation_background.xml ================================================ ================================================ FILE: app/src/main/res/drawable/bottom_navigation_color_selector.xml ================================================ ================================================ FILE: app/src/main/res/drawable/bottom_navigation_item_background.xml ================================================ ================================================ FILE: app/src/main/res/drawable/discord.xml ================================================ ================================================ FILE: app/src/main/res/drawable/gradient_top_bottom_bg.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_add.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_add_box.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_change.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_delete.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_download.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_edit.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_export.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_github.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_home.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_import.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_import_export.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_info.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_library.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_list.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_next.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_play.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_play_rounded.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_refresh.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_search.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_settings.xml ================================================ ================================================ FILE: app/src/main/res/drawable/ic_update.xml ================================================ ================================================ FILE: app/src/main/res/drawable/index_link_bg.xml ================================================ ================================================ FILE: app/src/main/res/drawable/media_item_selector.xml ================================================ ================================================ FILE: app/src/main/res/drawable/oval.xml ================================================ ================================================ FILE: app/src/main/res/drawable/play_shape.xml ================================================ ================================================ FILE: app/src/main/res/drawable/rounded_controls_background.xml ================================================ ================================================ FILE: app/src/main/res/drawable/rounded_corner_labels.xml ================================================ ================================================ FILE: app/src/main/res/drawable/search_bg.xml ================================================ ================================================ FILE: app/src/main/res/drawable/splash_background.xml ================================================ ================================================ FILE: app/src/main/res/drawable/splash_bg_gradient.xml ================================================ ================================================ FILE: app/src/main/res/drawable/switch_ios_selector.xml ================================================ ================================================ FILE: app/src/main/res/drawable/switch_ios_track.xml ================================================ ================================================ FILE: app/src/main/res/drawable/tab_indicator_bg.xml ================================================ ================================================ FILE: app/src/main/res/drawable/tab_item_selector.xml ================================================ ================================================ FILE: app/src/main/res/drawable/tab_layout_bg.xml ================================================ ================================================ FILE: app/src/main/res/drawable/tabs_selector.xml ================================================ ================================================ FILE: app/src/main/res/drawable/telegram.xml ================================================ ================================================ FILE: app/src/main/res/drawable/tmdb.xml ================================================ ================================================ FILE: app/src/main/res/layout/activity_main.xml ================================================ ================================================ FILE: app/src/main/res/layout/activity_player.xml ================================================ ================================================ FILE: app/src/main/res/layout/dialog_filename_item.xml ================================================ ================================================ FILE: app/src/main/res/layout/dropdown_item.xml ================================================ ================================================ FILE: app/src/main/res/layout/episode_item.xml ================================================ ================================================ FILE: app/src/main/res/layout/file_item.xml ================================================ ================================================ FILE: app/src/main/res/layout/fragment_add_index.xml ================================================