Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parsing of CLS command #47

Closed
mint-dewit opened this issue Jan 10, 2017 · 4 comments
Closed

Incorrect parsing of CLS command #47

mint-dewit opened this issue Jan 10, 2017 · 4 comments

Comments

@mint-dewit
Copy link
Contributor

CasparCG 2.0.7 returns the following on CLS command:

"PATH/FILENAME" SIZE TYPE DATE LENGTH FRAMELENGTH

casparcg-connection returns the following:

{name: 'PATH/FILENAME', type: 'type'}

@jesperstarkar
Copy link
Member

How about these results for CLS, TLS, FLS and Thumbnail List:

{ name: '20170111T173215',
    type: 'image',
    size: 331479,
    created: 20170111163215,
    frames: 0,
    frameTime: '0/1',
    frameRate: 0,
    duration: 0 },

{ name: 'TESTPATTERNS/1080P5994_TEST',
    type: 'video',
    size: 817311,
    created: 20151105083851,
    frames: 59,
    frameTime: '125/3747',
    frameRate: 29.98,
    duration: 1.9679786524349565 }

{ name: 'TESTPATTERNS/1080P3000_TEST_A',
    type: 'video',
    size: 971151,
    created: 20151105083850,
    frames: 60,
    frameTime: '1/30',
    frameRate: 30,
    duration: 2 }

{ name: 'webp/WEBP',
    type: 'template',
    size: 483,
    created: 20151015143632,
    format: 'html' }

{ name: 'scene/ROPE',
    type: 'template',
    size: 11097,
    created: 20151222234132,
    format: 'scene' }

  { name: 'PHONE',
    type: 'template',
    size: 1442360,
    created: 20151105083859,
    format: 'flash' }

{ name: 'TitilliumWeb-ThinItalic',
    type: 'font',
    fileName: 'TitilliumWeb-ExtraLightItalic.ttf' }

{ name: 'TESTPATTERNS/576_TEST',
    type: 'thumbnail',
    created: 20151105,
    size: 22016 }

@jesperstarkar
Copy link
Member

I want to change "created" to "changed" and parse the date/time format to a Date.toLocal() string.

@mint-dewit
Copy link
Contributor Author

mint-dewit commented Jan 16, 2017

that makes a lot more sense than the current response parsing.

always returning an array would also fix #42 when using 2.0.7

@jesperstarkar
Copy link
Member

All "created" in the previous example are now changed to a parsed timestamp (parsed as local time) like this:

{ name: 'TESTPATTERNS/576P2500_TEST',
    type: 'thumbnail',
    changed: 1449301132000,
    size: 5821 }`

jesperstarkar added a commit that referenced this issue Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants