-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add PlayerRepository to media module #173
Conversation
media/src/main/java/com/google/android/horologist/media/model/MediaItemPosition.kt
Outdated
Show resolved
Hide resolved
media/src/main/java/com/google/android/horologist/media/model/MediaItem.kt
Show resolved
Hide resolved
media/src/main/java/com/google/android/horologist/media/model/MediaItem.kt
Show resolved
Hide resolved
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.
Nothing blocking and probably easier to have the next batch of discussions on incremental PRs.
90ec861
to
7da3900
Compare
media/src/main/java/com/google/android/horologist/media/model/Command.kt
Outdated
Show resolved
Hide resolved
media/src/main/java/com/google/android/horologist/media/model/MediaItemPosition.kt
Outdated
Show resolved
Hide resolved
val title: String? = null, | ||
val artist: String? = null |
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.
what is a media item that has neither title nor artist. Is this sth we want to support?
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.
@yschimke please see the above, I ported this way to follow the implementation in the media toolkit, was there any use case for that in mind?
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.
@dpreussler what would be your suggestion?
a) non-nullable title?
b) non-nullable title and artist?
c) keep both them nullable but enforce clients to provide one or the other via factory methods?
please let me know if you have a different idea in mind
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.
If we think in 95% of apps using this code we should avoid the hassle of nullability and require them. Maybe just a note that empty "", should be used if there legitimately isn't one.
There can be multiple artists (track artist, album artist) perhaps we should make this clear it's whatever we want for display? displayArtist. But I don't know, so happy to go with non nullable artist for now.
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.
made the changes re non nullable artist
good point re display artist, will land it as it is and we can evolve it from there as this require further discussion
WHAT
Add
PlayerRepository
and domain models tomedia
module.WHY
In order to have a
PlayerRepository
that is independent of Media3 dependencies.Checklist 📋