At 00:00:03 a script is started through a scheduled event. The script, which I found on this forum, creates a container with three hooks, an opener, middle and closer jingle. The container is played right after the Top of the Hour jingle. Works great in v4.
In v5 I get an error: “…item is not cueable” and the container is not created.
When I run the script by hand, it sometimes works and it sometimes doesn’t.
The problem is not v5, but rather that the script is trying to create a container from items that are not a file (“cueable” in mAirList-speech), possibly a stream or a dummy item.
Actually the person who wrote the script (not me) thought it would be good to check that before handling the item, and added an if/then block - but used a condition that always evaluates to true:
// Is this a song?
if 0 >= 0 then
begin
I assume the person didn’t really know how to check for a file… Replace that code by
// Is this a song?
if currentItem.IsCueable then
begin
It’s working again! Thanks Torben! My apoligies for assuming it had something to do with v5. I didn’t have any problems in v4, that’s why. Thanks again.
The way I have the hook container set up is that it always ends with a jingle. However, all of my songs are separated by a some sort of ID element which means that I get two ID’s played back to back. How can i add a line in the script that will check the next playing item, and in case that item is not in the category music, delete the item?
[code]
// Is this a song?
if 0 >= 0 then
begin
[/code]
I assume the person didn’t really know how to check for a file… Replace that code by
// Is this a song?
if currentItem.IsCueable then
begin
and it should work.
I changed that after I took the IVP script as a source to debug some code and never removed it :-[ Thanks for this improvement! Will update my scripts as well ;D
Yes, “IsCueable” checks if this is a “cueable” item, which means that it has a finite duration, you can seek in it, and also set cue points (hence the name).
Cueable items include: files, containers, finite silence, finite streams. (The latter becaue finite streams are internally implemented by finite silence items that mute/unmute the stream as you start/stop them.)
If you only want to check for actual files, use “IsFile” instead.
[quote=“Torben, post:10, topic:9525”]Yes, “IsCueable” checks if this is a “cueable” item, which means that it has a finite duration, you can seek in it, and also set cue points (hence the name).
Cueable items include: files, containers, finite silence, finite streams. (The latter becaue finite streams are internally implemented by finite silence items that mute/unmute the stream as you start/stop them.)
If you only want to check for actual files, use “IsFile” instead.[/quote]