Hi all,

I used flashvideo_get_video in my template file to show the video file. However, I allow users to enter stories without video-files. So a lot of nodes don't have video files included. In this case, I always get the message 'Video currently not available'.

What I want is a check on the flashvideo_get_video which returns false if no file exists, or... a new function like flashvideo_node_has_video

What do you think?

Comments

travist’s picture

Status: Active » Postponed (maintainer needs more info)

This is a good suggestion. I am pretty slammed right now, but I can try to put this into the next release. If someone submits a patch, that makes this process go much faster.

Thanks,

Travis.

BarisW’s picture

Hi Travist.

Still waiting for it.. It would be great if you could get this working.
Or maybe just a new function flashvideo_node_has_video($node) which returns TRUE or FALSE would be good too.

Then it would be possible to call flashvideo_get_video when needed.

Your help would be much appreciated. Thanks in advance!

travist’s picture

Sixcolored,

Still making progress on this. I will most likely be checking in my changes tonight that has this fix which you can then get from CVS to test. It will most definitely make it to the next major release.

Thanks,

Travis.

travist’s picture

Status: Postponed (maintainer needs more info) » Fixed

There is a new API in the latest version.

flashvideo_does_video_exist($node, $params)

This is fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

BarisW’s picture

Version: 6.x-1.4-beta » 6.x-1.4-beta6
Status: Closed (fixed) » Active

Hi travist,

thanks for fixing. However, it is not exactly working as it should be.
Because the function only returns TRUE if the conversion already took place (and the file has status 1).

If I have just uploaded a video and my cron has not run yet, the function returns false, so the user doesn't see the placeholder (video is being processed..).

Is it possible to fix this?

Kind regards,

Sixcolored

travist’s picture

It seems all you really need is a function to iterate through the files in the node and look for any video, is this correct? Not necessarily for a Flash video. This will probably require an additional parameter to the API where you either search for FlashVideo's or any video. This won't make it for RC2, but might make it for the 1.4 version.

Thanks,

Travis.

BarisW’s picture

Not really,

flashvideo_does_video_exist should return TRUE if the node has an attached file, whether it is already converted to flash or not.
I can then call flashvideo_get_video, which returns the placeholder if the video isn't converted yet.

attheshow’s picture

Status: Active » Closed (fixed)

Looks like this was fixed in 1.4.