|
View unanswered posts | View active topics
It is currently Sat May 25, 2013 6:51 am
Due to enormous amounts of spam, the forum has been set to read-only mode.
One for the XML pundits - playing a symphony
| Author |
Message |
|
KAM
Joined: Wed Oct 01, 2003 6:09 pm Posts: 1142 Location: Location: Location:
|
 Re: One for the XML pundits - playing a symphony
Tried... and failed. I've honestly no idea how to go about that Sorry Ken
|
| Thu Jun 30, 2011 10:00 pm |
|
 |
|
FredrikN
Site Admin
Joined: Fri Nov 22, 2002 3:52 pm Posts: 13748
|
 Re: One for the XML pundits - playing a symphony
You can use the SUM function. If Custom 10 is checked for the "start of work", this code will calculate the total length of the "work":
_________________ Fredrik Nordbakke www.fnprg.com
|
| Thu Jun 30, 2011 11:04 pm |
|
 |
|
KAM
Joined: Wed Oct 01, 2003 6:09 pm Posts: 1142 Location: Location: Location:
|
 Re: One for the XML pundits - playing a symphony
There you go, Litago!
There's some guy in Norway who seems to know more than we do about just about everything. Fortunately for us, he's always willing to help.
Thanks, Fredrik. I've only just spotted this and trying it out will have to wait until a full working day has passed.
Regards
Ken
|
| Fri Jul 01, 2011 8:02 am |
|
 |
|
KAM
Joined: Wed Oct 01, 2003 6:09 pm Posts: 1142 Location: Location: Location:
|
 Re: One for the XML pundits - playing a symphony
Hi Fredrik Just like to say thank you for the additional code. I had to make one slight modification - changing the "custom01" to "custom05" in my setup. Unfortunately I use 'custom01' in my database setup to hold the Opus No of a piece of music. This meant that when I tested your code I got results displayed but they weren't always consistent with what I expected. It might have been easier if I got no times displayed at all, or if they were always the wrong value, but this took me a little while to work out. I thought it was down to errors in my data - maybe an extra space here or a missing comma there - that made the names of works inconsistent. But then I realised what was happening. Everything works really well and better than I expected. Thank you to Litago too for the idea of displaying the length. I hadn't realised how useful that would be. Now I've just got one final tiny thing I can't resolve. If a work is only one track long I can't get my code to display the prompt to play it. I've attached an image to indicate what I mean. This is consistent across all albums. The code I'm using is - Custom05 is the field holding the Work name, and Custom10 is the field indicating the Start of a Work. Any suggestions anyone? Thank you and regards Ken
You do not have the required permissions to view the files attached to this post.
|
| Sat Jul 02, 2011 1:37 pm |
|
 |
|
Les St Clair
Joined: Wed Sep 18, 2002 1:53 am Posts: 462 Location: North Wales, UK
|
 Re: One for the XML pundits - playing a symphony
Ken,
I don't have the answer to your question, but I'm very impressed with what you have so far. Can you tell me exactly where to paste this additional code in "Album_Tracks.xsl"?
I can't seem to get it to work at all - and I have created the same custom track fields as you (i.e. Custom05 is the field holding the Work name, and Custom10 is the field indicating the Start of a Work)
Thanks, Les
|
| Sat Jul 02, 2011 7:21 pm |
|
 |
|
LotsOCds
Joined: Fri Nov 14, 2003 6:15 pm Posts: 1425
|
 Re: One for the XML pundits - playing a symphony
Hi Ken, I'm far away from my CATraxx computer so I cannot confirm the adjustment but I think it will work properly if you change the play link as follows: <A HREF="PLAYFILTER:Track.Custom05={custom05}@Track.AlbumID={albumid/@unformatted}@orderby=Track.Position@validate=yes, 1">Play</A>
_________________ Cheers, Dave
|
| Sat Jul 02, 2011 8:27 pm |
|
 |
|
KAM
Joined: Wed Oct 01, 2003 6:09 pm Posts: 1142 Location: Location: Location:
|
 Re: One for the XML pundits - playing a symphony
Grrrr - why do you have to be so helpful, Dave!
I'd just managed to work this out for myself and I rushed to the forum to tell the world. Only to find that you've beaten me to it. Oh well, I couldn't have it confirmed by a better source.
Thanks and regards
Ken
|
| Sat Jul 02, 2011 9:10 pm |
|
 |
|
LotsOCds
Joined: Fri Nov 14, 2003 6:15 pm Posts: 1425
|
 Re: One for the XML pundits - playing a symphony
Hi Ken,
Very glad to hear you figured it out on your own!
_________________ Cheers, Dave
|
| Sun Jul 03, 2011 7:04 am |
|
 |
|
Litago
Joined: Wed Jun 16, 2010 3:01 pm Posts: 18
|
 Re: One for the XML pundits - playing a symphony
Hi, I must admit that I couldn’t get this to work first time around. After some headscratching I have come up with this. Back up your file and in Album_Tracks.xsl replace this: by this: Note that I have used custom01 and custom10, (also colspans and colors may vary). I first envisioned this to be done in TrackBrowse.xsl, but there I cannot get the sum function to work at all. I will look further into it, but anyone who have something working is welcome to give a hint. Litago
|
| Wed Jul 06, 2011 7:20 am |
|
 |
|
KAM
Joined: Wed Oct 01, 2003 6:09 pm Posts: 1142 Location: Location: Location:
|
 Re: One for the XML pundits - playing a symphony
I'm not at my CATraxx PC at present, but when I get back later tonight I'll try to post the entire set of changes I've made. The code changes were within the xsl template, but you'll see I've also made reference to new entries in the style.css file (CLASS worktable, workrow and workname etc). I wasn't sure whether my end results would be compatible with the existing display layout, and I'd also hoped it would be transportable to other templates as well, hence the reason I created these new style definitions.
@Litago I haven't yet attempted repeating this in other templates so I can't say what issues I will encounter.
@Les I'm really sorry - I missed your earlier post somehow in the rush to get this working. Hopefully the attachments later will get you on the right track.
Ken
|
| Wed Jul 06, 2011 10:17 am |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|