Welcome, Guest
Try to get help from other ComicRack for Android users

TOPIC: Add leading zeroes to metadata (batch)

Add leading zeroes to metadata (batch) 3 months 4 weeks ago #47897

  • alfablac
  • alfablac's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
I already got Library Organizer to pad the numering on Windows. Which makes it sort correctly.
I want to add this to the metadata, since when I export the files to Android they are sorted incorrectly as 1, 10, 11,..., 2, 20, etc.

Is there any plugin that batch adds leading zeroes to the metadata itself (not on the filename)?
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 3 weeks ago #47899

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 760
  • Thank you received: 248
  • Karma: 55
You could use Data manager.

This basic example uses some assumptions but the logic could give you a start. I also split the rules for integers and decimals in case you want to alter the way you do decimals:


File Attachment:

File Name: NumberPadding.zip
File Size:1 KB
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 3 weeks ago #47901

  • Reason
  • Reason's Avatar
  • Offline
  • Junior Boarder
  • Posts: 28
  • Thank you received: 1
  • Karma: -1
or you could just use Library organizer and rename them
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 3 weeks ago #47904

  • alfablac
  • alfablac's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
Reason wrote:
or you could just use Library organizer and rename them

Library Organizer doesn't affect the metadata, only the filenames.
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 3 weeks ago #47905

  • alfablac
  • alfablac's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
jkthemac wrote:
You could use Data manager.

This basic example uses some assumptions but the logic could give you a start. I also split the rules for integers and decimals in case you want to alter the way you do decimals:


File Attachment:

File Name: NumberPadding.zip
File Size:1 KB

Tried crDataMan_v1.2.4r219
Numbers can't be changed by a tag like {Number} or any other, only changed by integers.

And DataManager_2.04.05.r785
If I try {Number}, the process hangs. If I try Number for example, the metadata changes.

I gonna need a version that accepts the changes. lol
Last Edit: 3 months 3 weeks ago by alfablac.
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 3 weeks ago #47907

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 760
  • Thank you received: 248
  • Karma: 55
I have it working on 2.04.05.r785?

But note I am not trying to change Number with {Number}, I copy number to a text based field and then copy it back once I have padded it.

What happens if you delete all of the rules apart from move? Does that copy the number to BookNotes OK?
Last Edit: 3 months 3 weeks ago by jkthemac.
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 3 weeks ago #47921

  • alfablac
  • alfablac's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
jkthemac wrote:
I have it working on 2.04.05.r785?

But note I am not trying to change Number with {Number}, I copy number to a text based field and then copy it back once I have padded it.

What happens if you delete all of the rules apart from move? Does that copy the number to BookNotes OK?

I did understand the code/script.
Problem is {Number} does not work on this version, at least for me. Not sure what I'm doing wrong.
Did even try to rewrite the rules selecting other fields like Review or Book Condition, but it still didn't work.
I was able to copy the Number field using {Number} on v1.2.4r219 but on 2.04.05.r785 it doesn't work.
Though trying random numbers or even the text "Number" works on 2.04.05.r785.
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 3 weeks ago #47922

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 760
  • Thank you received: 248
  • Karma: 55
That is very odd. The only difference to the standard version for me is that I have implemented the fix that still isn't in the released version see <here>. That may explain why mine is working and yours isn't.
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 3 weeks ago #47932

  • alfablac
  • alfablac's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
jkthemac wrote:
That is very odd. The only difference to the standard version for me is that I have implemented the fix that still isn't in the released version see <here>. That may explain why mine is working and yours isn't.

Probably.
I just need to put that new code on the dmclasses file?
I tried that but still didn't work.
The administrator has disabled public write access.

Add leading zeroes to metadata (batch) 3 months 2 weeks ago #47933

  • rmagere
  • rmagere's Avatar
  • Offline
  • Gold Boarder
  • Posts: 219
  • Thank you received: 23
  • Karma: 6
An alternative brute force solution:
1) use Library Organizer to make sure you have your leading zero added (as per previous post)
2) use Priat to import the number into the metadata from the new filename (ensuring the regex captures the leading zero)

Also:alfablac wrote:
I want to add this to the metadata, since when I export the files to Android they are sorted incorrectly as 1, 10, 11,..., 2, 20, etc.
I actively remove leading zeros (as duplicate on thinks issue 5 is different from issue 05) - however I have never had the issue of Comicrack on Android getting the reading order wrong (i.e. 1, 10, 11, 2, 20 etc)
Last Edit: 3 months 2 weeks ago by rmagere.
The administrator has disabled public write access.
Time to create page: 0.342 seconds

Who's Online

We have 181 guests and 4 members online