Commit graph

258 commits

Author SHA1 Message Date
Serial
e01d875e05
Remove unwraps; Stop taking references to Copy types 2022-02-19 10:14:14 -05:00
Serial
e66ab4587d
Finalize Accessor and TagExt documentation 2022-02-19 09:39:09 -05:00
Serial
4c0b7c2273
Add rtng atom support 2022-02-18 08:50:39 -05:00
Serial
19b46c6a96
Add a special case for plID atom 2022-02-17 18:53:51 -05:00
Serial
6bb0427c84
Make all property structs non-exhaustive 2022-02-14 21:19:05 -05:00
Serial
d73173fb84
Add extra check to tag_reader example; Reorganize test assets 2022-02-13 13:15:27 -05:00
Serial
a179cfe736
Start work on TagIO trait
This is the start of making Lofty more general purpose, allowing for the creation of custom tags.

This also makes `TagType::remove_from*` fallible, which makes much more sense.
2022-02-02 22:10:04 -05:00
Serial
c1725de93d
Add Speex support 2022-01-31 18:19:11 -05:00
Alex
e0ea0eb67a
Merge pull request #33 from sagudev/wave-depth
Fix `WavProperties` reading
2022-01-24 13:57:55 -05:00
Serial
7301b1c9b0 Rename M4A test assets 2022-01-24 11:18:49 -05:00
Serial
d9174697d3 Fix MP4 audio bitrate 2022-01-24 11:05:12 -05:00
sagudev
3d26e34514 fmt 2022-01-24 16:38:18 +01:00
sagu
6325665ab2
Merge branch 'main' into wave-depth 2022-01-24 16:35:24 +01:00
sagudev
bd896287b6 bit-depth for ALAC and getter for wav 2022-01-24 06:35:15 +01:00
sagudev
e0f075a912 Add testing against hound 2022-01-23 13:37:13 +01:00
sagudev
c8c84e6660 hound testing 2022-01-23 12:32:51 +01:00
sagudev
23cf587940 bit_depth test 2022-01-23 07:40:26 +01:00
sagudev
29378f53a5 bit_depth prototype 2022-01-22 19:54:42 +01:00
localthomas
3783bfbbb8 renamed test asset file 2022-01-21 17:21:47 +01:00
localthomas
47a28402db
added frame sync search for MP3 reading
The first MP3 frame behind metadata blocks is found by searching for frame sync bits.
This skips junk bytes between any metadata blocks and the first MP3 frame.
2022-01-21 14:52:32 +01:00
Serial
f42dfb50bf Add ItemKey mappings for new AIFF chunks 2022-01-08 07:42:28 -05:00
Serial
5389efa386 Add real world ID3v2 tests for all versions 2022-01-06 21:06:02 -05:00
Serial
8bfca44fb1 Add GeneralEncapsulatedObject tests 2022-01-06 18:15:47 -05:00
Serial
e640eb0d42 Add SynchronizedText tests 2022-01-06 18:00:33 -05:00
Serial
a49a655f55 Add unstable rustfmt options 2022-01-05 13:26:56 -05:00
Serial
94e5ed635f Add Tag::dump_to 2022-01-05 12:50:54 -05:00
Serial
76e788243f Read AIFF COMT chunks 2022-01-04 15:03:24 -05:00
Serial
a5039e4198 Read AIFF ANNO chunks 2022-01-03 21:15:48 -05:00
Serial
d7872c671e Allow multi-item insertion for Tag, add Tag::take 2022-01-03 21:13:51 -05:00
Serial
a8e0edc16d Fix OOM in Picture::from_flac_bytes 2022-01-03 08:48:39 -05:00
Serial
612a8b062e Preserve track/disc numbers when converting Ilst 2022-01-02 17:12:16 -05:00
Serial
d312f48406 Fix Tag -> Id3v2Tag conversion 2021-12-30 23:20:08 -05:00
Serial
c29b0012ed Fix METADATA_BLOCK_PICTURE parsing/writing 2021-12-22 17:21:15 -05:00
Serial
a7d9deaa14 Make property reading optional 2021-12-21 20:20:24 -05:00
Serial
ca0ee7d6b8 Cleanup 2021-12-10 18:43:34 -05:00
Serial
379042cd10 More work on docs 2021-12-06 20:04:22 -05:00
Serial
45fd0c7ed9 Start documentation 2021-12-05 18:05:14 -05:00
Serial
733710f8ca Overhaul Probe 2021-12-05 17:02:22 -05:00
Serial
afdfc09873 Reorganize file tests 2021-12-01 21:00:12 -05:00
Serial
c72857c3d7 Add tag conversion tests 2021-11-28 12:55:11 -05:00
Serial
5638326ff2 Add tests for reading individual tag formats 2021-11-27 13:28:40 -05:00
Serial
60e1579bb2 Add overall bitrate, create file property tests 2021-11-26 15:17:02 -05:00
Serial
c0d130512b Remove references to pictures module 2021-11-24 17:09:12 -05:00
Serial
fe6de2d531 Add tests for ID3v2.2 pictures 2021-11-23 20:08:11 -05:00
Serial
39021e9ba1 Add missing test assets 2021-11-23 19:32:36 -05:00
Serial
eba7efc013 Add tests for Picture -> bytes methods 2021-11-23 19:29:07 -05:00
Serial
a8a6b27ff9 Add tests for format specific Picture parsers 2021-11-23 18:54:57 -05:00
Serial
1113e711ba Add Picture::from_reader, remove Picture::new 2021-11-23 12:41:57 -05:00
Serial
9878e89b33 Add PictureInformation tests 2021-11-22 17:14:02 -05:00
Serial
667d0e3bbf Cleanup chunk reading 2021-11-22 04:24:07 -05:00
Serial
cc70acef18 Add missing text assets 2021-11-21 16:36:38 -05:00
Serial
244b2adc62 Remove old test assets 2021-11-21 16:32:41 -05:00
Serial
4a5bfe4637 Remove TextEncoding from Picture 2021-11-21 16:30:03 -05:00
Serial
bc0c246dbf Add format specific tag structs
This allows for the use of format-specific elements, such as ID3v2 frame headers
2021-11-21 15:18:19 -05:00
Serial
e84731c375 Add format specific audio property structs 2021-10-01 19:30:51 -04:00
Serial
11d4d55dc8 Add Tag::remove_from, get_string, and get_binary 2021-10-01 17:59:53 -04:00
Serial
c2b76462ff Add ID3v2 writing 2021-09-26 22:36:20 -04:00
Serial
2e9392196c Add MP4 ilst writing 2021-09-07 01:09:16 -04:00
Serial
07f9724e4e Cleanup tests, fix RIFF INFO reading 2021-09-06 10:41:24 -04:00
Serial
ec2ecb1ef2 Add missing test asset 2021-09-06 08:38:35 -04:00
Serial
daf24ed2cc Add APE tag writing 2021-09-05 18:48:51 -04:00
Serial
7aa96ad0bb Add back RIFF INFO writing 2021-09-05 14:15:15 -04:00
Serial
3eeb08f50a Restructure iff module, cleanup 2021-09-04 21:18:11 -04:00
Serial
4dc0a824ca Add back FLAC writing, restructure ogg module 2021-09-04 20:55:01 -04:00
Serial
4dc0ea8d13 Add AIFF text chunk writing 2021-09-03 16:30:10 -04:00
Serial
fd1984b844 Add back OGG Opus/Vorbis writing 2021-09-03 15:37:37 -04:00
Serial
77278111a1 Update test assets, remove old tests 2021-09-02 20:07:44 -04:00
Serial
419f8457a3 Start work to expose all tags 2021-08-02 17:25:31 -04:00
Serial
b4ef26904f Actually read pictures correctly 2021-08-01 22:55:37 -04:00
Serial
b390b62297 Update test assets 2021-07-31 22:57:18 -04:00
Serial
b64091d649 Add APE property reading, remove ape as a dependency 2021-07-31 21:33:52 -04:00
Serial
a739dcd28e Add test for MP4 property reading 2021-07-30 15:13:32 -04:00
Serial
93d0431134 Add MPEG property reading 2021-07-29 21:07:08 -04:00
Serial
40c73050ee Clippy 2021-07-28 19:10:59 -04:00
Serial
efd4239c5a Rebase and update changes 2021-07-28 18:53:50 -04:00
Serial
66b5bbd081 Add Tag::remove_from 2021-07-19 20:32:36 -04:00
Serial
65b5f131aa Add AudioTagEdit::tag_type
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-10 20:24:12 -04:00
Serial
68ff71c889 Add tests for encoder methods
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-10 12:53:16 -04:00
Serial
3e2d9abcae Add lyricist and composer methods
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-09 12:11:16 -04:00
Serial
edd315467f Separate date and year methods
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-09 11:57:54 -04:00
Serial
10ca5c0295 Create AudioTagEdit methods with macros, remove useless methods, rename unclear methods
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-09 11:45:37 -04:00
Serial
4cdc4a7589 Change bpm to return u16 because of mp4ameta
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-09 11:08:24 -04:00
Serial
7fe21b0315 Add lyrics and bpm methods
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-08 22:46:18 -04:00
Serial
b4d8c3657d Add genre methods
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-08 22:07:59 -04:00
Serial
12b97fa44f Fix aiff writing
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-08 20:10:28 -04:00
Serial
cb725e882d Add copyright methods
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-08 19:16:38 -04:00
Serial
3a88dcda87 Forgot to add test asset
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-07 17:34:04 -04:00
Serial
e949d2bb85 Add support for AIFF chunks
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-07 17:29:53 -04:00
Serial
25f0341757 Fix ape panic
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-05 23:15:45 -04:00
Serial
e103a481df No longer store artists in a Vec, and stop assuming the delimiter
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-07-05 20:49:19 -04:00
Serial
445d5751b6 Make OggTag::write_to guess the format from the file content, finish up fixing features
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-30 01:00:40 -04:00
Serial
3eac3b5bc2 Continue to fix feature issues
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-29 23:38:20 -04:00
Serial
cc8a0a21d5 Rename VorbisTag, fix feature issue
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-29 23:18:54 -04:00
Serial
fb531877ac Add conversion tests
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-29 14:51:49 -04:00
Serial
845456b9c7 Fix spacing
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-29 14:45:57 -04:00
Serial
0828c2d6a2 Update test assets
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-27 14:31:01 -04:00
Serial
bd74d403ea Update tests for covers
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-26 15:39:11 -04:00
Serial
63a92c87ef Fix writing to flac + some cleanup 2021-05-19 15:01:44 -04:00
Serial
0d5724d661 Pictures now parse properly 2021-05-19 01:00:18 -04:00
Serial
a6d49fd9ce Support new pictures and proc macro 2021-05-18 22:26:27 -04:00
Serial
d03f206d5a Rename features 2021-05-16 23:07:26 -04:00
Serial
36d9d5195a Partial cover support for MP4
Since MP4 doesn't let you differentiate one image from another, all images are PictureType::Other, and all back_cover functions are aliases for front_cover.
2021-05-16 21:46:05 -04:00
Serial
16f4ecce0d Cover support for ape 2021-05-16 21:12:38 -04:00
Serial
29ff3d8030 Start work to support back covers
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-16 13:16:57 -04:00
Serial
ccf9367b4e Support multiple picture types
This will be used in the future, for now only the front cover is accessible. This doesn't fully work for opus due to opus_headers only storing a single k/v pair.

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-15 23:44:10 -04:00
Serial
c285b36629 Album cover support for ogg/opus/flac 2021-04-23 21:15:33 -04:00
Serial
c182b293fb Fix all clippy errors 2021-04-22 22:57:47 -04:00
Serial
c372a491a7 Make clippy happy 2021-04-22 22:50:13 -04:00
Serial
754bf03413 Make things less confusing to use 2021-04-22 18:01:09 -04:00
Serial
bd48066b64 Add extra verification to tests 2021-04-22 13:56:51 -04:00
Serial
186d540d00 Clippy 2021-04-22 12:59:16 -04:00
Serial
dc23ec1ffd Support AIFF 2021-04-22 12:57:20 -04:00
Serial
fbfe0e916b Cleanup 2021-04-22 11:15:19 -04:00
Serial
6b770dc14c Give features better names 2021-04-21 14:22:52 -04:00
Serial
90161287ab Add some benchmarks for reading from extension/signature 2021-04-21 13:48:21 -04:00
Serial
05c7ac6d04 Support ID3 tags in RIFF chunks 2021-04-21 12:49:27 -04:00
Serial
253609cc4b Add the ability to guess file format from file signature
Adds a new DetermineFrom enum to be used in Tag::read_from_path. This allows you to choose between guessing from extension or file signature.
2021-04-20 23:06:03 -04:00
Serial
baa1b1fd24 Hopefully the last time the test assets need to be updated 2021-04-20 20:51:12 -04:00
Serial
8c79ea46cb Managed to delete the test assets again 2021-04-20 12:08:44 -04:00
Serial
cdfa5de045 Forgot to remove old album_artists_vec method for Mp4Tag 2021-04-20 12:06:39 -04:00
Serial
df2e728974 Merge remote-tracking branch 'origin/main' 2021-04-18 15:39:13 -04:00
Serial
f5c743f3aa Finish all methods except for album covers
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-18 15:32:59 -04:00
Alex
c8bdca8ea5
New wav test asset 2021-04-18 14:38:37 -04:00
Alex
71cb4ffd69
Remove old (broken) WAV test asset 2021-04-18 14:37:58 -04:00
Serial
4cc33b5e53 Start work on wav decoding
Very few IDs supported right now, test doesn't work yet, and this only supports RIFF INFO chunks, ID3 has to wait for https://github.com/polyfloyd/rust-id3/pull/64

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-17 15:42:06 -04:00
Serial
a0e7a31322 Add test assets to gitignore
Forgot to do this earlier

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-15 13:33:50 -04:00
Serial
001c33bf86 Implement read/write for ape
Quite a few weird things had to be done due to the ape crate's choices, and ape's lack of a standardized set of keys, but it all seems to work.

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-15 13:26:06 -04:00
Serial
04a9ab4634 Clippy and some more doc comments
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-15 11:53:10 -04:00
Serial
ae81ff21e9 Clippy and misc cleanup
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-14 12:17:38 -04:00
Serial
0ec56ca015 Created conversion for VorbisTag -> metaflac::Tag
This fixes write_to for flac.

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-14 11:14:08 -04:00
Serial
f956dfd3e2 Working (rough) implementation of write_to for ogg
ogg can now successfully be read from and written to. This breaks all other tests currently.

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-13 23:29:13 -04:00
Serial
7c72287586 Created conversion for metaflac::Tag -> VorbisTag, fixed inner test 2021-04-06 22:33:39 -04:00
Serial
702f6617c5 VERY rough implementation of a single VorbisTag struct for all formats using vorbis comments, seems to work so far. 2021-04-06 20:57:30 -04:00
Serial
f9d8981ca2 Fix existing tests 2021-04-06 16:37:31 -04:00
Serial
0a9d87553f Move assets to tests folder 2021-04-03 23:32:54 -04:00
Serial
9950eea7fa Start work to use Album struct in AnyTag
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 22:38:48 -04:00
Serial
4e33e9edaa Implemented read_from_path and a test for opus
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 14:31:13 -04:00
Serial
521f53a9a7 Added extra tests for future formats, ogg test passes
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 14:00:21 -04:00
Serial
555819e6a8 Initial work
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-02 20:47:44 -04:00
Tianyi
1206194d5f 0.2.7182 2020-10-29 18:01:21 +00:00
Tianyi
aa945ae7b6 it worked! From dyn Tag into any concrete tag without cloning 2020-10-29 13:26:35 +00:00
Tianyi
6e10a0b93d use TryFrom instead of From for downcasting because it could fail 2020-10-27 22:55:45 +00:00
Tianyi
0418d98955 impl downcasts
just accidentally discovered that I could write impl From<Box<dyn xxx>>
2020-10-27 22:24:05 +00:00
Tianyi
ff2e0c6959 RTFM 2020-10-27 20:26:59 +00:00
Tianyi
f65addee9b RTFM 2020-10-27 19:57:27 +00:00
Tianyi Shi
fececf76e9 black magic 2020-10-27 15:33:19 +00:00
Tianyi Shi
47ae10071a downcast 2020-10-27 15:24:54 +00:00
Tianyi Shi
c72f09d3e2 add frominner and intoinner traits 2020-10-27 15:00:22 +00:00
Tianyi Shi
873a6e831d refactor 2020-10-27 14:38:31 +00:00
Tianyi Shi
d0b2409164 remove cow 2020-10-27 12:43:32 +00:00