Skip to content
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

Closed
wants to merge 12 commits into from

Conversation

themodfatherinc
Copy link
Contributor

add tags to database, live and new icons added to stream mask
Stream Mask adjustments, current program showing instead of playlist title

mac added 8 commits May 9, 2024 15:11
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
@oxyroid
Copy link
Owner

oxyroid commented May 10, 2024

@themodfatherinc There is a lot of code that needs to be modified

data/schemas/com.m3u.data.database.M3UDatabase/16.json Outdated Show resolved Hide resolved
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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that a standard? 🤔

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First time on British TV Last time on this channel these are all official xmltv tags which i added , will add the others.

Copy link
Owner

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

@@ -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,
Copy link
Owner

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.

@Composable
fun CustomTextIcon(
text: String,
textColor: Color,
Copy link
Owner

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.

Copy link
Owner

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
}

ui/src/main/java/com/m3u/ui/Player.kt Outdated Show resolved Hide resolved
@oxyroid
Copy link
Owner

oxyroid commented May 10, 2024

And you need to squash commits finally

data/src/main/java/com/m3u/data/parser/epg/EpgData.kt Outdated Show resolved Hide resolved


if (isNew) {
val indexOfSubstring = title.indexOf("ᴺᵉʷ")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad code

Copy link
Contributor Author

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

Copy link
Owner

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.

Copy link
Owner

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.

@@ -320,6 +322,19 @@ class StreamViewModel @Inject constructor(
}
}

internal suspend fun getProgrammeCurrently(channelId: String): Programme? {
Copy link
Owner

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

@oxyroid
Copy link
Owner

oxyroid commented May 10, 2024

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.

@oxyroid oxyroid closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants