mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Fix for casting downloaded videos (UMP, requires redownloading).
This commit is contained in:
+17
@@ -79,6 +79,7 @@ open class JSDashManifestRawSource(
|
|||||||
_obj.getOrDefault<Boolean>(cfg, "canMerge", ctx, false) ?: false
|
_obj.getOrDefault<Boolean>(cfg, "canMerge", ctx, false) ?: false
|
||||||
|
|
||||||
override var streamMetaData: StreamMetaData? = null
|
override var streamMetaData: StreamMetaData? = null
|
||||||
|
var audioStreamMetaData: StreamMetaData? = null
|
||||||
|
|
||||||
private var _pregenerate: V8Deferred<String?>? = null
|
private var _pregenerate: V8Deferred<String?>? = null
|
||||||
fun pregenerateAsync(scope: CoroutineScope): V8Deferred<String?>? {
|
fun pregenerateAsync(scope: CoroutineScope): V8Deferred<String?>? {
|
||||||
@@ -125,6 +126,14 @@ open class JSDashManifestRawSource(
|
|||||||
streamMetaData = StreamMetaData(initStart, initEnd, indexStart, indexEnd);
|
streamMetaData = StreamMetaData(initStart, initEnd, indexStart, indexEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val audioInitStart = _obj.getOrDefault<Int>(_config, "audioInitStart", "JSDashManifestRawSource", null) ?: 0;
|
||||||
|
val audioInitEnd = _obj.getOrDefault<Int>(_config, "audioInitEnd", "JSDashManifestRawSource", null) ?: 0;
|
||||||
|
val audioIndexStart = _obj.getOrDefault<Int>(_config, "audioIndexStart", "JSDashManifestRawSource", null) ?: 0;
|
||||||
|
val audioIndexEnd = _obj.getOrDefault<Int>(_config, "audioIndexEnd", "JSDashManifestRawSource", null) ?: 0;
|
||||||
|
if(audioInitEnd > 0 && audioIndexStart > 0 && audioIndexEnd > 0) {
|
||||||
|
audioStreamMetaData = StreamMetaData(audioInitStart, audioInitEnd, audioIndexStart, audioIndexEnd);
|
||||||
|
}
|
||||||
|
|
||||||
return@busy result.convert {
|
return@busy result.convert {
|
||||||
it.value
|
it.value
|
||||||
};
|
};
|
||||||
@@ -162,6 +171,14 @@ open class JSDashManifestRawSource(
|
|||||||
if(initEnd > 0 && indexStart > 0 && indexEnd > 0) {
|
if(initEnd > 0 && indexStart > 0 && indexEnd > 0) {
|
||||||
streamMetaData = StreamMetaData(initStart, initEnd, indexStart, indexEnd);
|
streamMetaData = StreamMetaData(initStart, initEnd, indexStart, indexEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val audioInitStart = _obj.getOrDefault<Int>(_config, "audioInitStart", "JSDashManifestRawSource", null) ?: 0;
|
||||||
|
val audioInitEnd = _obj.getOrDefault<Int>(_config, "audioInitEnd", "JSDashManifestRawSource", null) ?: 0;
|
||||||
|
val audioIndexStart = _obj.getOrDefault<Int>(_config, "audioIndexStart", "JSDashManifestRawSource", null) ?: 0;
|
||||||
|
val audioIndexEnd = _obj.getOrDefault<Int>(_config, "audioIndexEnd", "JSDashManifestRawSource", null) ?: 0;
|
||||||
|
if(audioInitEnd > 0 && audioIndexStart > 0 && audioIndexEnd > 0) {
|
||||||
|
audioStreamMetaData = StreamMetaData(audioInitStart, audioInitEnd, audioIndexStart, audioIndexEnd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -1462,6 +1462,9 @@ class VideoDownload {
|
|||||||
if(localAudioSource != null && audioSourceToUse != null && audioSourceToUse is IStreamMetaDataSource)
|
if(localAudioSource != null && audioSourceToUse != null && audioSourceToUse is IStreamMetaDataSource)
|
||||||
localAudioSource.streamMetaData = (audioSourceToUse as IStreamMetaDataSource).streamMetaData;
|
localAudioSource.streamMetaData = (audioSourceToUse as IStreamMetaDataSource).streamMetaData;
|
||||||
|
|
||||||
|
if(localAudioSource != null && localAudioSource.streamMetaData == null && videoSourceToUse is JSDashManifestRawSource)
|
||||||
|
localAudioSource.streamMetaData = (videoSourceToUse as JSDashManifestRawSource).audioStreamMetaData;
|
||||||
|
|
||||||
if(existing != null) {
|
if(existing != null) {
|
||||||
existing.videoSerialized = videoDetails!!;
|
existing.videoSerialized = videoDetails!!;
|
||||||
if(localVideoSource != null) {
|
if(localVideoSource != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user