Commit graph

280 commits

Author SHA1 Message Date
Serial
2b1b009c1a Update TagType in traits.rs
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-26 15:37:50 -04:00
Serial
0a7b327c03 Update tags
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-26 15:35:39 -04:00
Serial
730ce2ff6a Separate flac
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-26 15:33:17 -04:00
Serial
5dd38003d6 Separate Riff
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-26 15:32:51 -04:00
Serial
1448d8cca9 Fix modules missing feature conditions
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-26 15:06:39 -04:00
Serial
4ebf885eaa Reorder PictureType methods, fix Album comment
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-26 14:48:47 -04:00
Serial
ca0c03ddf1 Cleanup errors, add generic read_from_reader function, remove multiple useless File::open calls
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-26 14:46:30 -04:00
Serial
ce76d861b6 Less verbose README, fix comments
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-06-20 23:24:59 -04:00
Serial
8a09b90811 Change errors
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-25 17:22:53 -04:00
Serial
5f8e114f8e Ape no longer requires filepath
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-25 16:44:20 -04:00
Serial
9661092d3f Umbrella feature for ogg 2021-05-22 16:41:05 -04:00
Serial
338d90968c Uncheck write for opus since there's no multi-page support yet 2021-05-19 15:31:57 -04:00
Serial
18edf1eebc Improve docs 2021-05-19 15:25:09 -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
25368a428f Picture overhaul 2021-05-18 22:24:53 -04:00
Serial
81e561263e Remove old macros file 2021-05-18 22:22:55 -04:00
Serial
d03f206d5a Rename features 2021-05-16 23:07:26 -04:00
Serial
9637923284 Note 2021-05-16 22:30:23 -04:00
Serial
b9ee301756 Remove old TODOs 2021-05-16 21:49:46 -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
79cbbd5339 Make filepath an optional dependency
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-16 02:47:26 -04:00
Serial
7f0501d95d Add date method
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-16 02:41:16 -04:00
Serial
ce1f873fee Version 0.1.2
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-16 01:32:25 -04:00
Serial
9dccd733a2 Start tracking duration availability
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-16 00:44:05 -04:00
Serial
83a0f84b9e Fully document the crate
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-16 00:39:19 -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
028afaa9ee Only read RIFF INFO LISTs instead of all LISTs
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-05-15 20:57:31 -04:00
Serial
c285b36629 Album cover support for ogg/opus/flac 2021-04-23 21:15:33 -04:00
Serial
946d19e0e1 Fix links 2021-04-23 18:12:55 -04:00
Serial
1491ba55f0 Fix writing to opus 2021-04-23 18:09:36 -04:00
Serial
14c04f3ae8 Support writing to opus 2021-04-23 13:31:35 -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
202c9e91f0 Forgot to update feature list 2021-04-22 18:04:48 -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
afbdd35493 Add aif extension 2021-04-22 13:27:50 -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
b08efcc3ff Remove old lints 2021-04-21 14:58:53 -04:00
Serial
587de8f0a6 Comments for Vorbis/RiffFormat 2021-04-21 14:53:11 -04:00
Serial
3be3bf8880 Better table in README 2021-04-21 14:48:45 -04:00
Serial
79c03431bf Forgot to change TagType::Vorbis's features 2021-04-21 14:24:24 -04:00
Serial
6b770dc14c Give features better names 2021-04-21 14:22:52 -04:00
Serial
de334cc62b Clippy 2021-04-21 13:51:51 -04:00
Serial
90161287ab Add some benchmarks for reading from extension/signature 2021-04-21 13:48:21 -04:00
Serial
4d65545940 Update README 2021-04-21 13:03:06 -04:00
Serial
bc2bb8a92c Neater imports 2021-04-21 12:56:35 -04:00
Serial
05c7ac6d04 Support ID3 tags in RIFF chunks 2021-04-21 12:49:27 -04:00
Serial
4e01f98463 Use the correct names 2021-04-21 11:06:41 -04:00
Serial
297db6fbac Move some conversions to impl_tag macro 2021-04-20 23:14:17 -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
8ff6bb52c8 Start work on duration
Added a duration field to each tag struct, and implemented duration reading for mp3. All other tags return None for now.
2021-04-20 15:15:05 -04:00
Serial
0dd57cc4da Remove old trait 2021-04-20 12:21:09 -04:00
Serial
cdfa5de045 Forgot to remove old album_artists_vec method for Mp4Tag 2021-04-20 12:06:39 -04:00
Serial
e5231567cc Remove add_artist and add_album_artist
These were useless methods that shouldn't be handled by lofty anyway
2021-04-20 11:25:09 -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
Serial
e28b3b5f7f Remove unused unstable features
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-18 14:30:00 -04:00
Serial
d0a381278f Switch to using "/" as a separator
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-18 14:25:11 -04:00
Serial
b072f0b0e5 Finally separate VorbisTag::read_from_path from the other tags
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-18 14:07:26 -04:00
Serial
48e6182e3a WAV now rereads properly
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-18 13:45:53 -04:00
Serial
3df43317fd Forgot some MP4 extensions
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-18 00:24:32 -04:00
Serial
c886cc87be Implement read/write for WAV (RIFF INFO LIST)
This format is pretty limited, and a few non-standard IDs were used, so there's a high chance the data will be inaccurate. At least it works somewhat :)

Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-18 00:12:47 -04:00
Serial
511aa597b2 Would make sense to stop reading when the end is reached :)
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-17 17:09:32 -04:00
Serial
7797c1e92b Forgot to remove stuff from testing
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-17 15:45:40 -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
e59a41420b Much nicer supported formats table :)
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-16 16:02:12 -04:00
Serial
4d6f2db8e9 Ape is no longer TODO :)
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-15 13:40:54 -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
88ecd1c136 Forgot to delete the old files 2021-04-06 20:58:15 -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
c835687098 Actually use the correct name 2021-04-06 17:55:39 -04:00
Serial
9eda7096d2 Get rid of some warnings 2021-04-06 16:50:46 -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
2bf7daa918 Even more doc comments
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 22:46:58 -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
8c1f016e6d Forgot the opus sample
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 14:32:25 -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
4ba25553e1 Rename get/set functions
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 14:09:30 -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
271cc15fa1 Further improve docs
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 13:03:40 -04:00
Serial
fce2ade6ed Separate types
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 12:29:51 -04:00
Serial
cd96dfca0b Begin cleanup and reorganization
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 12:19:21 -04:00
Serial
de1422d7b3 Fix more docs
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-03 11:44:33 -04:00
Serial
070717fee5 Add functions to set/append artists and fix some doc comments.
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-02 21:43:32 -04:00
Serial
030ce9c822 Remove separate macro crate
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
2021-04-02 21:07:28 -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
e218f6c47d update manual 2020-10-27 23:18:03 +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 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
b955bb60c8 simplify 2020-10-27 14:19:10 +00:00
Tianyi Shi
0dca646968 refactor 2020-10-27 14:01:03 +00:00
Tianyi Shi
f233955413 simplify 2020-10-27 13:50:07 +00:00
Tianyi Shi
d0b2409164 remove cow 2020-10-27 12:43:32 +00:00
Tianyi
87a63d72e6 better config handling 2020-10-27 12:16:26 +00:00
Tianyi
d4af2dcb03 prevent clone 2020-10-27 12:01:15 +00:00
Tianyi
6abb1e9d4d config 2020-10-27 11:40:51 +00:00
Tianyi
d2d1bedafa v0.2.3 2020-10-27 02:40:57 +00:00
Tianyi
dfc8f4f395 convert artists 2020-10-27 02:08:05 +00:00
Tianyi
bf71a050df 0.2.2 2020-10-27 00:52:29 +00:00
Tianyi
b4f2ae38ef v0.2.1 2020-10-26 23:19:49 +00:00
Tianyi
0f4d6eeab5 better error handling 2020-10-26 23:19:27 +00:00
Tianyi
276302b607 better error handling 2020-10-26 23:16:04 +00:00
Tianyi
7450d36348 convert tags; 0.2.0 2020-10-26 20:43:11 +00:00
Tianyi
3b1280fcee cow 2020-10-26 15:37:10 +00:00
Tianyi
ec3f59e1f3 add remove artists 2020-10-26 10:47:45 +00:00
Tianyi
caabc9a3e5 refactor 2020-10-26 02:14:28 +00:00
Tianyi
5ea4cca24d fix 2020-10-26 01:42:12 +00:00
Tianyi
4b66c81297 clean 2020-10-26 01:18:49 +00:00
Tianyi
7b2390b170 fix 2020-10-26 00:54:47 +00:00
Tianyi
8d4d3fa4a5 0.1.0 2020-10-25 21:39:38 +00:00
Tianyi
5dffc0ee55 0.0.2 2020-10-25 16:29:14 +00:00
Tianyi
57171bd561 0.0.1 2020-10-25 14:58:50 +00:00