FileScheduler

FileScheduler selects in your contents the best next one. No complex interface, no configuration file, simply files and directories.

Integrations

Features

Time Mark

FileScheduler understands this time format : 2011y12M18d0w10h35m

It uses the following rules :

  • each field (year, month, day, week day, hour and minute) is optional.
  • each field must include the expected number count (4 for year, 1 for weeday, 2 for others).
  • field markers (y,M,d,w,h and m) are case-sensitive.

An invalid time mark is simply ignored.

2011y12M18d0w10h35m
06h
2011y12M00m

Time Interval

A time interval is two time marks separated with a -. They are only interpreted at the begin of name.

Simple hour intervals :

06h-22h-day-music1.ogg
06h-22h-day-music2.ogg
22h-06h-night-music3.ogg
22h-06h-night-music4.ogg

More complex examples :

12M20d-12M27d-christmas-music1.ogg
1w-monday-music1.ogg
6w-1w-week-end-music1.ogg

Wrong examples :

dummy-22h-06h-music.ogg # name must start with interval
22h-6h-music.ogg # should use 06h

Random

By default FileScheduler randomly selects the next content.

music1.ogg
music2.ogg
music3.ogg
music4.ogg

When constraints are present, FileScheduler randomly selects one of the contents which respects these constraints.

06h-22h-day-music1.ogg
06h-22h-day-music2.ogg
22h-06h-night-music3.ogg
22h-06h-night-music4.ogg

Fixed time

A fixed time is T followed by a time mark (at the begin of the name) :

T14h30m-news.wav
T00m/jingle-horaire1.wav
T00m/jingle-horaire2.wav

A content with a fixed time will be used in priority when time matches.

T14h30m-news.wav
14h-15h/content1.wav
14h-15h/content2.wav
14h-15h/content3.wav

FileScheduler can detect a ForcedNext when a fixed time matchs.

When the broadcast solution supports it (LiquidSoap, PlayBoxes, …), the forced next will replace the current content.

Directories

Information (like time interval) contained in directories names are shared with underlying files :

12M20d-12M27d-christmas/music1.ogg
12M20d-12M27d-christmas/music2.ogg
jingles/06h-22h-day/jingle1.ogg
jingles/06h-22h-day/jingle2.ogg
jingles/22h-06h-night/jingle10.ogg
jingles/22h-06h-night/jingle11.ogg

Information are concatenated. For time intervals, an “and” operation is performed :

6w-1w-week-end/06h-22h-day/music1.ogg
6w-1w-week-end/22h-06h-night/music2.ogg

Directories without information are supported :

22h-6h/jingles/T0m-top-night.wav
22h-6h/jingles/jingle1.wav
22h-6h/jingles/jingle2.wav
22h-6h/music/music1.wav

Ignored directories

Directories starting with _ are simply ignored :

_music/...
13h-15h/_archives/...

Properties

Properties are included at the end of names with this format {key1=value1,key2=value2}}.

These properties are used by FileScheduler for advanced features (like repeat constraints).

music{repeat=+30}/jazz{weigth=2}/music10.wav
music{repeat=+30}/jazz{weigth=2}/music11.wav
music{repeat=+30}/classic{repeat=+60,weight=0.5}/music20.wav
music{repeat=+30}/classic{repeat=+60,weight=0.5}/music21.wav

A property can be overridden :

music{repeat=+30}/classic{repeat=+60,weight=0.5}/music20.wav # repeat is +60
music{repeat=+30}/jazz{weigth=2}/music11.wav # repeat is +30

Log

FileScheduler can store the last selected contents. The log is modified after each FileScheduler Next selection. By default, the last 100 contents are stored.

For a given content, the log can determine the last selection. Especially the number of other selected contents, this distance is used by to avoid repeats. For the moment, contents are matched by name.

:?: In a future release, contents will be matched by checksum.

The storage can be a simple file (for CommandLine, LiquidSoap, PlayBoxes), or a memory cache (WebService).

Avoid content repeats

The repeat property can be used to avoid repeats. A + with a numeric value (like +30) will avoid repeat with the specified distance.

In this example, the music1 will be used only if anything else has been selected 5 times since the last music1 selection :

music1{repeat=+5}.wav
music2.wav
music3.wav

The repeat property can be specified in directories :

music/funk{repeat=+30}/...
music/jazz{repeat=+45}/...
music/classic{repeat=+60}/...

Force repeats

:?: This feature is not yet implemented.

In this example, every 5 contents, one of the jingles will be selected :

jingles{repeat_one=5}/jingle1.wav
jingles{repeat_one=5}/jingle2.wav
music/music1.wav
music/music2.wav
music/music3.wav
music/music4.wav
music/music5.wav
 
filescheduler/start.txt · Last modified: 2012/04/05 15:48 by alban
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Run by Debian Driven by DokuWiki