#23926 closed enhancement (fixed)
Use ID3 data for audio and video
Reported by: | wonderboymusic | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
Since we are parsing ID3 tag data into attachment metadata, we should use it to pre-fill audio / video data in the media library. We should also display some of the data on the attachment edit page.
Attachments (12)
Change History (22)
#1
@
12 years ago
#2
@
12 years ago
In 23926.diff, i18n is missing in lines 240 to 248.
#3
@
12 years ago
23926.2.diff adds more i18n - I also need to add video handling, I need to upload a real mp4 from iTunes to see what is showable
#4
@
12 years ago
23926.4.diff is DRY'd - video ID3 doesn't return much printable data, it doesn't need to pre-fill on upload
#5
@
12 years ago
23926.9.diff is wonderboymusic's patch reformatted with some better i18n. It treats each possible variation of the title, album and artist as a whole, rather than concatenating bits together.
I've also added an extra check to the track number because I noticed some of my MP3s have a track number of just "x" instead of "x/y". Added number_format_i18n()
in there too for super maximum i18n.
#6
@
12 years ago
_x( '“%1$s” by %2$s.', 'Audio track title by artist name' )
As noted by nacin, this is not the right use of context.
It's only needed for ambiguous strings with different context. See '%1$s %2$s'
in get_calendar()
and wp_insert_user()
for example:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/general-template.php#L1145
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/user.php#L1346
A translator's comment should be used instead, like in feed_links_extra()
:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/general-template.php#L1621
#7
@
12 years ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed
In 23979:
#8
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The regex in r23979 '#^audio|video#'
is too permissive. It seems as if it was intended to match audio* and video*, but it actually matches application/octet-stream+video
just fine. Not a big deal in this particular situation, but .12.diff takes care of that.
Here is a generic video that has some extra data: http://cl.ly/image/0P3K1j47130z
Here is an audio file with more data: http://cl.ly/image/0E1j0L041h0J
The patch also contains code that constrains video dimensions on the edit attachment page so a large video doesn't explode all over the page