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

AttachmentSize
autocomplete_working.patch1.04 KB

#1

drewish - March 11, 2009 - 07:48

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

bigkevmcd - March 11, 2009 - 14:00

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?

AttachmentSize
distinct_union.patch 1.14 KB

#3

drewish - June 1, 2009 - 06:33
Status:needs review» needs work

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

drewish - June 8, 2009 - 21:48
Title:Adding a Playlist - the autocompletion fields don't work» Playlist autocomplete should also query the catalog

#5

tim.plunkett - September 22, 2009 - 23:25

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

drewish - September 22, 2009 - 23:49

i'd be open to adding an a playlist module option to ask where you'd like to query:
- Catalog
- Other playlists
- Both

#7

drewish - September 27, 2009 - 07:25

totally untested.

AttachmentSize
station_playlist_390120.patch 3.47 KB

#8

drewish - September 27, 2009 - 07:53
Status:needs work» needs review

another, slightly tested version.

AttachmentSize
station_playlist_390120.patch 3.45 KB

#9

refreshingapathy - September 27, 2009 - 18:53

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

drewish - September 27, 2009 - 21:10

try hitting the admin/build/menu page to reset the menu cache.

#11

drewish - September 27, 2009 - 21: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

refreshingapathy - September 28, 2009 - 02:31

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

tim.plunkett - September 28, 2009 - 16:10

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.

AttachmentSize
station_playlist_390120.patch 3.34 KB

#14

drewish - September 28, 2009 - 18:35

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

drewish - September 28, 2009 - 20:07

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.

AttachmentSize
station_playlist_390120.patch 4.79 KB

#16

tim.plunkett - October 8, 2009 - 21:13
Status:needs review» reviewed & tested by the community

One error in station_playlist.admin.inc: it was setting the wrong variable name.
Otherwise, it looks great.

#17

drewish - November 26, 2009 - 03:54
Status:reviewed & tested by the community» fixed

ah yeah fixed that. committing this to HEAD.

thanks everyone.

AttachmentSize
station_390120.patch 1010 bytes

#18

drewish - November 26, 2009 - 03:55

whoops wrong patch.

AttachmentSize
station_390120.patch 4.42 KB
 
 

Drupal is a registered trademark of Dries Buytaert.