Add views2 support
bomarmonk - June 20, 2008 - 21:04
| Project: | Audio |
| Version: | 6.x-1.x-dev |
| Component: | Views support |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I am just getting familiar with views 2 and its new interface, but I don't see any way to create a custom view of audio nodes. Any suggestions? Or is this feature still being developed for Audio 6?
Thanks in advance for any help with this.

#1
I'm interested in this too. I would like to have a views-field with the player embedded.
#2
the views support hasn't been upgraded yet.
#3
Views 2 Release Candidate for Drupal 6 has now been released. This should at least provide the stability needed for other modules, such as audio, to develop their integration with views 2. I just thought I would note it here, just in case.
#4
marked #311557: Audio and Views 2 problem as a duplicate
#5
I just committed default views for audio.module and a couple of audio specific fields. Still a lot to get converted though.
#6
Thanks for working on this! I, for one, appreciate it!
#7
Thank you!!! I'm looking forward to audio working with D6 and Views2.
#8
I am also looking forward to Audio being completed for Drupal 6. It looks like exactly the module I've been looking for.
#9
Is it possible to expose the player or the "download this file" to views? I would like to make a view of the certain audio files with the titles, the player and the download link all listed in a table.
#10
You can do it with the old 5x version, so it's a matter of porting that functionality to 6x. I imagine views 2 is making this a more difficult transition (although I'm guessing views 2 is well worth it)
#11
marked #347936: Views2 Sort by Audio Metadata as a duplicate.
committed the attached to HEAD. it adds support for the audio metadata.
#12
Subscribe, in field none of the meta data are links, they should be links that link to sorting by artist/album etc mechanism.
Also can you please add the player as a field? Thanks for your wonderful module.
#13
Ditto to #9:
- Audio player field for Views 2
- "Download" link field for Views 2
Thanks again for your work on this module. 5.x is wonderful, and I know porting to 6.x is a lot of work. Excellent job.
#14
Here is a patch which adds a "download" and a player field. This is my first work on views 2, so there's probably some more work to be done here. It might be good to make the download text an option; right now, it's just a t()'ed string.
#15
the download link looks fine but the player seems a little overly complex... maybe a few comments would help explain it?
#16
would be nice if we could have the image too.. withimagecache support as well ;-) !!!
thank you
#17
This is a views 2 support patch, based on the patch by deviantintegral. This patch moves all views code into a views folder, to fit more inline with other contrib module handling of views. Additionally, this module adds custom link text support, as well as introduces a 'play' link field.
This patch removed all node_loads where possible. However, the 'player' field still requires a node_load per result due to the requirement of a full node object in all player theming functions.
#18
I manually moved the views and handler files into the audio/views folder. Actually I copied because I wasn't sure if the handlers had to go too.
Now I get:
Error: handler for audio > player doesn't exist!
after I add the player field.
#19
I could swear that I posted this already... I later moved the handler files into audio/views/handlers and everything seems to work.
#20
Subscribing
#21
Great job with the patch from #17. It gives the functionality I was looking for with views.
#22
Subscribing
#23
Can this be committed please? I'm really bad with patches.
#24
Yes, committing this one would be really helpful!
#25
I have tested it and am running it on a production site. It would good if this was committed soon.
#26
I applied the patch in #17 successfully to the 6.x-1.x-dev version, but I still get broken/missing handler in Views. Seeing no views folder in the audio module folder, I then copied the views/handler files to audio/views/handlers - still no handlers.
Any ideas? I'd be glad to know how some folks seem to have gotten this working.... thanks much!
#27
I did some cleanup on the handlers and committed those. The patch was moving all the broken views1 code into audio/views/audio.views*.inc which seemed kind of useless so I left the view1 code in audio/audio.views*.inc and moved all the views2 code out. This makes it easier to see what's left to be ported.
Marking this as active until the tag filter/argument handlers and can be ported to views2.
#28
So - just to be clear - using a player with an argument (which is required for doing a music search) will not be available in Views until the filter/argument handlers are ported, correct?
Thanks for the work you're doing, drewish - much appreciated!
#29
i think there's some argument handling but IIRC things like the track numbers are wierd. i just rolled a new release so grab that and try it out.
#30
When using views and setting the option to rewrite the output of an audio field, the audio replacement patterns are "[value_3] == Audio: Track", "[value_2] == Audio: Title", etc. Is this part of this bug, or should I open a new bug?
#31
By the way, I recently (within past couple weeks) finally updated to the latest Audio module release, and it's working great from what I noticed so far. Haven't had much time to mess with it yet, but so far so good! Thanks to drewish and any other developers who assisted!