Hi, here's my first try at integrating Drupal's video module and DTV (brought to you by the friendly people from CivicSpace ;-).
The attached patch adds an enclosure tag to all RSS items stemming from video nodes with the correct video size and (hopefully) mime-type. This should make it possible to use any standard Drupal RSS feed with DTV, e.g. node/feed or any feed from a Drupal category...

I asked Nick Nassar (DTV developer) and he assured me that DTV ignores any non-video RSS items, so you can have a blog (for example) where only some items are video nodes and others are normal blog posts. This will generate a feed where some items have enclosure tags and some don't. DTV will ignore the non-video items and only display the videos in a "channel".

Please note that I couldn't really test this yet, as DTV is currently only available for MacOS, which I don't have access to. Also, please double check the mime type function I added, I'm not sure I got all of the mime types right...

CommentFileSizeAuthor
#2 video_rss_0.patch1.8 KBUwe Hermann
video_rss.patch1.5 KBUwe Hermann

Comments

LukeLast’s picture

Looks like a cool idea. I'll be able to test it when the windows version comes out.

On Macromedia's site here, http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19439 they say the correct MIME type for FLV is flv-application/octet-stream. Although what really matters is what the DTV app is looking for.

I don't really see how youtube videos could work with DTV so they should probably be ignored.

Uwe Hermann’s picture

StatusFileSize
new1.8 KB

Here's an updated patch with the following changes:

  • Uses "flv-application/octet-stream" as mime type for FLV files (thanks Luke)
  • Only add enclosures for video node (not for _all_ nodes)
  • YouTube videos don't get a mime type field, but still have an enclosure
  • Any unknown files don't get a mime type field, but still have an enclosure
  • Simplified code a bit

Please review...

seaneffel’s picture

Category: feature » support

I can't figure out a reliable way to apply a patch on my Mac system, could you post a patched video.module file?

sethcohn’s picture

Category: support » feature

1) Stop changing categories (or titles) when you post in an issue, it's bad form, unless it corrects something.

2) See http://drupal.org/diffandpatch for how to apply patches.
I've seen more 'I can't patch, please post the module' complaints lately. Learn to patch.
Being on a Mac is no excuse: you have patch and FileMerge and likely other ways.

Uwe Hermann’s picture

Status: Needs review » Reviewed & tested by the community

Hi, what is holding this patch from being applied? I think it should work quite ok now. I also tested the generated feeds with http://feedvalidator.org, they validate just fine.

fax8’s picture

My ADSL is still broken...
And I still have access only with an http only proxy from my university.
So I can't commit this patch.

Moreover I would like to try it with DTV but I don't have a mac..
so can't try it.

Feel free to commit this changes if you have tryed it with DTV.

Thanks.

Fabio

LukeLast’s picture

Status: Reviewed & tested by the community » Fixed

Commited to CVS.

I updated the URL generation so it would create the right URL's.

I don't know much about the DTV program but i'm still not sure why enclosures should be added when the data (file url, size) is incorrect. Such as with unkown mime types and youtube types.

Anonymous’s picture

Status: Fixed » Closed (fixed)
seaneffel’s picture

Version: » master

Is there a version of video.module with this patch included? I don't have a way to run patches on my Mac.

sean@cctvcambridge.org

Thanks!

fax8’s picture

Uwe Hermann is maintaining an already patched
video.module on his sandbox

grab it at http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/uwe/
read the README.txt file and make a backup before do anything.

But there will be a lot of new features
in the near 4.7 release. I suggest to wait for that.

Fabio