Skip to content

Commit

Permalink
fixing "sequencenr" attribute in collection file
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrpfn committed Mar 14, 2022
1 parent a69bfa4 commit 02a92e5
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions ascmhl/chain_xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def parse(file_path):
current_object.hash_format = tag
current_object.hash_string = element.text
elif tag == "hashlist":
current_object.generation_number = element.attrib.get("sequencer")
current_object.generation_number = element.attrib.get("sequencenr")
chain.append_generation(current_object)
current_object = None

Expand Down Expand Up @@ -106,7 +106,7 @@ def _hashlist_xml_element_from_hashlist(hash_list: MHLHashList):
E.path(os.path.basename(hash_list.file_path)),
E.c4(hash_list.generate_reference_hash()),
)
hash_list_element.attrib["sequencer"] = str(hash_list.generation_number)
hash_list_element.attrib["sequencenr"] = str(hash_list.generation_number)

return hash_list_element

Expand All @@ -119,7 +119,7 @@ def _hashlist_xml_element_from_chaingeneration(generation: MHLChainGeneration):
E.path(generation.ascmhl_filename),
E.c4(generation.hash_string),
)
hash_list_element.attrib["sequencer"] = str(generation.generation_number)
hash_list_element.attrib["sequencenr"] = str(generation.generation_number)

return hash_list_element
else:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
<hashlist sequencer="2">
<hashlist sequencenr="2">
<path>0002_A002R2EC_2020-01-17_143000.mhl</path>
<c4>c45kfAU9bNHnT32pMzSdio6Qb7us3xkd65ff8uAvJcgdkpoQZUKoPFckwtVHozxgftZj4uUoXrRiAiwSqNGAxLUAKM</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
<hashlist sequencer="2">
<hashlist sequencenr="2">
<path>0002_A002R2EC_2020-01-17_143000.mhl</path>
<c4>c422u4PnnuStBK5Q9Wv4uFHagkFaK9AfZNcM4nbXuCKWTUikSWWfeeszSUnM2omfCoKnsZHJZNptSBZsumZMJy6Woy</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
<hashlist sequencer="2">
<hashlist sequencenr="2">
<path>0002_A002R2EC_2020-01-17_143000.mhl</path>
<c4>c444PGVUrtKnV3Gg3JeoUquS3Yjzz2aipSy81eLJgLSGCFJCkqSJ5hp9sJxDY97DmsMycSg9YRx7gcfrSK2j9f1AWK</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
<hashlist sequencer="2">
<hashlist sequencenr="2">
<path>0002_A002R2EC_2020-01-17_143000.mhl</path>
<c4>c45kfAU9bNHnT32pMzSdio6Qb7us3xkd65ff8uAvJcgdkpoQZUKoPFckwtVHozxgftZj4uUoXrRiAiwSqNGAxLUAKM</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A003R2EC_2020-01-16_091500.mhl</path>
<c4>c45zb4dbxTLtvaLg3hZX1ds9fc7RjKoi5UtQ4N9oFHo51v7mrhUJR8Kn5uY7aBjmkYwRN9bgF57A4LJM3nrN1dT5hQ</c4>
</hashlist>
<hashlist sequencer="2">
<hashlist sequencenr="2">
<path>0002_A003R2EC_2020-01-17_143000.mhl</path>
<c4>c42zP4mMY3CEpYEM9F9xde62ZbdmwRBc5gne7basp6RfZ11tZQxwcS95Gyhbrpea76em3aPE3Q823657oT27rrFYhB</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_Reels_2020-01-17_143000.mhl</path>
<c4>c43otc1g6jauN2XVh6wNU4sST4f52w9WAxwDHrCs4FtnuJSSvDo9SsZ5mofYWVfzKi37YFyu8Nhn8dCAkT1WjCATE9</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A002R2EC_2020-01-16_091500.mhl</path>
<c4>c43qQABrjeiU3kteaNFtgwufQRLKxgMJEZfNSj6LcZ8fKwB568U8As9eScRsnb64NfqiAYzjNUXs81tAxPB77PUThb</c4>
</hashlist>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_A003R2EC_2020-01-16_091500.mhl</path>
<c4>c45zb4dbxTLtvaLg3hZX1ds9fc7RjKoi5UtQ4N9oFHo51v7mrhUJR8Kn5uY7aBjmkYwRN9bgF57A4LJM3nrN1dT5hQ</c4>
</hashlist>
Expand Down
2 changes: 1 addition & 1 deletion xsd/ASCMHLDirectory.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<element name="path" type="ascmhl:RelativePathType"/>
<element name="c4" type="ascmhl:HashFormatType"/>
</sequence>
<attribute name="sequencer" type="integer"/>
<attribute name="sequencenr" type="integer"/>
</complexType>
<element name="ascmhldirectory" type="ascmhldirectory:DirectoryType"/>
</schema>
2 changes: 1 addition & 1 deletion xsd/examples/ascmhl_chain.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ascmhldirectory xmlns="urn:ASC:MHL:DIRECTORY:v2.0">
<hashlist sequencer="1">
<hashlist sequencenr="1">
<path>0001_TEST01_2019-10-11_155603.mhl</path>
<c4>c44pdRyHLMvHsYbJnRpTrh5ohdWW6uVbm4mZx421aTN7y9MUKk74TqyshmTLgvnq2tcZex6khpxrYUq87Hczcmnyq3</c4>
</hashlist>
Expand Down

0 comments on commit 02a92e5

Please sign in to comment.