PDA

View Full Version : Artist names as sorted



pippin
2007-12-20, 06:24
Does anybody know if it's possible (from the HTML I/F) to access the artist "as sorted" or to get access to the list of ignored articles ("ignoredarticles")?

If there a documentation of preference settings, it's not in the CLI doc and I can't find it in the wiki.

Thx in advance

Joerg

mherger
2007-12-20, 07:11
> Does anybody know if it's possible (from the HTML I/F) to access the
> artist "as sorted"

I'm not sure I understand what you want. Isn't the artist list sorted?

> or to get access to the list of ignored articles
> ("ignoredarticles")?

The list of ignored articles can be requested by using a "pref" CLI call over JSON/RPC. JSON/RPC is the Swiss Army knife to access any aspect of SC over http.

Michael

pippin
2007-12-20, 08:11
> Does anybody know if it's possible (from the HTML I/F) to access the
> artist "as sorted"

I'm not sure I understand what you want. Isn't the artist list sorted?

> or to get access to the list of ignored articles
> ("ignoredarticles")?

The list of ignored articles can be requested by using a "pref" CLI call over JSON/RPC. JSON/RPC is the Swiss Army knife to access any aspect of SC over http.

Michael

Thanks, I DID understand, that CLI can do it. However, I need access from HTML, not JavaScript.
What I want to do is build header rows to separate the sorted list, for example to have a "R" before Radiohead, Rolling Stones...
Problem is to find out, where "Q" ends and "R" begins because you can't just use the first character of the artist name since, for "The Rolling Stones" that would be a "T"...
If I want to skip articles by myself (bad enough) I first have to know what they are...

So... any ideas?

Joerg

mherger
2007-12-20, 08:23
> Thanks, I DID understand, that CLI can do it. However, I need access
> from HTML, not JavaScript.

You mean using TT?

[% USE Prefs %]
[% articles = preferences('server').get('ignoredarticles') %]

Michael

pippin
2007-12-20, 09:31
> Thanks, I DID understand, that CLI can do it. However, I need access
> from HTML, not JavaScript.

You mean using TT?

[% USE Prefs %]
[% articles = preferences('server').get('ignoredarticles') %]

Michael

Yes ;-)
Thx.

About the second question: Is there a documentation about the available preferences/preference tags?

Joerg

mherger
2007-12-20, 09:41
> About the second question: Is there a documentation about the available
> preferences/preference tags?

Hmm... the code? :-/

pippin
2007-12-20, 10:07
> About the second question: Is there a documentation about the available
> preferences/preference tags?

Hmm... the code? :-/

No TT code anymore :-(
I DID try to find preferences in all the js code, yet it's a bit distributed...

[% USE Prefs %]
[% articles = preferences('server').get('ignoredarticles') %]

Looks good, yet doesn't work, returns undefined.

pippin
2007-12-21, 03:39
That would have to be

[% USE Prefs %]
[% articles = Prefs.preferences('server').get('ignoredarticles') %]

;-)

mherger
2007-12-21, 04:09
> That would have to be

Ooops, sorry. Simplified my example too much :-/.

If in doubt often a grep over the HTML folder will get you some working code.

Michael

JJZolx
2007-12-21, 12:54
> Does anybody know if it's possible (from the HTML I/F) to access the
> artist "as sorted"

I'm not sure I understand what you want. Isn't the artist list sorted?

I believe he was asking whether contributors.namesort is available within TT templates?

pippin
2007-12-21, 13:54
I believe he was asking whether contributors.namesort is available within TT templates?

More or less: yes. But it isn't, isn't it?

pippin
2007-12-21, 17:13
Found it. item.anchor has what I need, it's set for the first item with a new character and contains that character.