-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream Mask and DB Updates #144
Conversation
2 methods for detection, Substring Annotation on the Title, or XMLTV tags, add previously-shown tag start time to database add live and new tags to stream mask in full information player mode only adjust stream mask add currently playing program from epg data to stream mask
2 methods for detection, Substring Annotation on the Title, or XMLTV tags, add previously-shown tag start time to database add live and new tags to stream mask in full information player mode only adjust stream mask add currently playing program from epg data to stream mask
2 methods for detection, Substring Annotation on the Title, or XMLTV tags, add previously-shown tag start time to database add live and new tags to stream mask in full information player mode only adjust stream mask add currently playing program from epg data to stream mask
2 methods for detection, Substring Annotation on the Title, or XMLTV tags, add previously-shown tag start time to database add live and new tags to stream mask in full information player mode only adjust stream mask add currently playing program from epg data to stream mask
2 methods for detection, Substring Annotation on the Title, or XMLTV tags, add previously-shown tag start time to database add live and new tags to stream mask in full information player mode only adjust stream mask add currently playing program from epg data to stream mask
# Conflicts: # features/playlist/src/main/java/com/m3u/features/playlist/components/SmartphoneStreamItem.kt # features/stream/src/main/java/com/m3u/features/stream/StreamMask.kt # features/stream/src/main/java/com/m3u/features/stream/StreamScreen.kt
2 methods for detection, Substring Annotation on the Title, or XMLTV tags, add previously-shown tag start time to database add live and new tags to stream mask in full information player mode only adjust stream mask add currently playing program from epg data to stream mask
2 methods for detection, Substring Annotation on the Title, or XMLTV tags, add previously-shown tag start time to database add live and new tags to stream mask in full information player mode only adjust stream mask add currently playing program from epg data to stream mask
@themodfatherinc There is a lot of code that needs to be modified |
else -> skip() | ||
} | ||
} | ||
require(XmlPullParser.END_TAG, ns, "programme") | ||
// Add logic to determine whether the program is new based on title | ||
val isNew = title?.contains("ᴺᵉʷ") ?: false | ||
val isLive = title?.contains("ᴸᶦᵛᵉ") ?: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a standard? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its not xmltv standard but it is added by some providers instead of the and tags. this is just an additional method to find this data if its included, and the logic to decide looks at this and the tag and if either is true it will set it to true. this method will just support more users i think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not standard should not be adopted
features/playlist/src/main/java/com/m3u/features/playlist/components/SmartphoneStreamItem.kt
Outdated
Show resolved
Hide resolved
features/playlist/src/main/java/com/m3u/features/playlist/components/SmartphoneStreamItem.kt
Outdated
Show resolved
Hide resolved
features/stream/src/main/java/com/m3u/features/stream/PlayerActivity.kt
Outdated
Show resolved
Hide resolved
features/stream/src/main/java/com/m3u/features/stream/PlayerActivity.kt
Outdated
Show resolved
Hide resolved
features/stream/src/main/java/com/m3u/features/stream/StreamScreen.kt
Outdated
Show resolved
Hide resolved
@@ -60,6 +61,7 @@ import kotlin.time.Duration.Companion.minutes | |||
class StreamViewModel @Inject constructor( | |||
private val playlistRepository: PlaylistRepository, | |||
private val streamRepository: StreamRepository, | |||
private val programmeDao: ProgrammeDao, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use dao in the viewmodel.
features/stream/src/main/java/com/m3u/features/stream/components/CustomTextIcon.kt
Outdated
Show resolved
Hide resolved
features/stream/src/main/java/com/m3u/features/stream/components/CustomTextIcon.kt
Show resolved
Hide resolved
@Composable | ||
fun CustomTextIcon( | ||
text: String, | ||
textColor: Color, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should have a default value, Color.Unspecified
And in the code block, use takeOrElse method to get the LocalContentColor(maybe tv platform) if it's unspecified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example:
val actualContentColor = contentColor.takeOrElse {
if(!tv)
LocalContentColor.current
else
// import alias
LocalTvContentColor.current
}
features/stream/src/main/java/com/m3u/features/stream/components/CustomTextIcon.kt
Outdated
Show resolved
Hide resolved
And you need to squash commits finally |
features/stream/src/main/java/com/m3u/features/stream/StreamMask.kt
Outdated
Show resolved
Hide resolved
features/stream/src/main/java/com/m3u/features/stream/StreamMask.kt
Outdated
Show resolved
Hide resolved
features/stream/src/main/java/com/m3u/features/stream/StreamMask.kt
Outdated
Show resolved
Hide resolved
|
||
|
||
if (isNew) { | ||
val indexOfSubstring = title.indexOf("ᴺᵉʷ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats wrong? im using it to remove this line where i have the custom text icon because it doesnt need this information on both sides of the title. i did not want to edit it in the database as you suggested not to. you can choose to not include this code if you like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save the origin whatever it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your code will always drop the word after the "new". If some title start with it, the result will be a blank.
features/stream/src/main/java/com/m3u/features/stream/StreamScreen.kt
Outdated
Show resolved
Hide resolved
@@ -320,6 +322,19 @@ class StreamViewModel @Inject constructor( | |||
} | |||
} | |||
|
|||
internal suspend fun getProgrammeCurrently(channelId: String): Programme? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the param. We can know that in the viewmodel
I think one PR should not make so many adjustments. Document research or parsing rule code adjustments can be submitted through PR. Just let me do the UI adjustments or database migrations. It is very simple but requires special attention. In addition, if the master branch is refactored before you submit your large PR, it will be difficult for you to deal with the conflict. |
add tags to database, live and new icons added to stream mask
Stream Mask adjustments, current program showing instead of playlist title