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
Comment #1
travist commentedThis 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.
Comment #2
BarisW commentedHi 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!
Comment #3
travist commentedSixcolored,
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.
Comment #4
travist commentedThere is a new API in the latest version.
This is fixed.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
BarisW commentedHi 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
Comment #7
travist commentedIt 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.
Comment #8
BarisW commentedNot 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.
Comment #9
attheshow commentedLooks like this was fixed in 1.4.