hiwatt99
-
Posts
9 -
Joined
-
Last visited
Posts posted by hiwatt99
-
-
+1, thanks for all the efforts.
--m
-
Hiwatt99, strange, not a big deal by any means, but when it creates the calendar based filename, it's naming them by the month of September (09), instead of October (10). I looked at your code in the post, and it looks right, so perhaps it's slightly different in the actual jar? Could it simply need an (add 1)>>?
That's an odd artifact of the Java Calendar class -- it returns 0-based months, i.e., 0...11. The point of using the date was just to ensure unique filenames, not to be an accurate timestamp. ;-) Just add one to the returned value if you want the correct date/time.
Now if I can just get Cooper's code to work it will all be moot...
--h
-
At a forum member's request, I uploaded my hacked version (which saves the 'unknown' MP3s) here:
http://www.megaupload.com/?d=91MI1BR2
Sorry about the lamer download site, but hey, it's free.
For those like me that don't trust anonymous jars ;-), here are the changes:
utilSongInfo.java
import java.util.*;
// Change main c'tor:
public SongInfo(String artist, String title) {
if ( null == artist )
this.artist = "unknown";
else
this.artist = artist;
if ( null == title ) {
GregorianCalendar gc = new GregorianCalendar();
this.title = "" +
gc.get(Calendar.YEAR) +
Util.fmt(gc.get(Calendar.MONTH),2) +
Util.fmt(gc.get(Calendar.DAY_OF_MONTH),2) +
Util.fmt(gc.get(Calendar.HOUR_OF_DAY),2) +
Util.fmt(gc.get(Calendar.MINUTE),2) +
Util.fmt(gc.get(Calendar.SECOND),2);
}
else
this.title = title;
}
...
add to util/Util.java:
public static String fmt(int i, int w) {
StringBuffer sb = new StringBuffer();
while (w-- > 0) {
sb.append( (char)('0' + (i % 10)) );
i /= 10;
}
sb.reverse();
return sb.toString();
}
--h
-
The SWF is loading fine (probably redirected at pandora), but the 'artist' and 'title' parameters are no longer present, which is confusing 7.3 beta.
--h
-
Another option might be to programatically follow the 'backstage' link and extract the <TITLE> text. I'm a flash dummy, though, so I have no clue how to do this.
-
I made a quick hack so that it will save MP3s as
unknown-<date to the second>.mp3
but this is obviously pretty weak. Anyone have any clues
about how to sort out the name and title?
--h
-
I suspect one or more of the strings in Constants.java need to be updated, but I don't know how the original author sussed out these values in the first place.
public static final String PARAM_ARTIST = "artist";
public static final String PARAM_ALBUM = "album";
public static final String PARAM_GENRE = "genre";
public static final String PARAM_COMMENT = "comment";
public static final String PARAM_YEAR = "year";
public static final String PARAM_TITLE = "title";
etc.
--h
-
Is there a way to get this to work with an HTTP proxy (i.e., at work )?
-h
Flash upgrade required by pandora
in Pandora Timeshifting
Posted
+1, excellent greasemonkey hack. :D
--h