Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions

Create Dataobjects from folder contents and pull ID3 tags in db


2 Posts   1488 Views


3 August 2009 at 4:56pm Community Member, 215 Posts

Hi there,

This is a tricky problem that I am facing for my churches website. They currently have a site that is built pretty much in HTML with a little php thrown in so I'm moving it all to SS. We want to podcast each weeks message so I'll create a dataobject for each message and attach a file to it. That I will be able to handle but ideally I would write a function that looks at a folder and creates a dataobject for any files in the folder that arn't currently associated with a dataobject. I imagine this is similar to how the AssetAdmin does this but I'm not sure where to start.

As a second issue ideally I would be able to pull the ID3 tags from the audio files into the fields in the dataobject, ie pull in the Artist, Album etc...

Any ideas - even just a point in the right direction? :)



7 August 2009 at 7:18am Community Member, 57 Posts


To push a new item into an existing DataObjectSet you'll need to $do->push() it in. What you will have to do in reality is create a completely new one and then merge the two.

In terms of ID3, and will help you there.