mp3agic icon indicating copy to clipboard operation
mp3agic copied to clipboard

added TXXX based tags support

Open Code0987 opened this issue 7 years ago • 26 comments

Added a new class for TXXX style tags which have description and value as


<Header for 'User defined text information frame', ID: "TXXX">
Text encoding    $xx
Description    <text string according to encoding> $00 (00)
Value    <text string according to encoding>

ID3 Specs

Code0987 avatar Mar 23 '17 12:03 Code0987

Hi @Code0987 ,

thanks for your PR.

Could you please make this patch compile on travis-ci? There is an import used that is not available in the project. Also please add a test for your new code.

hennr avatar Apr 01 '17 20:04 hennr

Related to #55

hennr avatar Apr 01 '17 20:04 hennr

Coverage Status

Coverage decreased (-3.2%) to 60.007% when pulling 43a4827d322eaa59a7ddb06eef6d2ec86cccad08 on Code0987:master into 368fe1341bed0005d2de40b4bf99efc2318847e8 on mpatric:master.

coveralls avatar Apr 05 '17 20:04 coveralls

Import fixed.

I'll write tests asap. Currently I'm not familiar with java tests much.

Code0987 avatar Apr 05 '17 20:04 Code0987

Let me know if you have any questions regarding java / JUnit testing, @Code0987

hennr avatar Apr 05 '17 21:04 hennr

@hennr I've added test and updated code also. But I'm not sure if it's right!

Code0987 avatar Apr 09 '17 10:04 Code0987

Hi @Code0987 ,

yep, there are some things that should be changed. Add me as a collaborator to your forked project and we can work together on them.

hennr avatar Apr 10 '17 19:04 hennr

Coverage Status

Coverage increased (+0.7%) to 62.093% when pulling 4f68fc655bc2bc645644921e02621d3459f13f97 on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.

coveralls avatar Apr 10 '17 20:04 coveralls

@Code0987 I merged the upstream master into your fork and added some comments in the test. Could you update the test please?

hennr avatar Apr 10 '17 20:04 hennr

Coverage Status

Coverage increased (+0.7%) to 62.093% when pulling 051486f7d5c7d0c6d0dd9931b2a338b50f2b803e on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.

coveralls avatar Apr 10 '17 21:04 coveralls

I followed your comments and have updated tests, let me know anything else to do.

Code0987 avatar Apr 11 '17 18:04 Code0987

Coverage Status

Coverage increased (+0.7%) to 62.093% when pulling aaf7b5f9b3df9e92c35da8d1855cc156e0ab6763 on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.

coveralls avatar Apr 11 '17 18:04 coveralls

Coverage Status

Coverage increased (+0.7%) to 62.093% when pulling cdfc5235633d43c5093e6d2084f35e30388949f6 on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.

coveralls avatar Apr 11 '17 19:04 coveralls

Thanks @Code0987 Did you have a specific reason why you implemented most public methods in ID3v2TXXXFrameData as static methods? I would prefer to use instance methods and spare the useFrameUnsynchronisation parameter by re-using the unsynchronisation variable already held in the super class.

hennr avatar Apr 11 '17 19:04 hennr

@hennr No, I was just trying to keep all related code together, as it was a little different for custom tags then all other tags already implemented. I was using your work in a android project using gradle dependency, so I just copied this TXXX extra file, since I wanted not to overwrite over your code, that would break auto-updating and maybe license too.

Code0987 avatar Apr 11 '17 19:04 Code0987

OK, so we can change that to instance methods now?

hennr avatar Apr 11 '17 20:04 hennr

Another question: If your code goes upstream the API for most users would be something like this, right?

// given
Mp3File mp3File = new Mp3File("src/test/resources/v23tagwithchapters.mp3");
ID3v2 id3tag = mp3File.getId3v2Tag();
assertNull(id3tag.getCustomText("foo"));

// when
id3tag.setCustomText("foo", "bar");

// then
assertEquals("bar", id3tag.getCustomText("foo"));

This does not work for me at the moment. Could you add a test that uses the setter and getter of AbstractID3v2Tag? ID3v2TagTest would be a good place for that IMO.

hennr avatar Apr 11 '17 20:04 hennr

Ok, I'll see and update.

Code0987 avatar Apr 12 '17 18:04 Code0987

@hennr Yes we can change it. I'll update. And I'll update test also.

Code0987 avatar Apr 12 '17 18:04 Code0987

Coverage Status

Coverage increased (+1.03%) to 62.439% when pulling 66bfa17fd424a1a9dbd12804efbb4af05cfb0ec1 on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.

coveralls avatar Apr 13 '17 06:04 coveralls

Hi @Code0987 , thanks for fixing the code.

Are you willing to change the static methods as well? If so, @mpatric should have another look at this pull request. Cheers!

hennr avatar Apr 19 '17 11:04 hennr

To be consistent with how the code is currently structured, the static methods on ID3v2TXXXFrameData should rather be instance methods on AbstractID3v2Tag (even though AbstractID3v2Tag is getting too big... a refactor here is probably long overdue..)

mpatric avatar May 29 '17 14:05 mpatric

Coverage Status

Coverage increased (+7.8%) to 69.207% when pulling 9ef8e1fe5bf0cb0d238e3d9e7988fef4389ce784 on Code0987:master into 00a620b60d26c248c043dd426772011345d27145 on mpatric:master.

coveralls avatar Jun 01 '17 20:06 coveralls

Coverage Status

Coverage increased (+7.8%) to 69.207% when pulling 9ef8e1fe5bf0cb0d238e3d9e7988fef4389ce784 on Code0987:master into 00a620b60d26c248c043dd426772011345d27145 on mpatric:master.

coveralls avatar Jun 01 '17 20:06 coveralls

@mpatric @hennr What's the state on this?

dargmuesli avatar Jun 17 '22 22:06 dargmuesli

Hi

Its really too bad that you still did not approved this pull request. It works great and I encourage you to combine it.

Is there anything I can do to help in this matter ?

de5car7es avatar Nov 20 '22 08:11 de5car7es