Handle metadata discovery at creation of AudioObjects#793
Open
Oowoosh0 wants to merge 3 commits intoelementary:mainfrom
Open
Handle metadata discovery at creation of AudioObjects#793Oowoosh0 wants to merge 3 commits intoelementary:mainfrom
Oowoosh0 wants to merge 3 commits intoelementary:mainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
cd1839c to
afd600b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
danirabbit
reviewed
Apr 18, 2025
Member
danirabbit
left a comment
There was a problem hiding this comment.
Definitely cleans up the PlaybackManager. Adding a MetadataDiscoverer singleton makes sense to me. Just one question
Comment on lines
+25
to
+52
| public void update_metadata (Gst.PbUtils.DiscovererInfo info) { | ||
| duration = (int64) info.get_duration (); | ||
|
|
||
| unowned Gst.TagList? tag_list = info.get_tags (); | ||
|
|
||
| string _title; | ||
| tag_list.get_string (Gst.Tags.TITLE, out _title); | ||
| if (_title != null) { | ||
| title = _title; | ||
| } | ||
|
|
||
| string _artist; | ||
| tag_list.get_string (Gst.Tags.ARTIST, out _artist); | ||
| if (_artist != null) { | ||
| artist = _artist; | ||
| } else if (_title != null) { // Don't set artist for files without tags | ||
| artist = _("Unknown"); | ||
| } | ||
|
|
||
| var sample = get_cover_sample (tag_list); | ||
| if (sample != null) { | ||
| var buffer = sample.get_buffer (); | ||
|
|
||
| if (buffer != null) { | ||
| texture = Gdk.Texture.for_pixbuf (get_pixbuf_from_buffer (buffer)); | ||
| } | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
These properties are all publicly settable so why do this here instead of in the MetadataDiscoverer?
Contributor
Author
There was a problem hiding this comment.
Yes this probably should be moved into the MetadataDiscoverer. Sorry I didn't have much time the last 2 weeks, but I'll have a lot more time from wednesday onward to update this.
Contributor
|
New conflict to resolve @Oowoosh0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #693
Fixes #775
Closes #697