-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null reference exception using dump --format json on DRM protected file #25
Comments
Hey thanks for this detailed report.
Interesting approach :-)
Ah I see, I did not know that this is even a possibility. Unfortunately, due to this exception it is not possible to workaround this issue by using However, it would have been possible to use
So in a series of unfortunate events, I think you have to wait until this is fixed in the next release - I think I'll fix this pretty quick, but the next release will take some time. Can you build a latest code version on your own? Seems that I have to fix / add a few things here:
|
Well, it would have been better if I had found a utility that would just strip the encryption so I could play the audiobooks on non-iTunes players and not lose the chapters. :-)
Yes, I was able to comment out the offending line, build and run from within Visual Studio. I didn't spend a lot of time, but I would have to figure out how you created the portable exe version.
I'm not in a huge rush. I can wait until you get it fixed, and then I'll work on updating my library. This is a winter project anyways. :-) |
This is easy, take a look at https://github.com/sandreas/tone/blob/main/tone/build.sh (you have to adjust the runtime id) or simply fork and run
Great, then I can take the time to fix this and some other things. Thank you for the quick feedback. |
Ok, should be fixed in the latest commits - targeted for
to get a chapters.txt only dump, which then can be used for I would really appreciate feedback if this fixes it for you. |
Works like a charm! Either format will do what I need! Thanks for fixing it so quickly. |
Bumped atldotnet to 4.11 Improved release notes Fixed #25 by writing atldotnet errors to stderr
Trying to extract the chapters from a DRM protected file and write to a file so I can write them back into the non-DRM protected version. I can dump the chapters using the standard format, and manually edit this into a standard chapter format, but this is time consuming.
Trying this command so I can automate all files:
tone dump drmfilename.m4b --include-property chapters --format json > chapters.json
Then write back with this command:
tone tag nodrmfilename.m4b --meta-tone-json-file="chapters.json" --auto-import="tonejson"
When I try to dump the chapters with the json format I get a null reference exception. Debugging the application, turns out that track.ChannelsArragement is null on these files. So, the SerializeAsync method fails with the null reference exception on this line:
Channels = new { Count = track.ChannelsArrangement.NbChannels, Description = track.ChannelsArrangement.Description },
I tried it with this line commented out and I was able to write the file fine without the Channels info and the nodrm file kept its existing Channels info.
Great tool btw!
The text was updated successfully, but these errors were encountered: