Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Template not processing %1, %2, etc
stoff3
post Feb 21 2009, 04:58 PM
Post #1


Newbie
*

Group: Members
Posts: 5
Joined: 21-February 09
Member No.: 684



Hi,

I'm using the latest AMIP (I think) with Foobar 0.9.6.2, with the following Play & change callback:

CODE
/template:(input.txt) out.bat
/exec:(out.bat)


input.txt looks like this:
CODE
mysql --user=XXXXXX --password=XXXX --execute="INSERT INTO songs VALUES ('%1','%2',%sl,1) ON DUPLICATE KEY UPDATE plays = plays+1;" foobar


And when the template is processed, here's what out.bat looks like:

CODE
mysql --user=XXXXXX --password=XXXX --execute="INSERT INTO songs VALUES ('','',1564697344,1) ON DUPLICATE KEY UPDATE plays = plays+1;" foobar


I don't know if it's something obvious I'm missing, but it looks to me like it's not processing the tags correctly. Any ideas?


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Serge
post Feb 21 2009, 05:01 PM
Post #2


AMIP Developer
***

Group: Root Admin
Posts: 935
Joined: 12-March 06
Member No.: 1



Are you sure that your song files contain valid tags that AMIP can understand?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
stoff3
post Feb 21 2009, 05:11 PM
Post #3


Newbie
*

Group: Members
Posts: 5
Joined: 21-February 09
Member No.: 684



QUOTE(Serge @ Feb 21 2009, 06:01 PM) *

Are you sure that your song files contain valid tags that AMIP can understand?

Yes. As it is now, I have 16 plays logged in the songs database, all with blank artist/title and that weird song length.

I would really like to get this working, so I can continue developing it and breaking my dependence on Last.fm smile.gif

EDIT: I can use AMIP with mIRC just fine, so the tags should be fine.

Second edit: Oh man, that's embarassing. You were right, I was wrong. The songs I was playing were from a .cue sheet, which messed up the tags. When I played a normal .mp3 song, everything worked as it should.

Any tips for getting cue songs to work properly? :/
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Serge
post Feb 21 2009, 05:57 PM
Post #4


AMIP Developer
***

Group: Root Admin
Posts: 935
Joined: 12-March 06
Member No.: 1



You can't get individual tags from the .cue. AMIP doesn't support it. The maximum you can get is the %s standing for the title returning by your player. If it's configurable in the player, you can put there all the info you need and then parse %s in the script to get individual fields to include into the database.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
stoff3
post Feb 21 2009, 06:43 PM
Post #5


Newbie
*

Group: Members
Posts: 5
Joined: 21-February 09
Member No.: 684



QUOTE(Serge @ Feb 21 2009, 06:57 PM) *

You can't get individual tags from the .cue. AMIP doesn't support it. The maximum you can get is the %s standing for the title returning by your player. If it's configurable in the player, you can put there all the info you need and then parse %s in the script to get individual fields to include into the database.


All right, I can swing that. Thanks a bunch man, have a nice weekend.
User is offlineProfile CardPM
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: