MCPcopy Create free account
hub / github.com/cfinke/Channel-Two / existing_duration

Function existing_duration

parse-schedule.php:59–77  ·  view source on GitHub ↗
( $path )

Source from the content-addressed store, hash-verified

57}
58
59function existing_duration( $path ) {
60 global $existing_programming;
61
62 if ( ! $existing_programming ) {
63 return false;
64 }
65
66 if ( isset( $existing_programming->content_index->{ $path } ) && isset( $existing_programming->content_index->{ $path }->duration ) ) {
67// echo "Found " . $path . "\n";
68 return $existing_programming->content_index->{ $path }->duration;
69 } else if ( isset( $existing_programming->ad_index->{ $path } ) && isset( $existing_programming->ad_index->{ $path }->duration ) ) {
70// echo "Found ad " . $path . "\n";
71 return $existing_programming->ad_index->{ $path }->duration;
72 } else {
73// echo "Didn't find " . $path . "\n";
74 }
75
76 return false;
77}
78
79foreach ( $lines as $line ) {
80 // Remove comments.

Callers 1

index_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected