# Websource suggestions

**URL:** https://community.mp3tag.de/t/websource-suggestions/16169
**Category:** General Discussion
**Created:** [September 22, 2014, 4:47pm UTC](https://community.mp3tag.de/t/websource-suggestions/16169 "2014-09-22T16:47:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vkostas](https://community.mp3tag.de/user_avatar/community.mp3tag.de/vkostas/32/227_2.png) [@vkostas](https://community.mp3tag.de/u/vkostas)
#### Post date: [September 22, 2014, 4:47pm UTC](https://community.mp3tag.de/t/websource-suggestions/16169/1 "2014-09-22T16:47:32Z")

</div>

Some issues / suggestions for Websource Scripts.

1. JSON. Impossible to know if complex structure not found. Last version 2.66 added new command **json\_select\_object** and its sibling **json\_unselect\_object**. All is good except when queried object does not exist in JSON structure. A kind of check returncode command ( **json\_found** ) is needed. Hopefully this is already fixed in v2.67 (I missed the chance to test it). 
2. JSON "ON" command reads the original stream. I have build a generic WS script can convert all kind of input XML stream to JSON (see [this post](https://community.mp3tag.de/t/16299/1) for example). I would expect JSON "ON" command parses the current (modified) stream. XML-to-JSON script would help many WS scripts to be improved and/or simplified.
3. Impossible to show a value in multiple output items in '['ParserScriptIndex']' section. Many sites (discogs, musicbrainz, etc) return certain header info: nr of items found, nr of items per page, current page. User is not able to know whether other "hidden" records exist.
4. In aspect of paging info, smth must be foreseeing so user can "navigate" to different pages of found results.
5. Ability to format collected tags within WS. Tag **tmpTracks** has current value " **1|2|3|4|5**" (| is track separator) during WS execution. Now, let's say we want to apply a WS command (replace, regexp, etc) to **tmpTracks** (add leading zeroes, etc). That's not possible. That could be possible with a new command, smth like **SelectTag**. E.g. just a sample script.

```
outputto "tmpTrack" 
say "1"
say "|"
...
outputto "tmpTrack" 
say "2"
say "|"
...
outputto "tmpTrack" 
say "3"
say "|"
....
selectTrack "tmpTrack"
set "tmpTrack"
outputto "tmpTrack" 
RegexpReplace "(^|\|)]" "0"

```

6. Re-usable code. Many scripts build for same site share the same album parser (e.g. 6 Amazon scripts). Instead of copy/paste the same code into many various scripts, wouldn't it be better to use the "Include file" logic? This way we work only in one "include" file (those cannot be **.src** of course) and re-used in the real **.src** files (one time entry). Similar idea stands for all other sites when we create many scripts variations. Not a must, only a nice to have since it affects only us, the "scriptwriters".
7. Introduce statements to add/change/(re)move/copy json elements. Currently can be possible (not always good result) by using complex regexp. Having the ability to "change" json structure on the fly would simplify a lot json scripts and let us cover more complex cases.

To be continued...  
Thank you,

---

<div class="post-metadata">

### Author: ![vkostas](https://community.mp3tag.de/user_avatar/community.mp3tag.de/vkostas/32/227_2.png) [@vkostas](https://community.mp3tag.de/u/vkostas)
#### Post date: [March 1, 2015, 6:31pm UTC](https://community.mp3tag.de/t/websource-suggestions/16169/2 "2015-03-01T18:31:54Z")

</div>

> [@Victor Kostas](#):
>
> To be continued...

It would be nice if Florian could read this post.  
Maybe withdrawn version 2.67 included some of those issues/features. I missed the v2.67 and don't know what new features was supposed to bring.

---

<div class="post-metadata">

### Author: ![vkostas](https://community.mp3tag.de/user_avatar/community.mp3tag.de/vkostas/32/227_2.png) [@vkostas](https://community.mp3tag.de/u/vkostas)
#### Post date: [March 5, 2015, 12:17am UTC](https://community.mp3tag.de/t/websource-suggestions/16169/3 "2015-03-05T00:17:03Z")

</div>

> [@Victor Kostas](#):
>
> It would be nice if Florian could read this post.  
> Maybe withdrawn version 2.67 included some of those issues/features. I missed the v2.67 and don't know what new features was supposed to bring.

Unfortunately v2.67 brings no news to WS.  
Switched again to waiting mode (Long time already)...
