mirror of
https://github.com/lizongying/my-tv.git
synced 2026-10-26 22:26:29 +08:00
remove guid store
This commit is contained in:
@@ -114,7 +114,7 @@ class Request(var context: Context) {
|
||||
tvModel.firstSource()
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "$title url error")
|
||||
Log.e(TAG, "$title url error $request")
|
||||
tvModel.firstSource()
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -60,7 +60,7 @@ class YSP(var context: Context) {
|
||||
sharedPref = (context as MainActivity).getPreferences(Context.MODE_PRIVATE)
|
||||
}
|
||||
|
||||
guid = getGuid()
|
||||
// guid = getGuid()
|
||||
}
|
||||
|
||||
fun switch(tvModel: TVViewModel): String {
|
||||
@@ -68,7 +68,7 @@ class YSP(var context: Context) {
|
||||
cnlid = tvModel.getTV().sid
|
||||
defn = "fhd"
|
||||
|
||||
// guid = getGuid()
|
||||
guid = getGuid()
|
||||
randStr = getRand()
|
||||
timeStr = getTimeStr()
|
||||
|
||||
@@ -99,13 +99,13 @@ class YSP(var context: Context) {
|
||||
}
|
||||
|
||||
private fun getGuid(): String {
|
||||
var guid = sharedPref?.getString("guid", "").toString()
|
||||
// var guid = sharedPref?.getString("guid", "")
|
||||
if (guid == "") {
|
||||
guid = generateGuid()
|
||||
with(sharedPref!!.edit()) {
|
||||
putString("guid", guid)
|
||||
apply()
|
||||
}
|
||||
// with(sharedPref!!.edit()) {
|
||||
// putString("guid", guid)
|
||||
// apply()
|
||||
// }
|
||||
}
|
||||
return guid
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user