Closed (fixed)
Project:
Station
Version:
6.x-2.x-dev
Component:
Archive
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
20 Sep 2010 at 03:20 UTC
Updated:
25 Dec 2010 at 23:10 UTC
Jump to comment: Most recent file
Here's the situation - tell me if this isn't something I can do.
I have a large account with plenty of storage at a shared hosting provider. They don't want me running streamripper, however. So I have a VPS that I'm using to do the ripping. I have that configured and its ripping away merrily and I even have the XML-RPC link set up to grab the schedule from the hosting server. How is it that I can import the ripped files from the VPS onto the shared account where the main hosting is - or is that possible?
(using beta4)
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | station_916658.patch | 1.95 KB | drewish |
| #18 | station-916658-3.patch | 1.92 KB | refreshingapathy |
| #15 | station-916658-2.patch | 1.92 KB | refreshingapathy |
| #12 | pre-post-inc.patch | 1.29 KB | refreshingapathy |
| #12 | pre-post-php.patch | 792 bytes | refreshingapathy |
Comments
Comment #1
drewish commentedHumm... I seem to remember someone (WSUM?) had a script that uploaded the mp3s via FTP to another server. Take a look in the radio group on g.d.o and see if you see anything.
Comment #2
refreshingapathy commentedThat's what I was starting to work on (scp, actually), but I wanted to make sure this wasn't something hidden away in the depths of the functionality of the module already.
Comment #3
refreshingapathy commentedFirst run at it:
Todo later today is make it filter by size so we don't snag the file that stream ripper is still working on.
Comment #4
refreshingapathy commentedSecond run after I realized find is way more efficient here:
Figuring that an hour of audio is somewhere around 60-ish MB for me... I'm planning to run this at quarter past the hour, so the current file won't be much larger than 15 or 20MB.
Comment #5
drewish commentedOh, so had some time and found the thread on g.d.o: http://groups.drupal.org/node/8475
One thing to take from that is that you should use the existence of a .cue file as a signal that the rip is still in progress.
Comment #6
refreshingapathy commentedThanks drewish - the size comparison with find was giving all sorts of problems trying to get it to pass things to scp. My sed/awk is weak, I admit it. I'll put in something about searching for a same-name cue file and throw it here when I figure it out.
Comment #7
drewish commentedWhy bother doing it in the shell? Just fork the ripper.php and add some exec() calls to do the scp-ing from there...
Comment #8
drewish commentedPerhaps we could make it more general and add two options to the ini for pre and post rip commands to run? That would be the Drupal way...
Comment #9
refreshingapathy commentedRE #7 - I needed a quick and dirty way to stick things together for the next few days, and the quick and dirty way for me is shell scripting (more comfortable for me than PHP for a kludge solution).
RE #8 - yeah that'd be pretty badass. I'll take a crack at it this week.
Also, final shell script:
Comment #10
refreshingapathy commentedComment #11
refreshingapathy commentedFinally got around to doing this tonight. Just a quick exec and the addition of two more lines for the inc file. Patches attached for both the ripper.php and ripper.inc file.
Comment #12
refreshingapathy commentedPosted wrong diffs - those are quite ugly. diff -up attached.
Comment #13
drewish commentedThe idea is right but it needs a little clean up.
Please remove your site specific changes from the .ini file:
I'd add a bit more to the pre/post-rip command comments mentioning that multiple commands can be separated by semi-colons:
I'd change the pre-post command to only execute if there's a setting:
Also it's not required but if you checkout the source from CVS you can use it to generate a single patch file.
Comment #14
refreshingapathy commentedThanks drewish. Forgot to take some of my config out from the quick test I ran through on the dev. I'll brush it up again later tonight.
Comment #15
refreshingapathy commentedImproved patch, made correctly, with the correct naming scheme. Starting to get the hang of this - sorry for the roughness, I've never contributed code before.
Comment #16
drewish commentedLooking a lot better only two small things at this point:
- There's a tab used to indent the exec() lines. Drupal's coding standards call for using two spaces to indent.
- I think you could simplify the test before calling exec() as i outlined in comment#13.
Comment #17
drewish commentedOh, wanted to add that we're excited to have you contributing. It's all about starting small, my first patch changed a single line: #34031: Delete button on the edit user account form should be after the submit button
Comment #18
refreshingapathy commentedCoding styles fixed, I need to go over those again as well.
I'm not sure what you mean by simplifying the check. I think checking the .inc files is probably the most direct method, no?
Comment #19
drewish commentedThe thing is that you're adding in another variable $postrip_command that really doesn't do much besides duplicate the value of $settings['postrip_command']. You can check existence and exec($settings['postrip_command']) directly rather than adding a second variable. Also "{$postrip_command}" is actually a bit wasteful. You're doing string replacement to extract the value of the variable. You could just use $postrip_command without bothering with the quotes.
Comment #20
drewish commentedThis is what I'd meant.
Comment #21
drewish commentedCommitted to HEAD (with some changes to the line wrapping on the comments).