# \[WS\] iTunes source script with multiple search criteria

**URL:** https://community.mp3tag.de/t/ws-itunes-source-script-with-multiple-search-criteria/47197
**Category:** Web Sources Scripts
**Created:** [November 30, 2019, 8:38pm UTC](https://community.mp3tag.de/t/ws-itunes-source-script-with-multiple-search-criteria/47197 "2019-11-30T20:38:05Z")
**Posts on this page:** 1
**Showing post:** 55

<div class="post-metadata">

### Author: ![rboss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rboss](https://community.mp3tag.de/u/rboss)
#### Post date: [May 5, 2025, 4:58pm UTC](https://community.mp3tag.de/t/ws-itunes-source-script-with-multiple-search-criteria/47197/55 "2025-05-05T16:58:02Z")

</div>

> [@On another topic](https://community.mp3tag.de/t/68407/1):
>
> Hi,
> 
> Thank you for the continuous maintenance of your web source script.
> 
> I've occasionally noticed inconsistencies regarding TOTALCOLLECTIONTRACKS in some outputs between the Apple and iTunes sources.  
> Normally, the values ​​for TOTALTRACKS and TOTALCOLLECTIONTRACKS are identical for just one disc. However, sometimes they differ for the Apple source.  
> Example Catalog ID: 858492013
> 
> Greetings  
> poster

(...)

> [@On another topic](https://community.mp3tag.de/t/68407/1):
>
> Example Catalog ID: 858492013

> **[Live At Rockpalast (Live in Cologne 14. 05. 2009) by ...And You Will Know Us...](https://music.apple.com/us/album/live-at-rockpalast-live-in-cologne-14-05-2009/858491993)**
>
> Album · 2014 · 16 Songs

The IDs don't match - that's why I couldn't find this album. If you got the ID from your personal collection, be warned that source data IDs get changed over time, so an update might be useful.

As for the issue with `TOTALCOLLECTIONTRACKS`, the error is in the source data:

 ![imagem](https://community.mp3tag.de/uploads/default/original/3X/3/f/3fa003d8b3b2567be6b20ad3a2a7bd33137b40a8.png)

I could ignore this and have the script count the number of track entries, but on multi-disc releases a "$sum()" command of some kind would be necessary to keep adding the total tracks count of each disc, and none is available.

My script is working perfectly..... parsing incorrect data form the source :\  
And since there's no reference to validate if the data provided is correct, there's not much I can do.

In this case, Apple Music posted incorrect data for this album (from experience this is _not_ a rare event).  
You'll have to manually correct your tag, or use iTunes mode (in **this** case, `TOTALCOLLECTIONTRACKS` is correct there).

Hope this helps.

PS: If you don't mind, I'll be moving this exchange to the main topic, as your question could be useful to others.

---

_[View the full topic](https://community.mp3tag.de/t/ws-itunes-source-script-with-multiple-search-criteria/47197)._
