mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fixes
This commit is contained in:
parent
0f1743c35a
commit
838b9bed64
@ -810,7 +810,7 @@ class PlayerFragment : Fragment() {
|
|||||||
playlist = RetrofitInstance.api.getPlaylist(playlistId!!)
|
playlist = RetrofitInstance.api.getPlaylist(playlistId!!)
|
||||||
// save the playlist urls in the array
|
// save the playlist urls in the array
|
||||||
playlist.relatedStreams?.forEach { video ->
|
playlist.relatedStreams?.forEach { video ->
|
||||||
playlistStreamIds += video.url?.toID()
|
playlistStreamIds += video.url.toID()
|
||||||
}
|
}
|
||||||
// save playlistNextPage for usage if video is not contained
|
// save playlistNextPage for usage if video is not contained
|
||||||
playlistNextPage = playlist.nextpage
|
playlistNextPage = playlist.nextpage
|
||||||
|
@ -16,7 +16,7 @@ object PreferenceHelper {
|
|||||||
private lateinit var prefContext: Context
|
private lateinit var prefContext: Context
|
||||||
private lateinit var settings: SharedPreferences
|
private lateinit var settings: SharedPreferences
|
||||||
private lateinit var editor: SharedPreferences.Editor
|
private lateinit var editor: SharedPreferences.Editor
|
||||||
val mapper = ObjectMapper()
|
private val mapper = ObjectMapper()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the context that is being used to access the shared preferences
|
* set the context that is being used to access the shared preferences
|
||||||
@ -136,7 +136,6 @@ object PreferenceHelper {
|
|||||||
streams.duration
|
streams.duration
|
||||||
)
|
)
|
||||||
|
|
||||||
val mapper = ObjectMapper()
|
|
||||||
val watchHistory = getWatchHistory()
|
val watchHistory = getWatchHistory()
|
||||||
|
|
||||||
watchHistory += watchHistoryItem
|
watchHistory += watchHistoryItem
|
||||||
@ -146,7 +145,6 @@ object PreferenceHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun removeFromWatchHistory(videoId: String) {
|
fun removeFromWatchHistory(videoId: String) {
|
||||||
val mapper = ObjectMapper()
|
|
||||||
val watchHistory = getWatchHistory()
|
val watchHistory = getWatchHistory()
|
||||||
|
|
||||||
var indexToRemove: Int? = null
|
var indexToRemove: Int? = null
|
||||||
@ -220,7 +218,7 @@ object PreferenceHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun setLatestVideoId(videoId: String) {
|
fun setLatestVideoId(videoId: String) {
|
||||||
setString(PreferenceKeys.LAST_STREAM_VIDEO_ID, videoId)
|
editor.putString(PreferenceKeys.LAST_STREAM_VIDEO_ID, videoId)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getLatestVideoId(): String {
|
fun getLatestVideoId(): String {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user