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 /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Create Dataobjects from folder contents and pull ID3 tags in db

Go to End

2 Posts   1738 Views


Community Member, 215 Posts

3 August 2009 at 4:56pm

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? :)



Community Member, 57 Posts

7 August 2009 at 7:18am


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.