2022-10-23 17:09:15 +05:30
|
|
|
package com.github.libretube.extensions
|
|
|
|
|
|
|
|
import com.github.libretube.api.obj.StreamItem
|
|
|
|
import com.github.libretube.api.obj.Streams
|
|
|
|
|
2022-10-23 19:34:15 +05:30
|
|
|
fun Streams.toStreamItem(videoId: String): StreamItem {
|
2022-10-23 17:09:15 +05:30
|
|
|
return StreamItem(
|
|
|
|
url = videoId,
|
|
|
|
title = title,
|
|
|
|
thumbnail = thumbnailUrl,
|
|
|
|
uploaderName = uploader,
|
|
|
|
uploaderUrl = uploaderUrl,
|
|
|
|
uploaderAvatar = uploaderAvatar,
|
|
|
|
uploadedDate = uploadDate,
|
|
|
|
uploaded = null,
|
|
|
|
duration = duration,
|
|
|
|
views = views,
|
|
|
|
uploaderVerified = uploaderVerified,
|
|
|
|
shortDescription = description
|
|
|
|
)
|
|
|
|
}
|