Skip to content

Conversation

sentinelweb
Copy link
Owner

@sentinelweb sentinelweb commented Oct 7, 2024

implements #482

log.d("PlayerCommand.Load: $_currentVideoId != ${command.platformId} start:${command.startPosition}")
if (_currentVideoId != command.platformId) {
_player?.loadVideo(command.platformId, command.startPosition / 1000f)
log.d("PlayerCommand.Load: $_currentVideoId != ${command.item.media.platformId} start:${command.startPosition}")

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style. Warning

Line detected that is longer than the defined maximum line length in the code style.
_player?.loadVideo(command.platformId, command.startPosition / 1000f)
log.d("PlayerCommand.Load: $_currentVideoId != ${command.item.media.platformId} start:${command.startPosition}")
if (_currentVideoId != command.item.media.platformId) {
_player?.loadVideo(command.item.media.platformId, command.startPosition / 1000f)

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
import io.ktor.server.request.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
import io.ktor.utils.io.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

io.ktor.utils.io.* is a wildcard import. Replace it with fully qualified imports.
is CuerSelectSendTo ->
remotesDialogLauncher.launchRemotesDialog(
{ remoteNodeDomain, screen ->
remotesMviView.dispatch(Event.OnActionSendToSelected(value.sendNode, remoteNodeDomain))

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style. Warning

Line detected that is longer than the defined maximum line length in the code style.
NetResult.Data(true)
} catch (e: RequestFailureException) {
NetResult.HttpError(e)
} catch (e: Exception) {

Check warning

Code scanning / detekt

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
import uk.co.sentinelweb.cuer.remote.server.message.AvailableMessage.MsgType.Ping

class RemotesStoreFactory constructor(
class RemotesStoreFactory(

Check warning

Code scanning / detekt

The more parameters a function has the more complex it is. Long parameter lists are often used to control complex algorithms and violate the Single Responsibility Principle. Prefer functions with short parameter lists. Warning

The constructor(storeFactory: StoreFactory, log: LogWrapper, remoteServerManager: RemoteServerContract.Manager, coroutines: CoroutineContextProvider, localRepository: LocalRepository, remoteStatusInteractor: RemoteStatusInteractor, remotesRepository: RemotesRepository, locationPermissionLaunch: LocationPermissionLaunch, wifiStateProvider: WifiStateProvider, getPlaylistsFromDeviceUseCase: GetPlaylistsFromDeviceUseCase, castController: CastController) has too many parameters. The current threshold is set to 7.
Dialog(onDismissRequest = { remotesDialogLauncher.hideRemotesDialog() }) {
Surface(
shape = MaterialTheme.shapes.medium,
elevation = 24.dp

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
import org.koin.core.component.inject
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.LOCAL
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.* is a wildcard import. Replace it with fully qualified imports.
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.LOCAL
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.MEMORY
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.* is a wildcard import. Replace it with fully qualified imports.
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Identifier.Locator
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.REMOTE
import uk.co.sentinelweb.cuer.domain.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

uk.co.sentinelweb.cuer.domain.* is a wildcard import. Replace it with fully qualified imports.
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Identifier.Locator
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source
import uk.co.sentinelweb.cuer.app.orchestrator.OrchestratorContract.Source.REMOTE
import uk.co.sentinelweb.cuer.domain.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

uk.co.sentinelweb.cuer.domain.* is a wildcard import. Replace it with fully qualified imports.
import uk.co.sentinelweb.cuer.app.usecase.GetFolderListUseCase
import uk.co.sentinelweb.cuer.core.providers.PlayerConfigProvider
import uk.co.sentinelweb.cuer.core.wrapper.LogWrapper
import uk.co.sentinelweb.cuer.domain.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

uk.co.sentinelweb.cuer.domain.* is a wildcard import. Replace it with fully qualified imports.
@@ -0,0 +1,15 @@
package uk.co.sentinelweb.cuer.core.wrapper

import platform.Foundation.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

platform.Foundation.* is a wildcard import. Replace it with fully qualified imports.
const val PATH = "/folders"
const val P_PARAM = "p"
}
object VIDEO_STREAM_API {

Check warning

Code scanning / detekt

A class or object's name should fit the naming pattern defined in the projects configuration. Warning

Class and Object names should match the pattern: [A-Z][a-zA-Z0-9]*
@sentinelweb sentinelweb merged commit f74e211 into develop Oct 12, 2024
4 checks passed
@sentinelweb sentinelweb deleted the feature/482-http-video branch October 12, 2024 16:06
@sentinelweb sentinelweb linked an issue Oct 12, 2024 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

play video file over network
1 participant