mp3agic
mp3agic copied to clipboard
added TXXX based tags support
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>
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.
Related to #55
Coverage decreased (-3.2%) to 60.007% when pulling 43a4827d322eaa59a7ddb06eef6d2ec86cccad08 on Code0987:master into 368fe1341bed0005d2de40b4bf99efc2318847e8 on mpatric:master.
Import fixed.
I'll write tests asap. Currently I'm not familiar with java tests much.
Let me know if you have any questions regarding java / JUnit testing, @Code0987
@hennr I've added test and updated code also. But I'm not sure if it's right!
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.
Coverage increased (+0.7%) to 62.093% when pulling 4f68fc655bc2bc645644921e02621d3459f13f97 on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.
@Code0987 I merged the upstream master into your fork and added some comments in the test. Could you update the test please?
Coverage increased (+0.7%) to 62.093% when pulling 051486f7d5c7d0c6d0dd9931b2a338b50f2b803e on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.
I followed your comments and have updated tests, let me know anything else to do.
Coverage increased (+0.7%) to 62.093% when pulling aaf7b5f9b3df9e92c35da8d1855cc156e0ab6763 on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.
Coverage increased (+0.7%) to 62.093% when pulling cdfc5235633d43c5093e6d2084f35e30388949f6 on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.
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 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.
OK, so we can change that to instance methods now?
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.
Ok, I'll see and update.
@hennr Yes we can change it. I'll update. And I'll update test also.
Coverage increased (+1.03%) to 62.439% when pulling 66bfa17fd424a1a9dbd12804efbb4af05cfb0ec1 on Code0987:master into 3bd2057dc36358ad9fab83033c249f612b802041 on mpatric:master.
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!
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..)
Coverage increased (+7.8%) to 69.207% when pulling 9ef8e1fe5bf0cb0d238e3d9e7988fef4389ce784 on Code0987:master into 00a620b60d26c248c043dd426772011345d27145 on mpatric:master.
Coverage increased (+7.8%) to 69.207% when pulling 9ef8e1fe5bf0cb0d238e3d9e7988fef4389ce784 on Code0987:master into 00a620b60d26c248c043dd426772011345d27145 on mpatric:master.
@mpatric @hennr What's the state on this?
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 ?