├── baselineprofile
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
└── build.gradle
├── app
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── theupnextapp
│ │ │ │ ├── domain
│ │ │ │ ├── LibraryList.kt
│ │ │ │ ├── TraktConnectionArg.kt
│ │ │ │ ├── ErrorResponse.kt
│ │ │ │ ├── TraktUserSettings.kt
│ │ │ │ ├── TraktUserList.kt
│ │ │ │ ├── TableUpdate.kt
│ │ │ │ ├── TraktShowRating.kt
│ │ │ │ ├── TraktCheckInStatus.kt
│ │ │ │ ├── ShowSeasonEpisodesArg.kt
│ │ │ │ ├── TraktShowStats.kt
│ │ │ │ ├── ShowDetailArg.kt
│ │ │ │ ├── TraktUserListItem.kt
│ │ │ │ ├── ShowSeasonEpisode.kt
│ │ │ │ ├── ShowNextEpisode.kt
│ │ │ │ ├── ShowPreviousEpisode.kt
│ │ │ │ ├── ShowCast.kt
│ │ │ │ └── TraktAccessToken.kt
│ │ │ │ ├── extensions
│ │ │ │ ├── Event.kt
│ │ │ │ ├── Context.kt
│ │ │ │ └── ReferenceDevices.kt
│ │ │ │ ├── common
│ │ │ │ ├── utils
│ │ │ │ │ ├── BottomSheetUtil.kt
│ │ │ │ │ ├── FeedbackComponent.kt
│ │ │ │ │ ├── UpnextGlideModule.kt
│ │ │ │ │ ├── NetworkConnectivityUtil.kt
│ │ │ │ │ ├── customTab
│ │ │ │ │ │ ├── TabConnectionCallback.kt
│ │ │ │ │ │ ├── CustomTabFallback.kt
│ │ │ │ │ │ ├── TabServiceConnectionCallback.kt
│ │ │ │ │ │ └── TabServiceConnection.kt
│ │ │ │ │ ├── models
│ │ │ │ │ │ ├── TableUpdateInterval.kt
│ │ │ │ │ │ ├── DatabaseTables.kt
│ │ │ │ │ │ └── ShowSearchUtil.kt
│ │ │ │ │ ├── WindowSizeClassUtil.kt
│ │ │ │ │ ├── TraktConnectionInterceptor.kt
│ │ │ │ │ └── UpnextPreferenceManager.kt
│ │ │ │ ├── AppCrashlyticsHelper.kt
│ │ │ │ └── CrashlyticsHelper.kt
│ │ │ │ ├── network
│ │ │ │ └── models
│ │ │ │ │ ├── upnext
│ │ │ │ │ └── NetworkShowData.kt
│ │ │ │ │ ├── tvmaze
│ │ │ │ │ ├── NetworkTvMazeShowImageOriginal.kt
│ │ │ │ │ ├── NetworkTvMazeShowImageResolutions.kt
│ │ │ │ │ ├── NetworkYesterdayScheduleResponse.kt
│ │ │ │ │ ├── NetworkTvMazeShowImageMedium.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupSelf.kt
│ │ │ │ │ ├── NetworkTomorrowScheduleResponse.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupRating.kt
│ │ │ │ │ ├── NetworkTodayScheduleResponse.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupPreviousepisode.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupImage.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupSchedule.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupCountry.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupCountryX.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupExternals.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupNetwork.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupWebChannel.kt
│ │ │ │ │ ├── NetworkTvMazeShowLookupLinks.kt
│ │ │ │ │ ├── NetworkTvMazeShowImageResponse.kt
│ │ │ │ │ └── NetworkTvMazeShowLookupResponse.kt
│ │ │ │ │ └── trakt
│ │ │ │ │ ├── NetworkTraktRevokeAccessTokenResponse.kt
│ │ │ │ │ ├── NetworkTraktRevokeAccessTokenRequest.kt
│ │ │ │ │ ├── NetworkTraktAccessTokenRequest.kt
│ │ │ │ │ ├── TraktErrorResponse.kt
│ │ │ │ │ ├── NetworkTraktAccessRefreshTokenRequest.kt
│ │ │ │ │ ├── NetworkTraktAddShowToListRequest.kt
│ │ │ │ │ ├── NetworkTraktShowInfoResponse.kt
│ │ │ │ │ ├── NetworkTraktRemoveShowFromListRequest.kt
│ │ │ │ │ ├── NetworkTraktCreateCustomListRequest.kt
│ │ │ │ │ ├── NetworkTraktShowRatingResponse.kt
│ │ │ │ │ ├── NetworkTraktIdLookupResponse.kt
│ │ │ │ │ ├── NetworkTraktCreateCustomListResponse.kt
│ │ │ │ │ ├── NetworkTraktShowStatsResponse.kt
│ │ │ │ │ ├── NetworkTraktAddShowToListResponse.kt
│ │ │ │ │ ├── NetworkTraktCheckInRequest.kt
│ │ │ │ │ └── NetworkTraktUserListsResponse.kt
│ │ │ │ ├── di
│ │ │ │ ├── AppModule.kt
│ │ │ │ ├── CustomTabModule.kt
│ │ │ │ ├── AppCrashlyticsHelper.kt
│ │ │ │ ├── WorkModule.kt
│ │ │ │ ├── FirebaseAnalyticsModule.kt
│ │ │ │ └── FirebaseCrashlyticsModule.kt
│ │ │ │ ├── ui
│ │ │ │ ├── showDetail
│ │ │ │ │ ├── ShowDetailButtons.kt
│ │ │ │ │ ├── ShowDetailFetchException.kt
│ │ │ │ │ └── ShowSynopsis.kt
│ │ │ │ ├── theme
│ │ │ │ │ ├── Color.kt
│ │ │ │ │ └── Type.kt
│ │ │ │ └── traktAccount
│ │ │ │ │ ├── TraktAccountUiState.kt
│ │ │ │ │ ├── TraktConnectionError.kt
│ │ │ │ │ └── TraktProfileHeader.kt
│ │ │ │ └── database
│ │ │ │ ├── DatabaseTodaySchedule.kt
│ │ │ │ ├── DatabaseTomorrowSchedule.kt
│ │ │ │ ├── DatabaseYesterdaySchedule.kt
│ │ │ │ ├── DatabaseTableUpdate.kt
│ │ │ │ ├── DatabaseTraktAccess.kt
│ │ │ │ ├── UpnextDatabase.kt
│ │ │ │ └── UpnextDao.kt
│ │ ├── ic_launcher-playstore.png
│ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-hdpi
│ │ │ └── ic_stat_name.png
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_stat_name.png
│ │ │ ├── drawable-xhdpi
│ │ │ └── ic_stat_name.png
│ │ │ ├── drawable
│ │ │ ├── poster_placeholder.png
│ │ │ ├── backdrop_background.png
│ │ │ ├── upnext_logo_512x512.png
│ │ │ ├── loading_list_placeholder.png
│ │ │ ├── gradient_backdrop_bottom.xml
│ │ │ ├── show_season_trakt_watched_tag_border.xml
│ │ │ ├── show_season_trakt_collected_tag_border.xml
│ │ │ ├── ic_home_black_24dp.xml
│ │ │ ├── ic_check_circle_white_24dp.xml
│ │ │ ├── ic_baseline_chevron_right_24.xml
│ │ │ ├── ic_baseline_playlist_add_24.xml
│ │ │ ├── ic_baseline_playlist_add_check_24.xml
│ │ │ ├── ic_video_library_white_24dp.xml
│ │ │ ├── ic_baseline_arrow_circle_down_24.xml
│ │ │ ├── ic_baseline_library_add_24.xml
│ │ │ ├── ic_baseline_queue_play_next_24.xml
│ │ │ ├── ic_baseline_more_vert_24.xml
│ │ │ ├── ic_baseline_library_books_24.xml
│ │ │ ├── ic_baseline_library_add_check_24.xml
│ │ │ ├── ic_baseline_explore_24.xml
│ │ │ ├── ic_search_black_24dp.xml
│ │ │ ├── ic_baseline_account_circle_24.xml
│ │ │ ├── ic_history_white_24dp.xml
│ │ │ ├── ic_baseline_public_24.xml
│ │ │ └── ic_baseline_settings_24.xml
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── ic_stat_name.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ └── ic_stat_name.png
│ │ │ ├── values
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── preloaded_fonts.xml
│ │ │ ├── attrs.xml
│ │ │ ├── arrays.xml
│ │ │ ├── motion.xml
│ │ │ └── shape.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── font
│ │ │ ├── open_sans.xml
│ │ │ ├── open_sans_extrabold.xml
│ │ │ └── open_sans_semibold.xml
│ │ │ ├── anim
│ │ │ ├── slide_in_left.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_left.xml
│ │ │ ├── slide_out_right.xml
│ │ │ ├── bottom_sheet_slide_out.xml
│ │ │ └── bottom_sheet_slide_in.xml
│ │ │ ├── xml
│ │ │ ├── network_security_config.xml
│ │ │ └── root_preferences.xml
│ │ │ ├── color
│ │ │ └── bottom_navigation_state_colors.xml
│ │ │ ├── menu
│ │ │ └── main.xml
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ └── values-night
│ │ │ └── themes.xml
│ ├── debug
│ │ ├── ic_launcher-playstore.png
│ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_round.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── values
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ └── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── theupnextapp
│ │ │ └── CustomTestRunner.kt
│ └── test
│ │ └── java
│ │ └── com
│ │ └── theupnextapp
│ │ ├── repository
│ │ ├── ConcreteTestRepository.kt
│ │ └── fakes
│ │ │ └── FakeCrashlytics.kt
│ │ └── CoroutineTestRule.kt
└── .gitignore
├── screenshots
├── summary.png
├── upnext_java_setup.png
├── upnext_pre_compose.gif
├── web_banner_20_feb_2022.png
└── dashboard_loading_screen_recording_20240429_213938.gif
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── renovate.json
├── settings.gradle
├── .github
└── ISSUE_TEMPLATE
│ ├── dependency_update.md
│ ├── feature_request.md
│ └── bug_report.md
├── local.properties.example
├── .gitignore
├── LICENSE
└── gradle.properties
/baselineprofile/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/LibraryList.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/extensions/Event.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/baselineprofile/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /release
3 | google-services.json
4 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TraktConnectionArg.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/BottomSheetUtil.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/FeedbackComponent.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/UpnextGlideModule.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/NetworkConnectivityUtil.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/upnext/NetworkShowData.kt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/screenshots/summary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/screenshots/summary.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/screenshots/upnext_java_setup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/screenshots/upnext_java_setup.png
--------------------------------------------------------------------------------
/screenshots/upnext_pre_compose.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/screenshots/upnext_pre_compose.gif
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/screenshots/web_banner_20_feb_2022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/screenshots/web_banner_20_feb_2022.png
--------------------------------------------------------------------------------
/app/src/debug/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable-hdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable-mdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable-xhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/poster_placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable/poster_placeholder.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": [
4 | "config:base"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable-xxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/backdrop_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable/backdrop_background.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/upnext_logo_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable/upnext_logo_512x512.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/loading_list_placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/drawable/loading_list_placeholder.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/screenshots/dashboard_loading_screen_recording_20240429_213938.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akitikkx/upnext/HEAD/screenshots/dashboard_loading_screen_recording_20240429_213938.gif
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowImageOriginal.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.network.models.tvmaze
2 |
3 | data class NetworkTvMazeShowImageOriginal(
4 | val url: String,
5 | val height: Int? = null,
6 | val width: Int? = null,
7 | )
8 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/preloaded_fonts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @font/open_sans
5 | - @font/open_sans_extrabold
6 | - @font/open_sans_semibold
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowImageResolutions.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.network.models.tvmaze
2 |
3 | data class NetworkTvMazeShowImageResolutions(
4 | val original: NetworkTvMazeShowImageOriginal,
5 | val medium: NetworkTvMazeShowImageMedium?, // Making it nullable to be safe
6 | )
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gradient_backdrop_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/show_season_trakt_watched_tag_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/show_season_trakt_collected_tag_border.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_home_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/font/open_sans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/open_sans_extrabold.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/open_sans_semibold.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | gradlePluginPortal()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 |
16 | include ':app'
17 | rootProject.name='Upnext'
18 | include ':baselineprofile'
19 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/dependency_update.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Dependency update(s)
3 | about: Updating of app dependencies
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **List all the dependencies updated stating the previous and new version in the table below.**
11 | | Dependency | Previous version | New version |
12 | | ---------- | ---------------- | ----------- |
13 | | Dependency | x.x.x | x.x.x |
14 |
15 | **Any other changes**
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_check_circle_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_chevron_right_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_playlist_add_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/local.properties.example:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | # For customization when using a Version Control System, please read the
6 | # header note.
7 | #Wed Nov 04 19:57:53 SAST 2020
8 |
9 | sdk.dir=path/to/Android/SDK
10 | TraktClientID=""
11 | TraktClientSecret=""
12 | TraktRedirectURI="theupnextapp://callback"
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_playlist_add_check_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/di/AppModule.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.di
2 |
3 | import com.theupnextapp.common.AppCrashlyticsHelper
4 | import com.theupnextapp.common.CrashlyticsHelper
5 | import dagger.Binds
6 | import dagger.Module
7 | import dagger.hilt.InstallIn
8 | import dagger.hilt.components.SingletonComponent
9 |
10 | @Module
11 | @InstallIn(SingletonComponent::class)
12 | abstract class AppModule {
13 | @Binds
14 | abstract fun bindCrashlyticsHelper(appCrashlyticsHelper: AppCrashlyticsHelper): CrashlyticsHelper
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/AppCrashlyticsHelper.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.common
2 |
3 | import com.google.firebase.crashlytics.FirebaseCrashlytics
4 | import javax.inject.Inject
5 |
6 | class AppCrashlyticsHelper
7 | @Inject
8 | constructor() : CrashlyticsHelper {
9 | override fun log(message: String) {
10 | FirebaseCrashlytics.getInstance().log(message)
11 | }
12 |
13 | override fun recordException(e: Throwable) {
14 | FirebaseCrashlytics.getInstance().recordException(e)
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_video_library_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_arrow_circle_down_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_library_add_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_queue_play_next_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_more_vert_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #built application files
2 | *.apk
3 | *.ap_
4 |
5 | # files for the dex VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # generated files
12 | bin/
13 | gen/
14 |
15 | # Local configuration file (sdk path, etc)
16 | local.properties
17 |
18 | # Windows thumbnail db
19 | Thumbs.db
20 |
21 | # OSX files
22 | .DS_Store
23 |
24 | # Eclipse project files
25 | .classpath
26 | .project
27 |
28 | # Android Studio
29 | *.iml
30 | .idea
31 | #.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
32 | .gradle
33 | build/
34 | signing.properties
35 |
36 | .kotlin
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_library_books_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_library_add_check_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_explore_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_search_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_account_circle_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_history_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_public_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Ahmed Tikiwa
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/ui/showDetail/ShowDetailButtons.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.ui.showDetail
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_settings_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx4g
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
22 | org.gradle.unsafe.configuration-cache=true
23 | org.gradle.caching=true
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/CrashlyticsHelper.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.common
14 |
15 | interface CrashlyticsHelper {
16 | fun log(message: String)
17 |
18 | fun recordException(e: Throwable)
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/ErrorResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class ErrorResponse(
25 | val message: String,
26 | )
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TraktUserSettings.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class TraktUserSettings(
25 | val slug: String?,
26 | )
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkYesterdayScheduleResponse.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.network.models.tvmaze
2 |
3 | import com.theupnextapp.database.DatabaseYesterdaySchedule
4 |
5 | data class NetworkYesterdayScheduleResponse(
6 | val _links: NetworkShowEpisodeLinks,
7 | val airdate: String,
8 | val airstamp: String,
9 | val airtime: String,
10 | val id: Int,
11 | val image: NetworkScheduleImage?,
12 | val name: String,
13 | val number: Int,
14 | val runtime: Int,
15 | val season: Int,
16 | val show: NetworkScheduleShow,
17 | val summary: String,
18 | val url: String,
19 | )
20 |
21 | fun NetworkYesterdayScheduleResponse.asDatabaseModel(): DatabaseYesterdaySchedule {
22 | return DatabaseYesterdaySchedule(
23 | id = this.id,
24 | showId = this.show.id,
25 | image = this.show.image?.original,
26 | mediumImage = this.show.image?.medium,
27 | language = this.show.language,
28 | name = this.name,
29 | officialSite = this.show.officialSite,
30 | premiered = this.show.premiered,
31 | runtime = this.show.runtime.toString(),
32 | status = this.show.status,
33 | summary = this.summary,
34 | type = this.show.type,
35 | updated = this.show.updated.toString(),
36 | url = this.url,
37 | )
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TraktUserList.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class TraktUserList(
25 | val traktId: Int?,
26 | val slug: String?,
27 | )
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktRevokeAccessTokenResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | class NetworkTraktRevokeAccessTokenResponse
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowImageMedium.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.network.models.tvmaze
14 |
15 | data class NetworkTvMazeShowImageMedium(
16 | val url: String,
17 | val height: Int? = null,
18 | val width: Int? = null,
19 | )
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TableUpdate.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class TableUpdate(
25 | val id: Long,
26 | val tableName: String,
27 | val lastUpdated: Long,
28 | )
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupSelf.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupSelf(
25 | val href: String,
26 | )
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTomorrowScheduleResponse.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.network.models.tvmaze
2 |
3 | import com.theupnextapp.database.DatabaseTomorrowSchedule
4 |
5 | data class NetworkTomorrowScheduleResponse(
6 | val _links: NetworkShowEpisodeLinks,
7 | val airdate: String,
8 | val airstamp: String,
9 | val airtime: String,
10 | val id: Int,
11 | val image: NetworkScheduleImage?,
12 | val name: String,
13 | val number: Int,
14 | val runtime: Int,
15 | val season: Int,
16 | val show: NetworkScheduleShow,
17 | val summary: String,
18 | val url: String,
19 | )
20 |
21 | // Extension function to map to Database model
22 | fun NetworkTomorrowScheduleResponse.asDatabaseModel(): DatabaseTomorrowSchedule {
23 | return DatabaseTomorrowSchedule(
24 | id = this.id,
25 | showId = this.show.id,
26 | image = this.show.image?.original,
27 | mediumImage = this.show.image?.medium,
28 | language = this.show.language,
29 | name = this.name,
30 | officialSite = this.show.officialSite,
31 | premiered = this.show.premiered,
32 | runtime = this.show.runtime.toString(),
33 | status = this.show.status,
34 | summary = this.summary,
35 | type = this.show.type,
36 | updated = this.show.updated.toString(),
37 | url = this.url,
38 | )
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupRating.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupRating(
25 | val average: Double,
26 | )
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/database/DatabaseTodaySchedule.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.database
2 |
3 | import androidx.room.Entity
4 | import androidx.room.PrimaryKey
5 | import com.theupnextapp.domain.ScheduleShow
6 |
7 | @Entity(tableName = "schedule_today")
8 | data class DatabaseTodaySchedule(
9 | @PrimaryKey
10 | val id: Int,
11 | val showId: Int?,
12 | val image: String?,
13 | val mediumImage: String?,
14 | val language: String?,
15 | val name: String?,
16 | val officialSite: String?,
17 | val premiered: String?,
18 | val runtime: String?,
19 | val status: String?,
20 | val summary: String?,
21 | val type: String?,
22 | val updated: String?,
23 | val url: String?,
24 | )
25 |
26 | fun List.asDomainModel(): List {
27 | return map {
28 | ScheduleShow(
29 | id = it.id,
30 | showId = it.showId,
31 | originalImage = it.image,
32 | mediumImage = it.mediumImage,
33 | language = it.language,
34 | name = it.name,
35 | officialSite = it.officialSite,
36 | premiered = it.premiered,
37 | runtime = it.runtime,
38 | status = it.status,
39 | summary = it.summary,
40 | type = it.type,
41 | updated = it.updated,
42 | url = it.url,
43 | )
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TraktShowRating.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class TraktShowRating(
25 | val rating: Int?,
26 | val votes: Int?,
27 | val distribution: HashMap?,
28 | )
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTodayScheduleResponse.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.network.models.tvmaze
2 |
3 | import com.theupnextapp.database.DatabaseTodaySchedule
4 |
5 | data class NetworkTodayScheduleResponse(
6 | val _links: NetworkShowEpisodeLinks,
7 | val airdate: String,
8 | val airstamp: String,
9 | val airtime: String,
10 | val id: Int,
11 | val image: NetworkScheduleImage?,
12 | val name: String,
13 | val number: Int,
14 | val runtime: Int,
15 | val season: Int,
16 | val show: NetworkScheduleShow,
17 | val summary: String,
18 | val url: String,
19 | val imdbId: String?,
20 | )
21 |
22 | // Extension function to map to Database model
23 | fun NetworkTodayScheduleResponse.asDatabaseModel(): DatabaseTodaySchedule {
24 | return DatabaseTodaySchedule(
25 | id = this.id,
26 | showId = this.show.id,
27 | image = this.show.image?.original,
28 | mediumImage = this.show.image?.medium,
29 | language = this.show.language,
30 | name = this.name,
31 | officialSite = this.show.officialSite,
32 | premiered = this.show.premiered,
33 | runtime = this.show.runtime.toString(),
34 | status = this.show.status,
35 | summary = this.summary,
36 | type = this.show.type,
37 | updated = this.show.updated.toString(),
38 | url = this.url,
39 | )
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupPreviousepisode.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupPreviousepisode(
25 | val href: String,
26 | )
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/customTab/TabConnectionCallback.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils.customTab
23 |
24 | interface TabConnectionCallback {
25 | fun onTabConnected()
26 |
27 | fun onTabDisconnected()
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupImage.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupImage(
25 | val medium: String,
26 | val original: String,
27 | )
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupSchedule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupSchedule(
25 | val days: List,
26 | val time: String,
27 | )
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupCountry.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupCountry(
25 | val code: String,
26 | val name: String,
27 | val timezone: String,
28 | )
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupCountryX.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupCountryX(
25 | val code: String,
26 | val name: String,
27 | val timezone: String,
28 | )
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupExternals.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupExternals(
25 | val imdb: String,
26 | val thetvdb: Int,
27 | val tvrage: Int,
28 | )
29 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TraktCheckInStatus.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class TraktCheckInStatus(
25 | val season: Int? = null,
26 | val episode: Int? = null,
27 | val checkInTime: String? = null,
28 | val message: String? = null,
29 | )
30 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/ShowSeasonEpisodesArg.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class ShowSeasonEpisodesArg(
25 | val showId: Int?,
26 | val seasonNumber: Int?,
27 | val imdbID: String? = null,
28 | val isAuthorizedOnTrakt: Boolean? = false,
29 | )
30 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktRevokeAccessTokenRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktRevokeAccessTokenRequest(
25 | val client_id: String,
26 | val client_secret: String,
27 | val token: String,
28 | )
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupNetwork.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupNetwork(
25 | val country: NetworkTvMazeShowLookupCountry,
26 | val id: Int,
27 | val name: String,
28 | )
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/ui/theme/Color.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.ui.theme
14 |
15 | import androidx.compose.ui.graphics.Color
16 |
17 | val Teal500 = Color(0xFF009688)
18 | val Purple500 = Color(0xFF6200EE)
19 | val Teal600 = Color(0xFF00897B)
20 |
21 | val Teal200 = Color(0xFF80CBC4)
22 | val Purple200 = Color(0xFFBB86FC)
23 | val Teal700 = Color(0xFF00796B)
24 |
--------------------------------------------------------------------------------
/app/src/main/res/color/bottom_navigation_state_colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupWebChannel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupWebChannel(
25 | val country: NetworkTvMazeShowLookupCountryX,
26 | val id: Int,
27 | val name: String,
28 | )
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupLinks.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupLinks(
25 | val previousepisode: NetworkTvMazeShowLookupPreviousepisode,
26 | val self: NetworkTvMazeShowLookupSelf,
27 | )
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/database/DatabaseTomorrowSchedule.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.database
2 |
3 | import androidx.room.Entity
4 | import androidx.room.PrimaryKey
5 | import com.theupnextapp.domain.ScheduleShow
6 |
7 | @Entity(tableName = "schedule_tomorrow")
8 | data class DatabaseTomorrowSchedule(
9 | @PrimaryKey
10 | val id: Int, // This is the episode ID
11 | val showId: Int?, // This is the actual Show ID
12 | var image: String?,
13 | var mediumImage: String?,
14 | val language: String?,
15 | val name: String?,
16 | val officialSite: String?,
17 | val premiered: String?,
18 | val runtime: String?,
19 | val status: String?,
20 | val summary: String?,
21 | val type: String?,
22 | val updated: String?,
23 | val url: String?,
24 | )
25 |
26 | fun List.asDomainModel(): List {
27 | return map {
28 | ScheduleShow(
29 | id = it.id,
30 | showId = it.showId, // Added mapping
31 | originalImage = it.image,
32 | mediumImage = it.mediumImage,
33 | language = it.language,
34 | name = it.name,
35 | officialSite = it.officialSite,
36 | premiered = it.premiered,
37 | runtime = it.runtime,
38 | status = it.status,
39 | summary = it.summary,
40 | type = it.type,
41 | updated = it.updated,
42 | url = it.url,
43 | )
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/database/DatabaseYesterdaySchedule.kt:
--------------------------------------------------------------------------------
1 | package com.theupnextapp.database
2 |
3 | import androidx.room.Entity
4 | import androidx.room.PrimaryKey
5 | import com.theupnextapp.domain.ScheduleShow
6 |
7 | @Entity(tableName = "schedule_yesterday")
8 | data class DatabaseYesterdaySchedule(
9 | @PrimaryKey
10 | val id: Int, // This is the episode ID
11 | val showId: Int?, // This is the actual Show ID
12 | val image: String?,
13 | val mediumImage: String?,
14 | val language: String?,
15 | val name: String?,
16 | val officialSite: String?,
17 | val premiered: String?,
18 | val runtime: String?,
19 | val status: String?,
20 | val summary: String?,
21 | val type: String?,
22 | val updated: String?,
23 | val url: String?,
24 | )
25 |
26 | fun List.asDomainModel(): List {
27 | return map {
28 | ScheduleShow(
29 | id = it.id,
30 | showId = it.showId, // Added mapping
31 | originalImage = it.image,
32 | mediumImage = it.mediumImage,
33 | language = it.language,
34 | name = it.name,
35 | officialSite = it.officialSite,
36 | premiered = it.premiered,
37 | runtime = it.runtime,
38 | status = it.status,
39 | summary = it.summary,
40 | type = it.type,
41 | updated = it.updated,
42 | url = it.url,
43 | )
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/customTab/CustomTabFallback.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils.customTab
23 |
24 | import android.app.Activity
25 | import android.net.Uri
26 |
27 | interface CustomTabFallback {
28 | fun openUri(
29 | activity: Activity,
30 | uri: Uri,
31 | )
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/ui/traktAccount/TraktAccountUiState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.ui.traktAccount
14 |
15 | data class TraktAccountUiState(
16 | val openCustomTab: Boolean = false,
17 | val confirmDisconnectFromTrakt: Boolean = false,
18 | val isDisconnecting: Boolean = false,
19 | val connectionError: String? = null,
20 | val disconnectionError: String? = null,
21 | )
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TraktShowStats.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class TraktShowStats(
25 | val collected_episodes: Int?,
26 | val collectors: Int?,
27 | val comments: Int?,
28 | val lists: Int?,
29 | val plays: Int?,
30 | val votes: Int?,
31 | val watchers: Int?,
32 | )
33 |
--------------------------------------------------------------------------------
/baselineprofile/build.gradle:
--------------------------------------------------------------------------------
1 | import com.android.build.api.dsl.ManagedVirtualDevice
2 |
3 | plugins {
4 | alias(libs.plugins.android.test)
5 | alias(libs.plugins.kotlin.android)
6 | alias(libs.plugins.baseline.profiles)
7 | }
8 |
9 | android {
10 | namespace 'com.theupnextapp.baselineprofile'
11 | compileSdk 34
12 |
13 | compileOptions {
14 | sourceCompatibility = JavaVersion.VERSION_17
15 | targetCompatibility = JavaVersion.VERSION_17
16 | }
17 |
18 | kotlinOptions {
19 | jvmTarget = JavaVersion.VERSION_17
20 | }
21 |
22 | defaultConfig {
23 | minSdk 24
24 | targetSdk 34
25 |
26 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
27 | }
28 |
29 | targetProjectPath = ":app"
30 |
31 | testOptions.managedDevices.devices {
32 | pixel6Api34(ManagedVirtualDevice) {
33 | device = "Pixel 6"
34 | apiLevel = 34
35 | systemImageSource = "aosp"
36 | }
37 | }
38 | }
39 |
40 | // This is the configuration block for the Baseline Profile plugin.
41 | // You can specify to run the generators on a managed devices or connected devices.
42 | baselineProfile {
43 | managedDevices += "pixel6Api34"
44 | useConnectedDevices = false
45 | }
46 |
47 | dependencies {
48 | implementation(libs.androidx.test.ext.junit)
49 | implementation(libs.androidx.test.uiautomator)
50 | implementation(libs.androidx.benchmark.macrobenchmark.junit4)
51 | implementation(libs.espresso.core)
52 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/ui/traktAccount/TraktConnectionError.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.ui.traktAccount
14 |
15 | enum class TraktConnectionError(val message: String) {
16 | TOKEN_EXCHANGE_FAILED("Failed to connect to Trakt. Please try authorizing again."),
17 | INVALID_AUTH_CODE("Invalid authorization code received."),
18 | DISCONNECT_FAILED("Failed to disconnect from Trakt. Please try again."),
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktAccessTokenRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktAccessTokenRequest(
25 | val code: String?,
26 | val client_id: String?,
27 | val client_secret: String?,
28 | val redirect_uri: String?,
29 | val grant_type: String?,
30 | )
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/customTab/TabServiceConnectionCallback.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils.customTab
23 |
24 | import androidx.browser.customtabs.CustomTabsClient
25 |
26 | interface TabServiceConnectionCallback {
27 | fun onTabServiceConnected(client: CustomTabsClient)
28 |
29 | fun onTabServiceDisconnected()
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/TraktErrorResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.network.models.trakt
14 |
15 | import com.squareup.moshi.Json
16 | import com.squareup.moshi.JsonClass
17 |
18 | @JsonClass(generateAdapter = true)
19 | data class TraktErrorResponse(
20 | @Json(name = "error")
21 | val error: String?,
22 | @Json(name = "error_description")
23 | val errorDescription: String?,
24 | )
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/extensions/Context.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.extensions
14 |
15 | import android.content.Context
16 | import android.content.ContextWrapper
17 | import androidx.appcompat.app.AppCompatActivity
18 |
19 | fun Context.getActivity(): AppCompatActivity? =
20 | when (this) {
21 | is AppCompatActivity -> this
22 | is ContextWrapper -> baseContext.getActivity()
23 | else -> null
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktAccessRefreshTokenRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktAccessRefreshTokenRequest(
25 | val refresh_token: String?,
26 | val client_id: String?,
27 | val client_secret: String?,
28 | val redirect_uri: String?,
29 | val grant_type: String?,
30 | )
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/ShowDetailArg.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class ShowDetailArg(
25 | val source: String? = null,
26 | val showId: String?,
27 | val showTitle: String?,
28 | val showImageUrl: String?,
29 | val showBackgroundUrl: String?,
30 | val imdbID: String? = null,
31 | val isAuthorizedOnTrakt: Boolean? = false,
32 | )
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/models/TableUpdateInterval.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils.models
23 |
24 | enum class TableUpdateInterval(val intervalMins: Long, val intervalHours: Long) {
25 | DASHBOARD_ITEMS(240, 4),
26 | TRAKT_POPULAR_ITEMS(120, 0),
27 | TRAKT_TRENDING_ITEMS(120, 2),
28 | TRAKT_MOST_ANTICIPATED_ITEMS(120, 2),
29 | TRAKT_FAVORITE_SHOWS(120, 2),
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/bottom_sheet_slide_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
26 |
27 |
30 |
31 |
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowImageResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | class NetworkTvMazeShowImageResponse : ArrayList()
25 |
26 | data class NetworkTvMazeShowImageResponseItem(
27 | val id: Int,
28 | val main: Boolean,
29 | val resolutions: NetworkTvMazeShowImageResolutions,
30 | val type: String,
31 | )
32 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/bottom_sheet_slide_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
26 |
27 |
30 |
31 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
21 |
22 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TraktUserListItem.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class TraktUserListItem(
25 | val id: Int?,
26 | val title: String?,
27 | val year: String?,
28 | val mediumImageUrl: String?,
29 | val originalImageUrl: String?,
30 | val imdbID: String?,
31 | val slug: String?,
32 | val tmdbID: Int?,
33 | val traktID: Int?,
34 | val tvdbID: Int?,
35 | val tvMazeID: Int?,
36 | )
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktAddShowToListRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktAddShowToListRequest(
25 | val shows: List,
26 | )
27 |
28 | data class NetworkTraktAddShowToListRequestShow(
29 | val ids: NetworkTraktAddShowToListRequestShowIds,
30 | )
31 |
32 | data class NetworkTraktAddShowToListRequestShowIds(
33 | val trakt: Int,
34 | )
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktShowInfoResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktShowInfoResponse(
25 | val ids: NetworkTraktShowInfoResponseIds?,
26 | val title: String?,
27 | val year: Int?,
28 | )
29 |
30 | data class NetworkTraktShowInfoResponseIds(
31 | val imdb: String?,
32 | val slug: String?,
33 | val tmdb: Int?,
34 | val trakt: Int?,
35 | val tvdb: Int?,
36 | )
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktRemoveShowFromListRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktRemoveShowFromListRequest(
25 | val shows: List,
26 | )
27 |
28 | data class NetworkTraktRemoveShowFromListRequestShow(
29 | val ids: NetworkTraktRemoveShowFromListRequestShowIds,
30 | )
31 |
32 | data class NetworkTraktRemoveShowFromListRequestShowIds(
33 | val trakt: Int,
34 | )
35 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/theupnextapp/CustomTestRunner.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp
14 |
15 | import android.app.Application
16 | import android.content.Context
17 | import androidx.test.runner.AndroidJUnitRunner
18 | import dagger.hilt.android.testing.HiltTestApplication
19 |
20 | class CustomTestRunner : AndroidJUnitRunner() {
21 | override fun newApplication(
22 | cl: ClassLoader?,
23 | className: String?,
24 | context: Context?,
25 | ): Application {
26 | return super.newApplication(cl, HiltTestApplication::class.java.name, context)
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/extensions/ReferenceDevices.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.extensions
14 |
15 | import androidx.compose.ui.tooling.preview.Devices
16 | import androidx.compose.ui.tooling.preview.Preview
17 |
18 | @Preview(name = "phone", device = Devices.PHONE, showBackground = true)
19 | @Preview(name = "foldable", device = Devices.FOLDABLE, showBackground = true)
20 | @Preview(name = "custom", device = "spec:width=1280dp,height=800dp,dpi=480", showBackground = true)
21 | @Preview("desktop", device = "id:desktop_medium", showBackground = true)
22 | annotation class ReferenceDevices
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/ShowSeasonEpisode.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class ShowSeasonEpisode(
25 | val id: Int?,
26 | val name: String?,
27 | val season: Int?,
28 | val number: Int?,
29 | val runtime: Int?,
30 | val originalImageUrl: String?,
31 | val mediumImageUrl: String?,
32 | val summary: String?,
33 | val type: String?,
34 | val airdate: String?,
35 | val airstamp: String?,
36 | val airtime: String?,
37 | var imdbID: String?,
38 | )
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktCreateCustomListRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktCreateCustomListRequest(
25 | val allow_comments: Boolean = false,
26 | val description: String = "Your list of favorites on the Upnext: TV Series Manager app",
27 | val display_numbers: Boolean = false,
28 | val name: String,
29 | val privacy: String = "private",
30 | val sort_by: String = "rank",
31 | val sort_how: String = "asc",
32 | )
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/ui/showDetail/ShowDetailFetchException.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.ui.showDetail
14 |
15 | import com.google.firebase.crashlytics.FirebaseCrashlytics
16 | import com.theupnextapp.domain.ErrorResponse
17 |
18 | class ShowDetailFetchException(
19 | message: String,
20 | errorResponse: ErrorResponse? = null,
21 | cause: Throwable? = null,
22 | ) : RuntimeException(message, cause) {
23 | init {
24 | errorResponse?.let {
25 | FirebaseCrashlytics.getInstance().setCustomKey("error_response_message", it.message)
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/models/DatabaseTables.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils.models
23 |
24 | enum class DatabaseTables(val tableName: String) {
25 | TABLE_TOMORROW_SHOWS("schedule_tomorrow"),
26 | TABLE_TODAY_SHOWS("schedule_today"),
27 | TABLE_YESTERDAY_SHOWS("schedule_yesterday"),
28 | TABLE_TRAKT_POPULAR("trakt_popular"),
29 | TABLE_TRAKT_TRENDING("trakt_trending"),
30 | TABLE_TRAKT_MOST_ANTICIPATED("trakt_most_anticipated"),
31 | TABLE_FAVORITE_SHOWS("favorite_shows"),
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/di/CustomTabModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.di
23 |
24 | import com.theupnextapp.common.utils.customTab.CustomTabComponent
25 | import dagger.Module
26 | import dagger.Provides
27 | import dagger.hilt.InstallIn
28 | import dagger.hilt.components.SingletonComponent
29 | import javax.inject.Singleton
30 |
31 | @InstallIn(SingletonComponent::class)
32 | @Module
33 | class CustomTabModule {
34 | @Provides
35 | @Singleton
36 | fun provideCustomTabComponent(): CustomTabComponent = CustomTabComponent()
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
21 |
22 |
23 |
24 |
25 | - System Defined
26 | - Off
27 | - On
28 | - Only With Battery Saver
29 |
30 |
31 |
32 | - @string/dark_mode_follow_system
33 | - @string/dark_mode_no
34 | - @string/dark_mode_yes
35 | - @string/dark_mode_auto_battery
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/values/motion.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
29 |
30 | 300
31 | 225
32 | 175
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/root_preferences.xml:
--------------------------------------------------------------------------------
1 |
21 |
22 |
23 |
24 |
25 |
26 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/models/ShowSearchUtil.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils.models
23 |
24 | import com.theupnextapp.R
25 | import com.theupnextapp.domain.ShowSearch
26 |
27 | fun getNameAndReleaseYearResource(showSearch: ShowSearch): Int {
28 | return if (!showSearch.status.isNullOrEmpty()) {
29 | if (showSearch.status != "Ended") {
30 | R.string.search_item_not_ended
31 | } else {
32 | R.string.search_item_ended
33 | }
34 | } else {
35 | R.string.search_item_ended
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktShowRatingResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | import com.theupnextapp.domain.TraktShowRating
25 |
26 | data class NetworkTraktShowRatingResponse(
27 | val distribution: HashMap?,
28 | val rating: Double?,
29 | val votes: Int?,
30 | )
31 |
32 | fun NetworkTraktShowRatingResponse.asDomainModel(): TraktShowRating {
33 | return TraktShowRating(
34 | rating = rating?.toInt(),
35 | votes = votes,
36 | distribution = distribution,
37 | )
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/di/AppCrashlyticsHelper.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.di
14 |
15 | import com.google.firebase.crashlytics.FirebaseCrashlytics
16 | import com.theupnextapp.common.CrashlyticsHelper
17 | import javax.inject.Inject
18 |
19 | class AppCrashlyticsHelper
20 | @Inject
21 | constructor(
22 | private val firebaseCrashlytics: FirebaseCrashlytics,
23 | ) : CrashlyticsHelper {
24 | override fun log(message: String) {
25 | firebaseCrashlytics.log(message)
26 | }
27 |
28 | override fun recordException(e: Throwable) {
29 | firebaseCrashlytics.recordException(e)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/di/WorkModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.di
23 |
24 | import android.app.Application
25 | import androidx.work.WorkManager
26 | import dagger.Module
27 | import dagger.Provides
28 | import dagger.hilt.InstallIn
29 | import dagger.hilt.components.SingletonComponent
30 | import javax.inject.Singleton
31 |
32 | @InstallIn(SingletonComponent::class)
33 | @Module
34 | class WorkModule {
35 | @Singleton
36 | @Provides
37 | fun provideWorkManager(application: Application): WorkManager {
38 | return WorkManager.getInstance(application)
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.ui.theme
14 |
15 | import androidx.compose.material3.Typography
16 | import androidx.compose.ui.text.TextStyle
17 | import androidx.compose.ui.text.font.FontFamily
18 | import androidx.compose.ui.text.font.FontWeight
19 | import androidx.compose.ui.unit.sp
20 |
21 | val Typography =
22 | Typography(
23 | bodyLarge =
24 | TextStyle(
25 | fontFamily = FontFamily.Default,
26 | fontWeight = FontWeight.Normal,
27 | fontSize = 16.sp,
28 | lineHeight = 24.sp,
29 | letterSpacing = 0.5.sp,
30 | ),
31 | )
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/ShowNextEpisode.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class ShowNextEpisode(
25 | val nextEpisodeId: Int?,
26 | val nextEpisodeAirdate: String?,
27 | val nextEpisodeAirstamp: String?,
28 | val nextEpisodeAirtime: String?,
29 | val nextEpisodeMediumImageUrl: String?,
30 | val nextEpisodeOriginalImageUrl: String?,
31 | val nextEpisodeName: String?,
32 | val nextEpisodeNumber: String?,
33 | val nextEpisodeRuntime: String?,
34 | val nextEpisodeSeason: String?,
35 | val nextEpisodeSummary: String?,
36 | val nextEpisodeUrl: String?,
37 | )
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/database/DatabaseTableUpdate.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.database
23 |
24 | import androidx.room.Entity
25 | import androidx.room.PrimaryKey
26 | import com.theupnextapp.domain.TableUpdate
27 |
28 | @Entity(tableName = "table_updates")
29 | data class DatabaseTableUpdate(
30 | @PrimaryKey(autoGenerate = true)
31 | val id: Long = 0,
32 | val table_name: String,
33 | val last_updated: Long,
34 | )
35 |
36 | fun DatabaseTableUpdate.asDomainModel(): TableUpdate {
37 | return TableUpdate(
38 | id = id,
39 | tableName = table_name,
40 | lastUpdated = last_updated,
41 | )
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/di/FirebaseAnalyticsModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.di
23 |
24 | import android.app.Application
25 | import com.google.firebase.analytics.FirebaseAnalytics
26 | import dagger.Module
27 | import dagger.Provides
28 | import dagger.hilt.InstallIn
29 | import dagger.hilt.components.SingletonComponent
30 | import javax.inject.Singleton
31 |
32 | @InstallIn(SingletonComponent::class)
33 | @Module
34 | class FirebaseAnalyticsModule {
35 | @Singleton
36 | @Provides
37 | fun provideFirebaseAnalytics(application: Application): FirebaseAnalytics {
38 | return FirebaseAnalytics.getInstance(application)
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/di/FirebaseCrashlyticsModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.di
23 |
24 | import com.google.firebase.crashlytics.FirebaseCrashlytics
25 | import dagger.Module
26 | import dagger.Provides
27 | import dagger.hilt.InstallIn
28 | import dagger.hilt.components.SingletonComponent
29 | import javax.inject.Singleton
30 |
31 | @InstallIn(SingletonComponent::class)
32 | @Module
33 | abstract class FirebaseCrashlyticsModule {
34 | companion object {
35 | @Singleton
36 | @Provides
37 | fun provideFirebaseCrashlytics(): FirebaseCrashlytics {
38 | return FirebaseCrashlytics.getInstance()
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/ShowPreviousEpisode.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | data class ShowPreviousEpisode(
25 | val previousEpisodeId: Int?,
26 | val previousEpisodeAirdate: String?,
27 | val previousEpisodeAirstamp: String?,
28 | val previousEpisodeAirtime: String?,
29 | val previousEpisodeMediumImageUrl: String?,
30 | val previousEpisodeOriginalImageUrl: String?,
31 | val previousEpisodeName: String?,
32 | val previousEpisodeNumber: String?,
33 | val previousEpisodeRuntime: String?,
34 | val previousEpisodeSeason: String?,
35 | val previousEpisodeSummary: String?,
36 | val previousEpisodeUrl: String?,
37 | )
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/WindowSizeClassUtil.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.common.utils
14 |
15 | import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
16 | import androidx.compose.material3.windowsizeclass.WindowSizeClass
17 | import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
18 | import androidx.compose.runtime.Composable
19 | import androidx.compose.ui.platform.LocalContext
20 | import com.theupnextapp.extensions.getActivity
21 |
22 | @ExperimentalMaterial3WindowSizeClassApi
23 | @Composable
24 | fun getWindowSizeClass(): WindowSizeClass? {
25 | val context = LocalContext.current
26 |
27 | return context.getActivity()?.let {
28 | calculateWindowSizeClass(activity = it)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/test/java/com/theupnextapp/repository/ConcreteTestRepository.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.repository
14 |
15 | import com.theupnextapp.database.UpnextDao
16 | import com.theupnextapp.network.TvMazeService
17 |
18 | // Concrete repository for testing protected methods
19 | @Suppress("DEPRECATION")
20 | class ConcreteTestRepository(
21 | upnextDao: UpnextDao,
22 | tvMazeService: TvMazeService,
23 | ) : BaseRepository(upnextDao, tvMazeService) {
24 | // testCanProceedWithUpdate is deprecated in BaseRepository, if not used, consider removing from here too
25 | fun testCanProceedWithUpdate(
26 | tableName: String,
27 | intervalMinutes: Long,
28 | ): Boolean {
29 | return super.canProceedWithUpdate(tableName, intervalMinutes)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/ShowCast.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | import android.os.Parcelable
25 | import kotlinx.parcelize.Parcelize
26 |
27 | @Parcelize
28 | data class ShowCast(
29 | val id: Int?,
30 | val name: String?,
31 | val country: String?,
32 | val birthday: String?,
33 | val deathday: String?,
34 | val gender: String?,
35 | val originalImageUrl: String?,
36 | val mediumImageUrl: String?,
37 | val characterId: Int?,
38 | val characterUrl: String?,
39 | val characterName: String?,
40 | val characterMediumImageUrl: String?,
41 | val characterOriginalImageUrl: String?,
42 | val self: Boolean?,
43 | val voice: Boolean?,
44 | ) : Parcelable
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/TraktConnectionInterceptor.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils
23 |
24 | import com.theupnextapp.BuildConfig
25 | import okhttp3.Interceptor
26 | import okhttp3.Response
27 |
28 | class TraktConnectionInterceptor : Interceptor {
29 | override fun intercept(chain: Interceptor.Chain): Response {
30 | var request = chain.request()
31 | request =
32 | request.newBuilder()
33 | .addHeader("Content-Type", "application/json")
34 | .addHeader("trakt-api-version", "2")
35 | .addHeader("trakt-api-key", BuildConfig.TRAKT_CLIENT_ID)
36 | .build()
37 | return chain.proceed(request)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktIdLookupResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | class NetworkTraktIdLookupResponse : ArrayList()
25 |
26 | data class NetworkTraktIdLookupResponseItem(
27 | val show: NetworkTraktIdLookupResponseItemShow?,
28 | val score: Any?,
29 | val type: String?,
30 | )
31 |
32 | data class NetworkTraktIdLookupResponseItemShow(
33 | val ids: NetworkTraktIdLookupResponseItemShowIds?,
34 | val title: String?,
35 | val year: Int?,
36 | )
37 |
38 | data class NetworkTraktIdLookupResponseItemShowIds(
39 | val imdb: String?,
40 | val slug: String?,
41 | val tmdb: Int?,
42 | val trakt: Int?,
43 | )
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktCreateCustomListResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktCreateCustomListResponse(
25 | val allow_comments: Boolean?,
26 | val comment_count: Int?,
27 | val created_at: String?,
28 | val description: String?,
29 | val display_numbers: Boolean?,
30 | val ids: NetworkTraktCreateCustomListResponseIds?,
31 | val item_count: Int?,
32 | val likes: Int?,
33 | val name: String?,
34 | val privacy: String?,
35 | val sort_by: String?,
36 | val sort_how: String?,
37 | val updated_at: String?,
38 | )
39 |
40 | data class NetworkTraktCreateCustomListResponseIds(
41 | val slug: String?,
42 | val trakt: Int?,
43 | )
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/UpnextPreferenceManager.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils
23 |
24 | import android.app.Application
25 | import androidx.preference.PreferenceManager
26 | import com.theupnextapp.R
27 | import javax.inject.Inject
28 |
29 | @Deprecated(message = "SharedPreferences no longer recommended")
30 | class UpnextPreferenceManager
31 | @Inject
32 | constructor(val application: Application) {
33 | fun getSelectedTheme(): String? {
34 | val preferences = PreferenceManager.getDefaultSharedPreferences(application)
35 |
36 | return preferences.getString(
37 | application.getString(R.string.dark_mode),
38 | application.getString(R.string.dark_mode_yes),
39 | )
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktShowStatsResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | import com.theupnextapp.domain.TraktShowStats
25 |
26 | data class NetworkTraktShowStatsResponse(
27 | val collected_episodes: Int?,
28 | val collectors: Int?,
29 | val comments: Int?,
30 | val lists: Int?,
31 | val plays: Int?,
32 | val votes: Int?,
33 | val watchers: Int?,
34 | )
35 |
36 | fun NetworkTraktShowStatsResponse.asDomainModel(): TraktShowStats {
37 | return TraktShowStats(
38 | collected_episodes = collected_episodes,
39 | collectors = collectors,
40 | comments = comments,
41 | lists = lists,
42 | plays = plays,
43 | votes = votes,
44 | watchers = watchers,
45 | )
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/res/values/shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
29 |
30 |
35 |
36 |
37 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/test/java/com/theupnextapp/repository/fakes/FakeCrashlytics.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.repository.fakes // Changed package
14 |
15 | import com.theupnextapp.common.CrashlyticsHelper
16 |
17 | class FakeCrashlytics : CrashlyticsHelper { // Renamed class
18 | private val recordedExceptions = mutableListOf()
19 | private val loggedMessages = mutableListOf()
20 |
21 | override fun recordException(e: Throwable) {
22 | recordedExceptions.add(e)
23 | }
24 |
25 | override fun log(message: String) {
26 | loggedMessages.add(message)
27 | }
28 |
29 | // Helper method for assertions in tests
30 | fun getRecordedExceptions(): List = recordedExceptions
31 |
32 | fun getLoggedMessages(): List = loggedMessages
33 |
34 | fun clear() {
35 | recordedExceptions.clear()
36 | loggedMessages.clear()
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktAddShowToListResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktAddShowToListResponse(
25 | val added: NetworkTraktAddShowToListResponseAdded,
26 | val existing: NetworkTraktAddShowToListResponseExisting,
27 | val not_found: NetworkTraktAddShowToListResponseNotFound,
28 | )
29 |
30 | data class NetworkTraktAddShowToListResponseAdded(
31 | val shows: Int,
32 | )
33 |
34 | data class NetworkTraktAddShowToListResponseExisting(
35 | val shows: Int,
36 | )
37 |
38 | data class NotFoundShowItem(
39 | val ids: NetworkTraktAddShowToListRequestShowIds, // This will correctly point to your class with just 'trakt: Int'
40 | )
41 |
42 | data class NetworkTraktAddShowToListResponseNotFound(
43 | val shows: List,
44 | )
45 |
--------------------------------------------------------------------------------
/app/src/test/java/com/theupnextapp/CoroutineTestRule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 | package com.theupnextapp
13 |
14 | import kotlinx.coroutines.Dispatchers
15 | import kotlinx.coroutines.ExperimentalCoroutinesApi
16 | import kotlinx.coroutines.test.TestDispatcher
17 | import kotlinx.coroutines.test.UnconfinedTestDispatcher
18 | import kotlinx.coroutines.test.resetMain
19 | import kotlinx.coroutines.test.setMain
20 | import org.junit.rules.TestWatcher
21 | import org.junit.runner.Description
22 |
23 | @ExperimentalCoroutinesApi
24 | class CoroutineTestRule(
25 | val testDispatcher: TestDispatcher = UnconfinedTestDispatcher(),
26 | ) : TestWatcher() {
27 | override fun starting(description: Description) {
28 | super.starting(description)
29 | Dispatchers.setMain(testDispatcher)
30 | }
31 |
32 | override fun finished(description: Description) {
33 | super.finished(description)
34 | Dispatchers.resetMain()
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/debug/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
13 |
14 |
20 |
23 |
26 |
27 |
28 |
29 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/database/DatabaseTraktAccess.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.database
23 |
24 | import androidx.room.Entity
25 | import androidx.room.PrimaryKey
26 | import com.theupnextapp.domain.TraktAccessToken
27 |
28 | @Entity(tableName = "trakt_access")
29 | data class DatabaseTraktAccess(
30 | @PrimaryKey
31 | val id: Int,
32 | val access_token: String?,
33 | val created_at: Long?,
34 | val expires_in: Long?,
35 | val refresh_token: String?,
36 | val scope: String?,
37 | val token_type: String?,
38 | )
39 |
40 | fun DatabaseTraktAccess.asDomainModel(): TraktAccessToken {
41 | return TraktAccessToken(
42 | access_token = access_token,
43 | token_type = token_type,
44 | expires_in = expires_in,
45 | refresh_token = refresh_token,
46 | scope = scope,
47 | created_at = created_at,
48 | )
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/database/UpnextDatabase.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.database
23 |
24 | import androidx.room.Database
25 | import androidx.room.RoomDatabase
26 |
27 | @Database(
28 | entities = [
29 | DatabaseYesterdaySchedule::class,
30 | DatabaseTodaySchedule::class,
31 | DatabaseTomorrowSchedule::class,
32 | DatabaseShowInfo::class,
33 | DatabaseTableUpdate::class,
34 | DatabaseTraktPopularShows::class,
35 | DatabaseTraktTrendingShows::class,
36 | DatabaseTraktMostAnticipated::class,
37 | DatabaseFavoriteShows::class,
38 | DatabaseTraktAccess::class,
39 | ],
40 | version = 30,
41 | exportSchema = true,
42 | )
43 | abstract class UpnextDatabase : RoomDatabase() {
44 | abstract val upnextDao: UpnextDao
45 | abstract val traktDao: TraktDao
46 | abstract val tvMazeDao: TvMazeDao
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/database/UpnextDao.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.database
23 |
24 | import androidx.room.Dao
25 | import androidx.room.Insert
26 | import androidx.room.OnConflictStrategy
27 | import androidx.room.Query
28 | import kotlinx.coroutines.flow.Flow
29 |
30 | @Dao
31 | interface UpnextDao {
32 | @Insert(onConflict = OnConflictStrategy.REPLACE)
33 | fun insertTableUpdateLog(vararg databaseTableUpdate: DatabaseTableUpdate)
34 |
35 | @Query("select * from table_updates where table_name = :tableName")
36 | fun getTableLastUpdate(tableName: String): Flow
37 |
38 | @Query("select * from table_updates where table_name = :tableName")
39 | fun getTableLastUpdateTime(tableName: String): DatabaseTableUpdate?
40 |
41 | @Query("delete from table_updates where table_name = :tableName")
42 | fun deleteRecentTableUpdate(tableName: String)
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/domain/TraktAccessToken.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.domain
23 |
24 | import java.util.concurrent.TimeUnit
25 |
26 | data class TraktAccessToken(
27 | val access_token: String?,
28 | val created_at: Long?,
29 | val expires_in: Long?,
30 | val refresh_token: String?,
31 | val scope: String?,
32 | val token_type: String?,
33 | )
34 |
35 | /**
36 | * Check if the Trakt access token is still valid
37 | */
38 | fun TraktAccessToken.isTraktAccessTokenValid(): Boolean {
39 | var isValid = false
40 | val currentDateEpoch = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())
41 | val expiryDateEpoch =
42 | expires_in?.let { created_at?.plus(it) }
43 |
44 | if (expiryDateEpoch != null) {
45 | if (expiryDateEpoch > currentDateEpoch) {
46 | isValid = true
47 | }
48 | }
49 | return isValid
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktCheckInRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | data class NetworkTraktCheckInRequest(
25 | val app_date: String? = null,
26 | val app_version: String? = null,
27 | val episode: NetworkTraktCheckInRequestEpisode?,
28 | val message: String? = null,
29 | val sharing: NetworkTraktCheckInRequestSharing? = null,
30 | val show: NetworkTraktCheckInRequestShow?,
31 | )
32 |
33 | data class NetworkTraktCheckInRequestShow(
34 | val ids: NetworkTraktCheckInRequestShowIds?,
35 | val title: String?,
36 | val year: Int?,
37 | )
38 |
39 | data class NetworkTraktCheckInRequestEpisode(
40 | val number: Int?,
41 | val season: Int?,
42 | )
43 |
44 | data class NetworkTraktCheckInRequestSharing(
45 | val tumblr: Boolean?,
46 | val twitter: Boolean?,
47 | )
48 |
49 | data class NetworkTraktCheckInRequestShowIds(
50 | val trakt: Int?,
51 | val tvdb: Int? = null,
52 | )
53 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/common/utils/customTab/TabServiceConnection.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.common.utils.customTab
23 |
24 | import android.content.ComponentName
25 | import androidx.browser.customtabs.CustomTabsClient
26 | import androidx.browser.customtabs.CustomTabsServiceConnection
27 | import java.lang.ref.WeakReference
28 |
29 | class TabServiceConnection(connectionCallback: TabServiceConnectionCallback) :
30 | CustomTabsServiceConnection() {
31 | private val mConnectionCallback: WeakReference =
32 | WeakReference(connectionCallback)
33 |
34 | override fun onCustomTabsServiceConnected(
35 | name: ComponentName,
36 | client: CustomTabsClient,
37 | ) {
38 | mConnectionCallback.get()?.onTabServiceConnected(client)
39 | }
40 |
41 | override fun onServiceDisconnected(name: ComponentName) {
42 | mConnectionCallback.get()?.onTabServiceDisconnected()
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/tvmaze/NetworkTvMazeShowLookupResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.tvmaze
23 |
24 | data class NetworkTvMazeShowLookupResponse(
25 | val _links: NetworkTvMazeShowLookupLinks?,
26 | val averageRuntime: Int?,
27 | val dvdCountry: Any?,
28 | val externals: NetworkTvMazeShowLookupExternals?,
29 | val genres: List?,
30 | val id: Int,
31 | val image: NetworkTvMazeShowLookupImage,
32 | val language: String,
33 | val name: String,
34 | val network: NetworkTvMazeShowLookupNetwork,
35 | val officialSite: String,
36 | val premiered: String,
37 | val rating: NetworkTvMazeShowLookupRating,
38 | val runtime: Int,
39 | val schedule: NetworkTvMazeShowLookupSchedule,
40 | val status: String,
41 | val summary: String,
42 | val type: String,
43 | val updated: Int,
44 | val url: String,
45 | val webChannel: NetworkTvMazeShowLookupWebChannel,
46 | val weight: Int,
47 | )
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/ui/traktAccount/TraktProfileHeader.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.ui.traktAccount
14 |
15 | import androidx.compose.foundation.Image
16 | import androidx.compose.foundation.layout.Column
17 | import androidx.compose.foundation.layout.height
18 | import androidx.compose.material3.Text
19 | import androidx.compose.material3.TextButton
20 | import androidx.compose.runtime.Composable
21 | import androidx.compose.ui.Alignment
22 | import androidx.compose.ui.Modifier
23 | import androidx.compose.ui.res.painterResource
24 | import androidx.compose.ui.unit.dp
25 | import com.theupnextapp.R
26 |
27 | @Composable
28 | fun TraktProfileHeader(onLogoutClick: () -> Unit) {
29 | Column(horizontalAlignment = Alignment.CenterHorizontally) {
30 | Image(
31 | painter = painterResource(id = R.drawable.ic_trakt_wide_red_white),
32 | contentDescription = "Trakt Logo",
33 | modifier = Modifier.height(40.dp), // Adjust size
34 | )
35 | TextButton(onClick = onLogoutClick) {
36 | Text("Logout")
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/ui/showDetail/ShowSynopsis.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 | *
8 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 | *
10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.theupnextapp.ui.showDetail
14 |
15 | import androidx.compose.material3.MaterialTheme
16 | import androidx.compose.material3.Text
17 | import androidx.compose.runtime.Composable
18 | import androidx.compose.ui.Modifier
19 | import androidx.compose.ui.tooling.preview.PreviewParameter
20 | import com.theupnextapp.domain.ShowDetailSummary
21 | import com.theupnextapp.extensions.ReferenceDevices
22 | import com.theupnextapp.ui.previewdata.ShowDetailSummaryProvider
23 | import org.jsoup.Jsoup
24 |
25 | @Composable
26 | fun ShowSynopsis(
27 | showSummary: ShowDetailSummary?,
28 | modifier: Modifier = Modifier,
29 | ) {
30 | showSummary?.summary?.let { summary ->
31 | Text(
32 | text = Jsoup.parse(summary).text(),
33 | modifier = modifier,
34 | style = MaterialTheme.typography.bodyMedium,
35 | )
36 | }
37 | }
38 |
39 | @ReferenceDevices
40 | @Composable
41 | fun ShowSynopsisPreview(
42 | @PreviewParameter(ShowDetailSummaryProvider::class)
43 | showSummary: ShowDetailSummary?,
44 | ) {
45 | ShowSynopsis(showSummary = showSummary)
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/theupnextapp/network/models/trakt/NetworkTraktUserListsResponse.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Ahmed Tikiwa
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
7 | * associated documentation files (the "Software"), to deal in the Software without restriction,
8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all copies or
13 | * substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
16 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | */
21 |
22 | package com.theupnextapp.network.models.trakt
23 |
24 | import com.theupnextapp.domain.TraktUserList
25 |
26 | class NetworkTraktUserListsResponse : ArrayList()
27 |
28 | data class NetworkTraktUserListsResponseItem(
29 | val allow_comments: Boolean?,
30 | val comment_count: Int?,
31 | val created_at: String?,
32 | val description: String?,
33 | val display_numbers: Boolean?,
34 | val ids: NetworkTraktUserListsResponseItemIds?,
35 | val item_count: Int?,
36 | val likes: Int?,
37 | val name: String?,
38 | val privacy: String?,
39 | val sort_by: String?,
40 | val sort_how: String?,
41 | val updated_at: String?,
42 | )
43 |
44 | data class NetworkTraktUserListsResponseItemIds(
45 | val slug: String?,
46 | val trakt: Int?,
47 | )
48 |
49 | fun List.asDomainModel(): List {
50 | return map {
51 | TraktUserList(
52 | traktId = it.ids?.trakt,
53 | slug = it.ids?.slug,
54 | )
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
41 |
--------------------------------------------------------------------------------