Attached is a quick patch to allow station admins to add a third stream. I also needed to use labels other than 'High' and 'Low' so I added variables and passed them onto theme_station_block_current_program for display. This was done against the latest 5-0 branch version.

Comments

thumb’s picture

I was hoping to get some feedback on this. Is it useful? If so, how could the implementation be improved. I'm hoping that this might be roled into HEAD.

thumb’s picture

This patch would also take care of this patch

drewish’s picture

sorry to have ignored this issue.

i think that should be changed but i'd prefer to move from having a predetermined number of webstreams to a model where the admin can determine how many they need. it would also be nice to be able to provide multiple URLs for the same stream (in case you've got two separate machines providing the same high and low bandwidth streams) and have them appear in an .m3u file for each stream...

so in summary, yes to the change but it should also work for people with 4, 5, or 6 streams.

thumb’s picture

Makes sense. I was thinking streams should be stored in an array anyway. I'll convert the predetermined number of streams to an array to allow unlimited.

drewish’s picture

Status: Active » Needs work
StatusFileSize
new13.96 KB

okay, here's a start on what i had in mind

thumb’s picture

Hey drewish, at first glance it looks great. I'll back out my changes on my dev instance and give this a try. Thanks.

thumb’s picture

Okay, I upgraded to Station 5.x-1.x-dev, applied the patch, and ran update.php. Two issues I'm having are

1. Couple of minor syntax errors in station.module, closing parenthesis added in wrong place (see lines 274 and 281).

2. When adding a third web stream, it appears to be added (shows up in block), but does not display in admin form.

3. Stream Urls aren't linked in the block, defaults to drupal root Url.

I'll poke around and test more soon...

drewish’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev

now that HEAD is open again, and schedule are now nodes, i think it'd make sense to store this value in the station_schedule table rather than in the variables table. that way each schedule has it's own streams.

drewish’s picture

StatusFileSize
new10.03 KB

still needs lots of work...

drewish’s picture

Component: Other » Schedule
StatusFileSize
new8.74 KB

rerolled... i kind of think this should happen after: http://drupal.org/node/169409

joachim’s picture

Does this allow just one stream too?
If so, then http://drupal.org/node/131154 can maybe be marked as a duplicate.

drewish’s picture

yeah, http://drupal.org/node/131154 looks like a duplicate

drewish’s picture

StatusFileSize
new25.68 KB

i spent a few hours on this today but this still needs work.

each schedule node now has an unscheduled message and an array of multiple streams. clicking the listen link sends you to a m3u file which plays correctly.

the views stuff needs more cleanup. there's unused stuff in there. also need to figure out how to get a now playing block working for remote archives... maybe that'll just something that should be won't fix.

drewish’s picture

Status: Needs work » Needs review
StatusFileSize
new13.1 KB

moved the unscheduled message changes over to: http://drupal.org/node/188235
pulled out other changes that should go into their own issues.

drewish’s picture

some code clean up went to: http://drupal.org/node/188242
schedule node fixes to: http://drupal.org/node/188249
views clean up to: http://drupal.org/node/118390

drewish’s picture

StatusFileSize
new8.73 KB

re-roll to apply cleanly with all the other stuff applied.

drewish’s picture

Assigned: thumb » drewish
StatusFileSize
new14.18 KB

re-roll... that last patch dropped some stuff.

drewish’s picture

Status: Needs review » Needs work

actually needs work... the now playing block should use the streams...

drewish’s picture

Status: Needs work » Needs review
StatusFileSize
new8.74 KB

Dropped the default view... got the streams displayed correctly on the block. It's pretty close now.

drewish’s picture

StatusFileSize
new16.45 KB

whoops, that was an old copy of the patch.

drewish’s picture

StatusFileSize
new16.45 KB

found one bug in the remote block, the listen links were broken.

drewish’s picture

Status: Needs review » Fixed
StatusFileSize
new17.15 KB

adding a station_ored_list() list for formatting the streams. it's looking pretty good so i'm going to go ahead and commit this.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.