#42017 closed enhancement (fixed)
Parse the creation date out of uploaded audio files
Reported by: | desrosj | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
This is a companion ticket to #35218 which adds parsing for the creation date out of uploaded video files, and will introduce wp_get_media_creation_timestamp()
.
The same should be done for audio files using the same function.
Attachments (5)
Change History (32)
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.
7 years ago
#5
@
7 years ago
- Keywords has-patch has-unit-tests added; needs-patch removed
In 42017.patch I added the same approach used in wp_read_video_metadata()
to wp_read_audio_metadata()
(see r41746). Also attached is a test file that should go in the tests/phpunit/data/uploads/
directory.
I talked this over with @blobfolio. The only other file type that may be worth checking is an AAC (Apple audio). I will run some tests on that format when I get a chance.
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
7 years ago
#8
@
7 years ago
Looks like the wp-includes/ID3/module.audio-video-asf.php
file has an anonymous function in it, so the tests do not pass on PHP 5.2 (https://travis-ci.org/desrosj/wordpress-develop/builds/284383012).
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
7 years ago
#12
@
7 years ago
- Keywords needs-testing added
Based on my testing, AAC files store the created date in the same location as mp4
and quicktime
files.
I did discover that you can't currently upload AAC
files, though. This was due to a missing mime type in wp_get_mime_types()
. I added a fix for that in 42017.2.patch. I can create a separate ticket for that issue if necessary.
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
7 years ago
#14
@
7 years ago
Per the discussion in the most recent media chat, I have separated the AAC
file fix in wp_get_mime_types()
into a separate patch (#42919). 42017.3.patch is a refreshed patch.
This ticket was mentioned in Slack in #core-media by mike. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
6 years ago
#20
@
6 years ago
- Milestone changed from 5.0 to 5.1
The ticket still applies cleanly and works. Punting to 5.1, though, as this falls outside of the 5.0 focuses.
This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.
6 years ago
#22
@
6 years ago
42017.diff is a slimmed down approach that does not add the WMA location for created timestamp parsing.
This will add support for created_timestamp
to MP4
and AAC
audio files.
This ticket was mentioned in Slack in #core-media by desrosj. View the logs.
6 years ago
#24
@
6 years ago
42017.diff looks good, and tests pass for me locally.
I uploaded a handful of test files to a site and debugged the raw ID3 data. Here is what that turned up:
MP3
,FLAC
:MPC
:MP4
:WMA
: