Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
lizongying committed Dec 6, 2023
1 parent c524e6c commit 20ddba6
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 26 deletions.
9 changes: 4 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.lizongying.mytv"
minSdk 23
targetSdk 33
versionCode getVersionCode()
versionName getVersionName()
versionCode VersionCode()
versionName VersionName()
}

buildTypes {
Expand All @@ -32,7 +32,7 @@ android {
}
}

static def getVersionCode() {
static def VersionCode() {
try {
def process = 'git rev-list --count HEAD'.execute()
process.waitFor()
Expand All @@ -42,7 +42,7 @@ static def getVersionCode() {
}
}

static def getVersionName() {
static def VersionName() {
try {
def process = 'git describe --tags --always'.execute()
process.waitFor()
Expand All @@ -53,7 +53,6 @@ static def getVersionName() {
}

dependencies {

implementation 'androidx.core:core-ktx:1.11.0-beta02'
implementation 'androidx.leanback:leanback:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/java/com/lizongying/mytv/CardPresenter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.lizongying.mytv

import android.graphics.Bitmap
import android.media.MediaMetadataRetriever
import android.util.Log
import android.view.ContextThemeWrapper
import android.view.ViewGroup
import androidx.leanback.widget.ImageCardView
Expand All @@ -13,11 +12,6 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext


/**
* A CardPresenter is used to generate Views and bind Objects to them on demand.
* It contains an ImageCardView.
*/
class CardPresenter(private val lifecycleScope: LifecycleCoroutineScope) : Presenter() {

override fun onCreateViewHolder(parent: ViewGroup): ViewHolder {
Expand Down Expand Up @@ -91,9 +85,7 @@ class CardPresenter(private val lifecycleScope: LifecycleCoroutineScope) : Prese

companion object {
private const val TAG = "CardPresenter"

private const val CARD_WIDTH = 313

private const val CARD_HEIGHT = 176
}
}
1 change: 0 additions & 1 deletion app/src/main/java/com/lizongying/mytv/Info.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.lizongying.mytv

import java.io.Serializable


data class Info(
var rowPosition: Int = 0,
var itemPosition: Int = 0,
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/java/com/lizongying/mytv/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentActivity


/**
* Loads [MainFragment].
*/
class MainActivity : FragmentActivity() {

private val playbackFragment = PlaybackFragment()
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/com/lizongying/mytv/MainFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ import androidx.leanback.widget.Row
import androidx.leanback.widget.RowPresenter
import androidx.lifecycle.lifecycleScope

/**
* Loads a grid of cards with movies to browse.
*/
class MainFragment : BrowseSupportFragment() {

var itemPosition: Int = 0
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/com/lizongying/mytv/PlaybackFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.leanback.media.PlaybackTransportControlGlue
import androidx.leanback.widget.PlaybackControlsRow
import java.io.IOException

/** Handles video playback with media controls. */
class PlaybackFragment : VideoSupportFragment() {

private lateinit var mTransportControlGlue: PlaybackTransportControlGlue<MediaPlayerAdapter>
Expand All @@ -28,7 +27,6 @@ class PlaybackFragment : VideoSupportFragment() {
}

override fun showControlsOverlay(runAnimation: Boolean) {
// We will do nothing here, and thus controls will never be shown
}

fun play(tv: TV) {
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/com/lizongying/mytv/TV.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package com.lizongying.mytv

import java.io.Serializable

/**
* Movie class represents video entity with title, description, image thumbs and video url.
*/
data class TV(
var id: Int = 0,
var title: String? = null,
Expand Down

0 comments on commit 20ddba6

Please sign in to comment.