Skip to content
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

[Feature req.]Write tonie name and track names into filenames #29

Open
Mahelita opened this issue Feb 21, 2021 · 3 comments
Open

[Feature req.]Write tonie name and track names into filenames #29

Mahelita opened this issue Feb 21, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@Mahelita
Copy link

Currently, the .ogg files of backed-up tracks are named consecutively, e.g., ID-ID - Track #1.ogg.
Even if tonie name and track names are present in the JSON one can provide to teddy, the info is only included into the file metadata.
It would make handling the backup files much easier if these infos could be directly included into the filenames!
As a workaround, I am currently looking into extracting the .ogg metadata to automatically rename the .ogg files.
If I get to a result I'll post it here.
If anyone already has an automatic solution I'll gladly save time and use it :-)
Thanks!

@SciLor SciLor added the enhancement New feature or request label Feb 22, 2021
@steve8x8
Copy link
Contributor

steve8x8 commented Jan 6, 2023

I've been thinking about this... is this the right place for discussions?

If this gets implemented (perhaps controlled by an option switch), please keep track order by prefixing the new information by (at least) the track number (with two digits, see #51).

Checking the available information inside the ogg stream after decoding, I found that there are ARTIST and ALBUM entries in the (so called by ogginfo) "User comments section" for normal tonies; creative tonies setup with free content seem to lack them though. (I didn't use the -j tonies.json option to Teddy.exe for decoding, btw, this appears to have used the default one.)
If available they might be used for an extra directory structure (mimicking the one on the vendor site) - controlled by another switch? (Instead of ALBUM, also the tonieName might be used?)

I was missing track name or sequence number. Neither Teddy nor TeddyBench appear to provide them yet (there are only a few tags.Add() statements).
Perhaps it needs another issue to request those to be added - at least if there's information becoming available (via #30)?

@steve8x8
Copy link
Contributor

Since a second "mention" does not show up here: In #30 there are scraper scripts which return track lists. Let's have ARTIST, ALBUM and TRACK fields in the "User comments", and in a next step use them for friendlier filenames!

@steve8x8
Copy link
Contributor

steve8x8 commented Feb 1, 2023

Using a two-step approach this is already possible: -m info (among other information) outputs the tonie name (Header: JSON Name) and track titles (section Header: Chapters, prefixed with Track #xy and the track runtime).

Due to #51, I'd recommend to run rename 's~#~#0~' *#?.* in the target directory first (so filenames match the "info" track numbering), then extract the Track #xy part from the filename and grep that in the m info output ... (Check whether there's a title available at all!)

An all-in-one solution is clearly preferred, thus I'm holding back my (immature but working...) script now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants