Has anyone come up with a method for searching the playlists, song title, album, etc

Comments

drewish’s picture

does drupal's built in search not work?

will kirchheimer’s picture

It searches the list yes, but it is a fairly blunt object.

Ideally per field searching would be available.

"I want to know which dj played such-and-such song, where the song title is 'Jazz'"

drewish’s picture

Version: 5.x-1.5 » 6.x-2.x-dev

won't happen in the 5.x version. in the d6 code i'm planning on exposing the playlist track info so that you could build a view and use it's filtering.

drewish’s picture

Status: Active » Needs review
StatusFileSize
new14.03 KB

This flushes out the playlist views support a bit more and converts the table listing on playlist nodes to a view.

drewish’s picture

i should add that you can can now filter by the playlist fields getting us close to that searching ideal.

drewish’s picture

Status: Needs review » Fixed

I committed the patch to HEAD. I think you should be able to build a view with exposed filtering to find tracks the way you're describing.

tim.plunkett’s picture

Status: Fixed » Needs work

I think there's an error in station_playlist_nodeapi(), line 393 of station_playlist.module.

402: $block = $view->preview($display_id);

That assigns a string of text to $block.

405: $node->content[$content_key]['#title'] = $block['subject'];

That attempts to assign an element of $block that does not exist.

I'm not sure what the intended result was, so I'm not sure the best way to fix it.

I'm using 6.x-2.x-dev of both Views and Station.

- Tim

tim.plunkett’s picture

Status: Needs work » Needs review

I tried changing it from $block = $view->preview($display_id); back to $block = $view->execute_display($display_id);, and it solved the problem. But I'm not sure why it was changed in the first place, so this still needs addressing.

drewish’s picture

mind rolling a patch?

tim.plunkett’s picture

StatusFileSize
new673 bytes

uhhh how's this?

tim.plunkett’s picture

Has anyone tried this out? It's only one line...

drewish’s picture

hadn't tried it but i don't remember why i changed it in the first place so no harm in rolling it back.

drewish’s picture

Status: Needs review » Fixed

oh forgot to mention committed ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tim.plunkett’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.1 KB

First of all, I finally learned the difference between preview() and execute_display(). preview() returns rendered HTML, while execute_display() returns an array of HTML. So switching back to execute_display() was correct.

However, if the view had nothing to display, it still printed an empty <div class="form-item"></div>.
I threw a check in there, this should FINALLY put this issue to rest.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community
drewish’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed to HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.