Closed jokerrider007 closed 5 years ago
It doesn't matter. The ID doesn't need to start from 0; it only needs to be unique.
Can I clear object ID start from 0? l need to upload multiple files and each ASS object dialogues ID start From 0 before storing to the database.
If you're sure that you're going to only create and work with one ASS
object at a time (ie you're not going to create Dialogue
objects for multiple ASS
at the same time), then you can set Dialogue._lastDialogueId
to -1
before creating the next ASS
object. Every newly created Dialogue
object sets its id to ++Dialogue._lastDialogueId
Alternatively use the Dialogue
's index in the ass.dialogues
array as your database key instead of its id
property.
when I use libjass.ASS.fromUrl multiple time. ASS object dialogues ID will be created next to the last dialogues ID from previous ASS object.
How can I get ASS object dialogues ID doesn't relate form previous object?