Playlist autocomplete should also query the catalog
bigkevmcd - March 3, 2009 - 20:41
| Project: | Station |
| Version: | 6.x-2.x-dev |
| Component: | Playlists |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Description
Hi,
When going to /node/add/station-playlist the autocomplete fields don't seem to do anything, they're querying an empty table?
I've attached a patch which makes them query the station_track table, which seems to work.
Kevin
| Attachment | Size |
|---|---|
| autocomplete_working.patch | 1.04 KB |

#1
actually i think the correct table is {station_playlist_track} though querying the catalog would be a good way to do it as well... i wonder if a DISTINCT UNION would be a good way to do both...
#2
Ooops...I misunderstood the intent of the autocomplete...
The tracks don't have to come from pre-defined albums...ok...How about this new patch?
#3
sorry to have ignored this. it does occur to me that we should check if the station_catalog module is enabled before querying it's tables.
#4
#5
My dev install is down for the timebeing, so I can't try out that patch at the moment.
Any idea if it still applies?
Also, is there an easy/quick way to disable autocomplete from the playlists?
Or an option to choose which it queries?
For some reason our DJs continue to make typos when doing playlists, but not when adding to the catalog...
#6
i'd be open to adding an a playlist module option to ask where you'd like to query:
- Catalog
- Other playlists
- Both
#7
totally untested.
#8
another, slightly tested version.
#9
I just installed the head rollup from this morning... applied drewish's patch latest to my dev install, and I don't seem to have any lookup on anything... the little wheel keeps on turning but no lookup happens. Any specific cache to clear to force?
#10
try hitting the admin/build/menu page to reset the menu cache.
#11
oh did you select the setting admin form? it might not pick a good default if you don't have the station catalog moduel installed.
#12
Resetting menu cache worked for me. Thanks!
Other than that, I haven't had any problems so far using it, seems to work quite well. No problem with storing tracks or bad lookups.
#13
I think the settings were reversed. This is a patch against HEAD, not against the patch in comment #8.
I just switched around the switch/cases in station_playlist_autocomplete().
Also, not tested against the AJAXified patch, yet.
#14
oh, that makes sense. might be a good reason to just use constants for those. or ditch the numeric values and just use strings.
#15
okay using a string for the variable now. removing the setting on uninstall. ensuring we don't run a query if the setting end up as some other random value.
make sure you visit admin/settings/station/playlist and re-save the settings.
#16
One error in station_playlist.admin.inc: it was setting the wrong variable name.
Otherwise, it looks great.
#17
ah yeah fixed that. committing this to HEAD.
thanks everyone.
#18
whoops wrong patch.