IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Duplicate Last Track, ...or perhaps a looping problem?
Alastair Gilfill...
post Mar 19 2012, 12:00
Post #1


Member


Group: Full Members
Posts: 5
Joined: 19-March 12
From: Sydney
Member No.: 16215
Mp3tag Version: 1b4



Hi. I'm working on my first source script with Puddletag 1.0.0 beta 4 (Linux) which supports MP3Tag source scripts. I'm just about finished and my problm shouldn't really affect the result but it's just a bug I'd like to fix.

I can pull all artist information adn track information but the final track of each album is shown twice! I was hoping maybe someone could spot if there's a problem with my loop or (avoiding the issue) if there's a way to drop the last entry from the track array. tongue.gif Here's the relevant code:

CODE
findline "<tracklist>"
joinuntil "</tracklist>"
do
outputto "TRACKS"
findinline "<track>"

outputto "TRACK"
findinline "<number>"
sayuntil "</number>"

outputto "TITLE"
findinline "<title>"
sayuntil "</title>"

outputto "LENGTH"
findinline "<length>"
sayuntil "</length>"

#outputto "UNSYNCEDLYRICS"
#findline "<lyrics>"
#sayuntil "</lyrics>"

say "|"
findinline "</track>"
while "<track>"


This gives me two "9 - Void" tracks. My XML source can be viewed here. Thanks in advance! w00t.gif

This post has been edited by Alastair Gilfillan: Mar 19 2012, 12:10
Go to the top of the page
 
+Quote Post
dano
post Mar 20 2012, 12:32
Post #2


Moderator


Group: Moderators
Posts: 5673
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.59a



PT has its own support forum. You should ask there.


--------------------
Go to the top of the page
 
+Quote Post
dano
post Mar 20 2012, 13:02
Post #3


Moderator


Group: Moderators
Posts: 5673
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.59a



Are you sure your code is correct? It is missing several
say "|" commands.

So at the moment it does not work with Mp3tag.

And please provide a raw xml sample without linebreaks and indent spaces.


--------------------
Go to the top of the page
 
+Quote Post
Alastair Gilfill...
post Mar 20 2012, 13:16
Post #4


Member


Group: Full Members
Posts: 5
Joined: 19-March 12
From: Sydney
Member No.: 16215
Mp3tag Version: 1b4



Thanks for getting back to me. From the Puddletag website, they're focussed on PyParser: tongue.gif
QUOTE
I won’t be supporting Mp3tag’s tag sources. ie. I won’t help you create them nor does puddletag have any useful debugging facilities for them.


It does work as you can see in the screenshot just it adds the last track twice. It shan't cause an issue during tagging as you can't tag track 10 as a duplicate of track 9 if there are only 9 tracks. Just aesthetic, as far as I can tell.

Raw XML: http://paste2.org/p/1946696
Screenshot: http://imgur.com/TdFC1
Source: http://minus.com/mbaVU0Dkgb/
Go to the top of the page
 
+Quote Post
dano
post Mar 20 2012, 14:22
Post #5


Moderator


Group: Moderators
Posts: 5673
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.59a



Well it looks like a puddletag specific issue so I can't really help you.

But I can post the modified code that works in Mp3tag:
CODE
findline "<tracklist>"
joinuntil "</tracklist>"
do

outputto "TRACKS"
findinline "<track>"

#outputto "TRACK"
#findinline "<number>"
#sayuntil "</number>"

#outputto "TITLE"
findinline "<title>"
sayuntil "</title>"
say "|"

outputto "_LENGTH"
findinline "<length>"
sayuntil "</length>"

#outputto "UNSYNCEDLYRICS"
#findline "<lyrics>"
#sayuntil "</lyrics>"

say "|"
findinline "</track>"
while "<track>"


--------------------
Go to the top of the page
 
+Quote Post
Alastair Gilfill...
post Mar 21 2012, 03:17
Post #6


Member


Group: Full Members
Posts: 5
Joined: 19-March 12
From: Sydney
Member No.: 16215
Mp3tag Version: 1b4



Thanks a lot for that. It hasn't fixed anything in Puddletag and now it doesn't get the track numbers but I'll get a Windows VM going and test it in MP3Tag.

This is for Metal-Archives (as you might have guessed) but I'd like to do this for other tag sources that similarly don't provide APIs and parse them on my server to coax XML out of them as you can see here because I think there's a lot of user frustration and probably a lack of adoption due to broken tag source scripts that require users to edit the script or replace it with a fixed one (if they find their way onto this forum) where as an external server is a controlled resource that can be updated in the event of site changes (like MAv2). Such a server could have multiple tag source administrators if it was believed that even one person couldn't handle the number of site changes that would break parsing. Has this been considered or are there legal implications?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th April 2014 - 09:24