 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Thu Mar 31, 2005 9:35 pm Post subject: Internetradio -> Streamripper GUI |
|
|
This GUI is a front end of a small utility called streamripper. Streamripper rips streams from shoutcast-compatible internetradio stations as mp3 files to your hard drive. It supports automatic splitting and naming into individual tracks.
I have seen that there are at least two other GUIs posted in this forum that do the same thing. But they do not support all the options available and the stations were difficult to edit. I hope I have overcome these limitations.
Give it a try, I have stored more then 1 GB of excellent music in less then 2 hours.
Be aware that the automatic splitting of tracks doesn't work with all stations. Just try several, you'll quickly find a station of your taste that streamripper is capable to split. Or play with the splitpoint adjustments yourself. In these cases see README file in the streamripper directory.
| Code: | ScriptName = StreamRipper v0.1
; 2005-03-30
; OS=WinXP, AHK=1.0.30.04, Author=toralf
;
; What it does:
; It's a GUI for StreamRipper. StreamRipper itself rips shoutcast or icecast radio streams to mp3 files
;
; What you have to do:
; - get streamripper from sourceforge.org (current version 1.61.5)
; - place this script in the same directory
; - download playlists from shoutcast to disc
; - drop the playlist on the GUI
; - start to record the streams as mp3 files to your disc from within the GUI
;
; Known limitations:
; - your firewall has to allow TCP traffic for streamripper and your player
; - your player has to start automatically when a playlist (*.PLS) is executed
; - streamripper continues to rip even when you close the GUI, you have to kill
; the processes manually. If you keep the GUI open, you can kill the processes
; from within the GUI.
;
; Functionality:
; - all options of streamripper 1.61.5 are supported:
; - drag&drop of playlists
; - GUI supports start and stop of ripping and listening to streams
; - multiple streams can be ripped
; - GUI remembers last position and settings between sessions
; - list of stations can be edit
; - GUI can be set transparent and without border
;
; Suggestions are appreciated
#singleinstance force
Gosub, ReadIniFromFile
GoSub, SeparateStringToStationArray
Gosub, BuildStreamRipperGUI
Gosub, BuildStreamRipperGUIOptions
Gosub, FillStationsInList
Return
;############# End of autoexec section ####################################
;############# GUI 1 - Main window ########################################
BuildStreamRipperGUI:
Gui, 1:+ToolWindow +AlwaysOnTop
Gui, 1:Add, Text, , Status Stationname URL
Gui, 1:Add, ListBox, xm Section w260 r8 vLstStations gLstStations HScroll VScroll AltSubmit,
Gui, 1:Add, Button, ys vBtnRecord gBtnRecord Disabled, Record
Gui, 1:Add, Button, vBtnStop gBtnStop Disabled, Stop
Gui, 1:Add, Button, vBtnListen gBtnListen Disabled, Listen
Gui, 1:Add, Button, gBtnOptions, Options
Gui, 1:Show, %PosX_Gui% %PosY_Gui% ,%ScriptName%
return
GuiClose:
Gui, 2:Cancel
GoSub, ConcateStationsToString
;store current position and settings
Gosub, WriteIniToFile
ExitApp
return
LstStations:
ButtonStatus := True
GoSub, ChangeButtonStatus
return
ChangeButtonStatus:
GuiControl, 1: -Disabled%ButtonStatus%, BtnRecord
GuiControl, 1: -Disabled%ButtonStatus%, BtnListen
GuiControl, 1: -Disabled%ButtonStatus%, BtnStop
GuiControl, 2: -Disabled%ButtonStatus%, BtnEdit
GuiControl, 2: -Disabled%ButtonStatus%, BtnMoveUp
GuiControl, 2: -Disabled%ButtonStatus%, BtnMoveDown
GuiControl, 2: -Disabled%ButtonStatus%, BtnDelete
return
BtnRecord:
Gui, 1:Submit, NoHide
StationArray[%LstStations%][1] := "rec"A_Space
Gosub, FillStationsInList
GuiControl, 1:Choose,LstStations,%LstStations%
URL := StationArray[%LstStations%][3]
Exec = %A_ScriptDir%\streamripper.exe %URL%
If Destination is not space
Exec = %Exec% -d "%Destination%"
If (not ChkCreateDirForEachStream)
Exec = %Exec% -s
If (ChkRelay and EdtRelayPort <> "" )
{
Exec = %Exec% -r %EdtRelayPort%
If RadNumOfConnections = 1
Exec = %Exec%
If (RadNumOfConnections = 2 and EdtNumOfConnections <> "" )
Exec = %Exec% -R %EdtNumOfConnections%
If RadNumOfConnections = 3
Exec = %Exec% -R 0
If (not ChkScanForFreePort)
Exec = %Exec% -z
}
If ( UseProxy and EdtProxyURL <> "" )
Exec = %Exec% -p %EdtProxyURL%
If ( ChkRipToSingleFile and EdtRipFileName <> "" )
Exec = %Exec% -a "%EdtRipFileName%"
If (not ChkCreateIndiTracks)
Exec = %Exec% -A
If ChkOverwriteTracksInComplete
Exec = %Exec% -o
If (not ChkOverwriteTracksInIncomplete)
Exec = %Exec% -t
If ChkTrunkCompTracks
Exec = %Exec% -T
If (not ChkAutoReconnect)
Exec = %Exec% -c
If (ChkStopTime and EdtStopTime <> "" )
Exec = %Exec% -l %EdtStopTime%
If (ChkStopSize and EdtStopSize <> "" )
Exec = %Exec% -M %EdtStopSize%
If ChkAddSequenceNumber
Exec = %Exec% -q
If (ChkAddPrefix and EdtPrefix <> "" )
Exec = %Exec% -P "%EdtPrefix%"
If (not ChkAddID3V1)
Exec = %Exec% -i
If ( ChkDiffAgent and EdtDiffAgent <> "" )
Exec = %Exec% -u "%EdtDiffAgent%"
If ( ChkCustomParseRules and EdtCustomParseRules <> "" )
Exec = %Exec% -w "%EdtCustomParseRules%"
If ( ChkSkipTracks and EdtSkipTracks <> "" )
Exec = %Exec% -k %EdtSkipTracks%
If ( ChkRestartTimeout and EdtRestartTimeout <> "" )
Exec = %Exec% -m %EdtRestartTimeout%
If ChkSaveDebugLog
Exec = %Exec% --debug
If ChkOnlyErrorMessages
Exec = %Exec% --quiet
If ChkCustomSpltPt
{
If EdtSpltPtTimeMute is not space
Exec = %Exec% --xs_silence_length=%EdtSpltPtTimeMute%
If ( EdtSpltPtTimeBfCenter <> "" and EdtSpltPtTimeAftChange <> "" )
Exec = %Exec% --xs_search_window=%EdtSpltPtTimeBfCenter%:%EdtSpltPtTimeAftChange%
If EdtSpltPtTimeOffset is not space
Exec = %Exec% --xs_offset=%EdtSpltPtTimeOffset%
If ( EdtSpltPtTimePadBefore <> "" and EdtSpltPtTimePadAfter <> "" )
Exec = %Exec% --xs_padding=%EdtSpltPtTimePadBefore%:%EdtSpltPtTimePadAfter%
}
Run, %Exec%, %Destination%, Hide, PID
StationArray[%LstStations%][4] = %PID%
return
BtnListen:
Gui, 1:Submit, NoHide
TempPLS=%A_ScriptDir%\TempStreamRipperListen.PLS
FileDelete %TempPLS%
IfNotExist, %TempPLS%
{
Title := StationArray[%LstStations%][2]
URL := StationArray[%LstStations%][3]
FileAppend, [playlist]`r`nNumberofentries=1`r`nFile1=%URL%`r`nTitle1=%Title%`r`nLength1=-1`r`nVersion=2`r`n, %TempPLS%
Run, %TempPLS%, , , PID
;StationArray[%LstStations%][4] = %PID%
}
return
BtnStop:
Gui, 1:Submit, NoHide
StationArray[%LstStations%][1] := A_Space
Gosub, FillStationsInList
GuiControl, 1:Choose,LstStations,%LstStations%
PID := StationArray[%LstStations%][4]
If PID is not space
Process, Close, %PID%
return
;############# GUI 2 - Options Window #####################################
BtnOptions:
WinGetPos, PosX, PosY, SizeW, SizeH, %ScriptName%
PosY += SizeH
Gui, 2:Show, x%PosX% y%PosY%, Options - %ScriptName%
return
BuildStreamRipperGUIOptions:
Gui, 2:+ToolWindow +AlwaysOnTop +Owner1
Gui, 2:Add, Text, ym+5,Stations:
Gui, 2:Add, Button, ym Section gBtnImport, Import
Gui, 2:Add, Button, ym vBtnEdit gBtnEdit Disabled, Edit
Gui, 2:Add, Button, ym vBtnMoveUp gBtnMoveUp Disabled, Up
Gui, 2:Add, Button, ym vBtnMoveDown gBtnMoveDown Disabled, Down
Gui, 2:Add, Button, ym vBtnDelete gBtnDelete Disabled, Delete
Gui, 2:Add, Button, xs Section gBtnShoutCast, www.shoutcast
Gui, 2:Add, Button, ys gBtnIceCast, www.icecast
Gui, 2:Add, Tab, xm w360 r14.5 Section, Ripping|Connections|Misc|Splitpoint|Appearance
Gui, 2:Tab, Ripping
Gui, 2:Add, Text, xs+10 ys+30, Destination
Gui, 2:Add, Edit, xs+10 ys+50 w300 r2 vDestination ReadOnly, %Destination%
Gui, 2:Add, Button, xs+320 ys+50 gBtnBrowseDestination, ...
Gui, 2:Add, Checkbox, xs+10 ys+100 vChkCreateDirForEachStream Checked%ChkCreateDirForEachStream%, Create a directory for each stream
Gui, 2:Add, Checkbox, vChkRipToSingleFile Checked%ChkRipToSingleFile%, Rip to single file
Gui, 2:Add, Edit, xs+110 ys+117 w200 r1 vEdtRipFileName, %EdtRipFileName%
Gui, 2:Add, Checkbox, xs+10 ys+140 vChkCreateIndiTracks Checked%ChkCreateIndiTracks%, Create individual tracks
Gui, 2:Add, Checkbox, xs+10 ys+160 vChkOverwriteTracksInComplete Checked%ChkOverwriteTracksInComplete%, Overwrite tracks in complete directory
Gui, 2:Add, Checkbox, xs+10 ys+180 vChkOverwriteTracksInIncomplete Checked%ChkOverwriteTracksInIncomplete%, Overwrite tracks in incomplete directory
Gui, 2:Add, Checkbox, xs+10 ys+200 vChkTrunkCompTracks Checked%ChkTrunkCompTracks%, Truncate completed tracks in incomplete directory
Gui, 2:Add, Checkbox, xs+10 ys+220 vChkAddID3V1 Checked%ChkAddID3V1%, Add ID3V1 Tags to output file
Gui, 2:Add, Checkbox, xs+10 ys+240 vChkAddSequenceNumber Checked%ChkAddSequenceNumber%, Add sequence number to output filenames
Gui, 2:Add, Checkbox, xs+10 ys+260 vChkAddPrefix Checked%ChkAddPrefix%, Add prefix to each ripped file
Gui, 2:Add, Edit, xs+170 ys+257 w70 r1 vEdtPrefix, %EdtPrefix%
Gui, 2:Add, Checkbox, xs+10 ys+280 vChkSkipTracks Checked%ChkSkipTracks%, Skip over
Gui, 2:Add, Edit, xs+79 ys+277 w20 r1 Number Limit2 vEdtSkipTracks, %EdtSkipTracks%
Gui, 2:Add, Text, xs+103 ys+280 ,tracks before starting to rip
Gui, 2:Tab, Connections
Gui, 2:Add, Checkbox, xs+10 ys+30 vChkAutoReconnect Checked%ChkAutoReconnect%, Auto-reconnect
Gui, 2:Add, Checkbox, xs+10 ys+50 vChkDiffAgent Checked%ChkDiffAgent%, Use a different UserAgent
Gui, 2:Add, Edit, xs+160 ys+47 w120 r1 vEdtDiffAgent, %EdtDiffAgent%
Gui, 2:Add, Checkbox, xs+10 ys+70 vChkRestartTimeout Checked%ChkRestartTimeout%, Timeout to restart connection
Gui, 2:Add, Edit, xs+180 ys+67 w50 r1 Number vEdtRestartTimeout, %EdtRestartTimeout%
Gui, 2:Add, Checkbox, xs+10 ys+90 vChkRelay Checked%ChkRelay%, Enable relay on port (default 8000):
Gui, 2:Add, Edit, xs+200 ys+87 w40 r1 Number Limit5 vEdtRelayPort, %EdtRelayPort%
Gui, 2:Add, Checkbox, xs+10 ys+110 vChkScanForFreePort Checked%ChkScanForFreePort%, Scan for free port if port isn't available
Gui, 2:Add, GroupBox, xs+10 ys+130 w270 r3, Simultaneous connections to relay server
Gui, 2:Add, Radio, xs+30 ys+150 vRadNumOfConnections checked, one connection
Gui, 2:Add, Radio, , Connections:
Gui, 2:Add, Radio, , Limited only by processor and network speed
Gui, 2:Add, Edit, xs+110 ys+167 w20 r1 Number Limit2 vEdtNumOfConnections, %EdtNumOfConnections%
Gui, 2:Tab, Misc
Gui, 2:Add, Checkbox, xs+10 ys+30 vUseProxy Checked%UseProxy%, Use Proxy Server
Gui, 2:Add, Edit, xs+120 ys+27 w200 r1 vEdtProxyURL, %EdtProxyURL%
Gui, 2:Add, Checkbox, xs+10 ys+50 vChkSaveDebugLog Checked%ChkSaveDebugLog%, Save debugging log
Gui, 2:Add, Checkbox, xs+10 ys+70 vChkOnlyErrorMessages Checked%ChkOnlyErrorMessages%, Write only error messages to console
Gui, 2:Add, Checkbox, xs+10 ys+90 vChkStopTime Checked%ChkStopTime%, Stop after
Gui, 2:Add, Edit, xs+80 ys+87 w60 r1 Number vEdtStopTime, %EdtStopTime%
Gui, 2:Add, Text, xs+143 ys+90 ,seconds
Gui, 2:Add, Checkbox, xs+10 ys+110 vChkStopSize Checked%ChkStopSize%, Stop after
Gui, 2:Add, Edit, xs+80 ys+107 w60 r1 Number vEdtStopSize, %EdtStopSize%
Gui, 2:Add, Text, xs+143 ys+110 ,megabytes
Gui, 2:Add, Checkbox, xs+10 ys+130 vChkCustomParseRules Checked%ChkCustomParseRules%, Use customized parsing rules
Gui, 2:Add, Edit, xs+10 ys+147 w250 r1 vEdtCustomParseRules, %EdtCustomParseRules%
Gui, 2:Add, Button, xs+270 ys+147 gBtnCustomParseRules, ...
Gui, 2:Tab, Splitpoint
Gui, 2:Add, Checkbox, xs+10 ys+30 vChkCustomSpltPt gChkCustomSpltPt Checked%ChkCustomSpltPt%, Customize Splitpoint (leave fields blank to skip some options)
NotChkCustomSpltPt := not ChkCustomSpltPt
Gui, 2:Add, Text, xs+10 ys+50, Volume must be less than xsd_min_volume for msec
Gui, 2:Add, Edit, xs+230 ys+47 w50 r1 Number vEdtSpltPtTimeMute Disabled%NotChkCustomSpltPt%, %EdtSpltPtTimeMute%
Gui, 2:Add, Text, xs+10 ys+70, Search msec for silence before nominal center
Gui, 2:Add, Edit, xs+50 ys+67 w50 r1 Number vEdtSpltPtTimeBfCenter Disabled%NotChkCustomSpltPt%, %EdtSpltPtTimeBfCenter%
Gui, 2:Add, Text, xs+10 ys+90, Search msec for silence after nominal track change position
Gui, 2:Add, Edit, xs+50 ys+87 w50 r1 Number vEdtSpltPtTimeAftChange Disabled%NotChkCustomSpltPt%, %EdtSpltPtTimeAftChange%
Gui, 2:Add, Edit, xs+10 ys+107 w50 r1 Number vEdtSpltPtTimeOffset Disabled%NotChkCustomSpltPt%, %EdtSpltPtTimeOffset%
Gui, 2:Add, Text, xs+65 ys+110, msec offset from center of silence window
Gui, 2:Add, Edit, xs+10 ys+127 w50 r1 Number vEdtSpltPtTimePadBefore Disabled%NotChkCustomSpltPt%, %EdtSpltPtTimePadBefore%
Gui, 2:Add, Text, xs+65 ys+130, msec to pad before splitpoint
Gui, 2:Add, Edit, xs+10 ys+147 w50 r1 Number vEdtSpltPtTimePadAfter Disabled%NotChkCustomSpltPt%, %EdtSpltPtTimePadAfter%
Gui, 2:Add, Text, xs+65 ys+150, msec to pad after splitpoint
Gui, 2:Tab, Appearance
Gui, 2:Add, Checkbox, xs+10 ys+30 vChkNoBorder gChkNoBorder Checked%ChkNoBorder%, Remove border of window
Gui, 2:Add, Checkbox, xs+10 ys+50 vChkTransparent gChkTransparent Checked%ChkTransparent%, Show window transparent
Gui, 2:Add, Slider, xs+10 ys+70 w255 Range0-255 ToolTipBottom Center vSldTransparent gSldTransparent, %SldTransparent%
Gui, 2:Tab
Gui, 2:Add, Button, xm Section gBtnApply, Apply
Gui, 2:Add, Button, ys gBtnCancel, Cancel
return
BtnImport:
FileSelectFile, SelectedFiles,M3,, Select Playlist with stations, Playlists (*.pls)
If SelectedFiles is not space
{
Loop, parse, SelectedFiles, `n
{
if A_Index = 1
PathSelectedFiles = %A_LoopField%
else
{
SelectedFile = %PathSelectedFiles%\%A_LoopField%
Gosub, AddStationsToList
}
}
Gosub, FillStationsInList
}
return
2GuiDropFiles:
GuiDropFiles:
Loop, parse, A_GuiControlEvent, `n
{
SelectedFile = %A_LoopField%
Gosub, AddStationsToList
}
Gosub, FillStationsInList
return
AddStationsToList:
SearchForTitle := False
FoundStation := False
Loop, Read, %SelectedFile%
{
Line = %A_LoopReadLine%
StringLeft, First4Char, Line, 4
StringMid, 5thChar, Line, 5, 1
If SearchForTitle
{
StringGetPos, Position, Line, ), L1
Position += 2
StringTrimLeft, Station, Line, %Position%
Station = %Station%
SearchForTitle := False
FoundStation := True
}
else If (First4Char = "File")
{
StringTrimLeft, URL, Line, 6
StationID = %5thChar%
SearchForTitle := True
}
If FoundStation
{
NumberOfStations ++
StationArray[%NumberOfStations%][1] := A_Space
StationArray[%NumberOfStations%][2] = %StationID%) %Station%
StationArray[%NumberOfStations%][3] = %URL%
StationArray[%NumberOfStations%][4] := A_Space
FoundStation := False
}
}
return
BtnMoveUp:
Gui, 1:Submit, NoHide
If LstStations > 1
{
NewPosition := LstStations - 1
GoSub, ChangeStationsPosition
Gosub, FillStationsInList
GuiControl, 1:Choose,LstStations,%NewPosition%
}
return
BtnMoveDown:
Gui, 1:Submit, NoHide
If (LstStations < NumberOfStations)
{
NewPosition := LstStations + 1
GoSub, ChangeStationsPosition
Gosub, FillStationsInList
GuiControl, 1:Choose,LstStations,%NewPosition%
}
return
ChangeStationsPosition:
TempStatus := StationArray[%NewPosition%][1]
TempTitle := StationArray[%NewPosition%][2]
TempURL := StationArray[%NewPosition%][3]
TempPID := StationArray[%NewPosition%][4]
StationArray[%NewPosition%][1] := StationArray[%LstStations%][1]
StationArray[%NewPosition%][2] := StationArray[%LstStations%][2]
StationArray[%NewPosition%][3] := StationArray[%LstStations%][3]
StationArray[%NewPosition%][4] := StationArray[%LstStations%][4]
StationArray[%LstStations%][1] = %TempStatus%
StationArray[%LstStations%][2] = %TempTitle%
StationArray[%LstStations%][3] = %TempURL%
StationArray[%LstStations%][4] = %TempPID%
return
BtnDelete:
Gui, 1:Submit, NoHide
Count := NumberOfStations - LstStations + 1
Loop %Count%
{
Pos := A_Index + LstStations - 1
PosPlus := Pos + 1
StationArray[%Pos%][1] := StationArray[%PosPlus%][1]
StationArray[%Pos%][2] := StationArray[%PosPlus%][2]
StationArray[%Pos%][3] := StationArray[%PosPlus%][3]
StationArray[%Pos%][4] := StationArray[%PosPlus%][4]
}
NumberOfStations --
Gosub, FillStationsInList
ButtonStatus := False
GoSub, ChangeButtonStatus
return
FillStationsInList:
ListOfStations =
Loop, %NumberOfStations%
{
Status := StationArray[%A_Index%][1]
Title := StationArray[%A_Index%][2]
URL := StationArray[%A_Index%][3]
ListOfStations = %ListOfStations%|%Status%%Title% -->%A_TAB%%URL%
}
If NumberOfStations = 0
ListOfStations = |
GuiControl, 1: , LstStations, %ListOfStations%
return
BtnShoutCast:
Run, www.shoutcast.com
return
BtnIceCast:
Run, www.icecast.org
return
BtnBrowseDestination:
FileSelectFolder, SelectedFolder,, 3, Select Folder to store stream
If SelectedFolder is not space
GuiControl, ,Destination,%SelectedFolder%
return
BtnCustomParseRules:
FileSelectFile, SelectedFile,3,, Select parse file,
If SelectedFile is not space
GuiControl, ,EdtCustomParseRules,%SelectedFile%
return
ChkCustomSpltPt:
Gui, Submit, NoHide
GuiControl, -Disabled%ChkCustomSpltPt%, EdtSpltPtTimeMute
GuiControl, -Disabled%ChkCustomSpltPt%, EdtSpltPtTimeBfCenter
GuiControl, -Disabled%ChkCustomSpltPt%, EdtSpltPtTimeAftChange
GuiControl, -Disabled%ChkCustomSpltPt%, EdtSpltPtTimeOffset
GuiControl, -Disabled%ChkCustomSpltPt%, EdtSpltPtTimePadBefore
GuiControl, -Disabled%ChkCustomSpltPt%, EdtSpltPtTimePadAfter
return
ChkNoBorder:
Gui, 2:Submit, NoHide
If ChkNoBorder
Gui, 1:-Caption
else
Gui, 1:+Caption
Gui, 1:Show, AutoSize
return
ChkTransparent:
Gui, 2:Submit, NoHide
SldTransparent:
If ChkTransparent
{
WinSet, Transparent, %SldTransparent%,%ScriptName%, ,Options
}
else
WinSet, Transparent, off,%ScriptName%, ,Options
return
BtnApply:
Gui, 2:Submit
return
2GuiClose:
BtnCancel:
Gui, 2:Cancel
return
;############# GUI 3 - Edit window ########################################
BtnEdit:
Gui, 1:Submit, NoHide
Title := StationArray[%LstStations%][2]
URL := StationArray[%LstStations%][3]
GoSub, BuildStreamRipperGUIEdit
return
BuildStreamRipperGUIEdit:
Gui, 1:+Disabled
Gui, 2:+Disabled
Gui, 3:+ToolWindow +AlwaysOnTop +Owner1
Gui, 3:Add, Text, ,Title:
Gui, 3:Add, Edit, ym-3 r1 w300 vTitle,%Title%
Gui, 3:Add, Text, xm Section ,URL:
Gui, 3:Add, Edit, ys-3 r1 w300 vURL,%URL%
Gui, 3:Add, Button, xm Section gBtnApplyEdit, Apply
Gui, 3:Add, Button, ys gBtnCancelEdit, Cancel
WinGetPos, PosX, PosY, SizeW, SizeH, %ScriptName%
Gui, 3:Show, x%PosX% y%PosY%,Edit - %ScriptName%
return
BtnApplyEdit:
Gui, 3:Submit
StationArray[%LstStations%][2] = %Title%
StationArray[%LstStations%][3] = %URL%
Gosub, FillStationsInList
GuiControl, 1:Choose,LstStations,%LstStations%
GoSub, BtnCancelEdit
return
3GuiClose:
BtnCancelEdit:
Gui, 3:Destroy
Gui, 1:-Disabled
Gui, 2:-Disabled
return
;############# Store and retrieve settings ################################
ReadIniFromFile:
IniRead, PosX_Gui, %ScriptName%.ini, General, PosX_Gui,
IniRead, PosY_Gui, %ScriptName%.ini, General, PosY_Gui,
IniRead, ListOfStationTitles, %ScriptName%.ini, General, ListOfStationTitles, %A_Space%
IniRead, ListOfStationURLs, %ScriptName%.ini, General, ListOfStationURLs, %A_Space%
IniRead, Destination, %ScriptName%.ini, Ripping, Destination, C:\
IniRead, ChkCreateDirForEachStream, %ScriptName%.ini, Ripping, ChkCreateDirForEachStream, 1
IniRead, ChkRipToSingleFile, %ScriptName%.ini, Ripping, ChkRipToSingleFile, 0
IniRead, EdtRipFileName, %ScriptName%.ini, Ripping, EdtRipFileName, Stream
IniRead, ChkCreateIndiTracks, %ScriptName%.ini, Ripping, ChkCreateIndiTracks, 1
IniRead, ChkOverwriteTracksInComplete, %ScriptName%.ini, Ripping, ChkOverwriteTracksInComplete, 0
IniRead, ChkOverwriteTracksInIncomplete, %ScriptName%.ini, Ripping, ChkOverwriteTracksInIncomplete, 1
IniRead, ChkTrunkCompTracks, %ScriptName%.ini, Ripping, ChkTrunkCompTracks, 0
IniRead, ChkAddID3V1, %ScriptName%.ini, Ripping, ChkAddID3V1, 1
IniRead, ChkAddSequenceNumber, %ScriptName%.ini, Ripping, ChkAddSequenceNumber, 0
IniRead, ChkAddPrefix, %ScriptName%.ini, Ripping, ChkAddPrefix, 0
IniRead, EdtPrefix, %ScriptName%.ini, Ripping, EdtPrefix, stream_
IniRead, ChkSkipTracks, %ScriptName%.ini, Ripping, ChkSkipTracks, 0
IniRead, EdtSkipTracks, %ScriptName%.ini, Ripping, EdtSkipTracks, 2
IniRead, RadNumOfConnections, %ScriptName%.ini, Connections, RadNumOfConnections, 1
IniRead, EdtNumOfConnections, %ScriptName%.ini, Connections, EdtNumOfConnections, 5
IniRead, ChkAutoReconnect, %ScriptName%.ini, Connections, ChkAutoReconnect, 1
IniRead, ChkDiffAgent, %ScriptName%.ini, Connections, ChkDiffAgent, 0
IniRead, EdtDiffAgent, %ScriptName%.ini, Connections, EdtDiffAgent, Streamripper/1.x
IniRead, ChkRestartTimeout, %ScriptName%.ini, Connections, ChkRestartTimeout, 0
IniRead, EdtRestartTimeout, %ScriptName%.ini, Connections, EdtRestartTimeout, 1000
IniRead, ChkRelay, %ScriptName%.ini, Connections, ChkRelay, 0
IniRead, EdtRelayPort, %ScriptName%.ini, Connections, EdtRelayPort, 8000
IniRead, ChkScanForFreePort, %ScriptName%.ini, Connections, ChkScanForFreePort, 1
IniRead, UseProxy, %ScriptName%.ini, Misc, UseProxy, 0
IniRead, EdtProxyURL, %ScriptName%.ini, Misc, EdtProxyURL, %A_Space%
IniRead, ChkSaveDebugLog, %ScriptName%.ini, Misc, ChkSaveDebugLog, 0
IniRead, ChkOnlyErrorMessages, %ScriptName%.ini, Misc, ChkOnlyErrorMessages, 0
IniRead, ChkStopTime, %ScriptName%.ini, Misc, ChkStopTime, 0
IniRead, EdtStopTime, %ScriptName%.ini, Misc, EdtStopTime, 3600
IniRead, ChkStopSize, %ScriptName%.ini, Misc, ChkStopSize, 0
IniRead, EdtStopSize, %ScriptName%.ini, Misc, EdtStopSize, 4700
IniRead, ChkCustomParseRules, %ScriptName%.ini, Misc, ChkCustomParseRules, 0
IniRead, EdtCustomParseRules, %ScriptName%.ini, Misc, EdtCustomParseRules, %A_Space%
IniRead, ChkCustomSpltPt, %ScriptName%.ini, Splitpoint, ChkCustomSpltPt, 0
IniRead, EdtSpltPtTimeMute, %ScriptName%.ini, Splitpoint, EdtSpltPtTimeMute, %A_Space%
IniRead, EdtSpltPtTimeBfCenter, %ScriptName%.ini, Splitpoint, EdtSpltPtTimeBfCenter, %A_Space%
IniRead, EdtSpltPtTimeAftChange, %ScriptName%.ini, Splitpoint, EdtSpltPtTimeAftChange, %A_Space%
IniRead, EdtSpltPtTimeOffset, %ScriptName%.ini, Splitpoint, EdtSpltPtTimeOffset, %A_Space%
IniRead, EdtSpltPtTimePadBefore, %ScriptName%.ini, Splitpoint, EdtSpltPtTimePadBefore, %A_Space%
IniRead, EdtSpltPtTimePadAfter, %ScriptName%.ini, Splitpoint, EdtSpltPtTimePadAfter, %A_Space%
IniRead, ChkNoBorder, %ScriptName%.ini, Appearance, ChkNoBorder, 0
IniRead, ChkTransparent, %ScriptName%.ini, Appearance, ChkTransparent, 0
IniRead, SldTransparent, %ScriptName%.ini, Appearance, SldTransparent, 100
return
SeparateStringToStationArray:
StringSplit,Array,ListOfStationTitles,|
Loop, %Array0%
{
StationArray[%A_Index%][1] := A_Space
StationArray[%A_Index%][2] := Array%A_Index%
StationArray[%A_Index%][4] := A_Space
}
StringSplit,Array,ListOfStationURLs,|
Loop, %Array0%
StationArray[%A_Index%][3] := Array%A_Index%
NumberOfStations = %Array0%
return
ConcateStationsToString:
ListOfStationTitles =
ListOfStationURLs =
Loop, %NumberOfStations%
{
Title := StationArray[%A_Index%][2]
URL := StationArray[%A_Index%][3]
ListOfStationTitles = %ListOfStationTitles%|%Title%
ListOfStationURLs = %ListOfStationURLs%|%URL%
}
StringTrimLeft,ListOfStationTitles,ListOfStationTitles,1
StringTrimLeft,ListOfStationURLs,ListOfStationURLs,1
return
WriteIniToFile:
WinGetPos, PosX, PosY, SizeW, SizeH, %ScriptName%
Gui, 1:Submit
IniWrite, x%PosX%, %ScriptName%.ini, General, PosX_Gui
IniWrite, y%PosY%, %ScriptName%.ini, General, PosY_Gui
IniWrite, %ListOfStationTitles%, %ScriptName%.ini, General, ListOfStationTitles
IniWrite, %ListOfStationURLs%, %ScriptName%.ini, General, ListOfStationURLs
IniWrite, %Destination%, %ScriptName%.ini, Ripping, Destination
IniWrite, %ChkCreateDirForEachStream%, %ScriptName%.ini, Ripping, ChkCreateDirForEachStream
IniWrite, %ChkRipToSingleFile%, %ScriptName%.ini, Ripping, ChkRipToSingleFile
IniWrite, %EdtRipFileName%, %ScriptName%.ini, Ripping, EdtRipFileName
IniWrite, %ChkCreateIndiTracks%, %ScriptName%.ini, Ripping, ChkCreateIndiTracks
IniWrite, %ChkOverwriteTracksInComplete%, %ScriptName%.ini, Ripping, ChkOverwriteTracksInComplete
IniWrite, %ChkOverwriteTracksInIncomplete%, %ScriptName%.ini, Ripping, ChkOverwriteTracksInIncomplete
IniWrite, %ChkTrunkCompTracks%, %ScriptName%.ini, Ripping, ChkTrunkCompTracks
IniWrite, %ChkAddID3V1%, %ScriptName%.ini, Ripping, ChkAddID3V1
IniWrite, %ChkAddSequenceNumber%, %ScriptName%.ini, Ripping, ChkAddSequenceNumber
IniWrite, %ChkAddPrefix%, %ScriptName%.ini, Ripping, ChkAddPrefix
IniWrite, %EdtPrefix%, %ScriptName%.ini, Ripping, EdtPrefix
IniWrite, %ChkSkipTracks%, %ScriptName%.ini, Ripping, ChkSkipTracks
IniWrite, %EdtSkipTracks%, %ScriptName%.ini, Ripping, EdtSkipTracks
IniWrite, %RadNumOfConnections%, %ScriptName%.ini, Connections, RadNumOfConnections
IniWrite, %EdtNumOfConnections%, %ScriptName%.ini, Connections, EdtNumOfConnections
IniWrite, %ChkAutoReconnect%, %ScriptName%.ini, Connections, ChkAutoReconnect
IniWrite, %ChkDiffAgent%, %ScriptName%.ini, Connections, ChkDiffAgent
IniWrite, %EdtDiffAgent%, %ScriptName%.ini, Connections, EdtDiffAgent
IniWrite, %ChkRestartTimeout%, %ScriptName%.ini, Connections, ChkRestartTimeout
IniWrite, %EdtRestartTimeout%, %ScriptName%.ini, Connections, EdtRestartTimeout
IniWrite, %ChkRelay%, %ScriptName%.ini, Connections, ChkRelay
IniWrite, %EdtRelayPort%, %ScriptName%.ini, Connections, EdtRelayPort
IniWrite, %ChkScanForFreePort%, %ScriptName%.ini, Connections, ChkScanForFreePort
IniWrite, %UseProxy%, %ScriptName%.ini, Misc, UseProxy
IniWrite, %EdtProxyURL%, %ScriptName%.ini, Misc, EdtProxyURL
IniWrite, %ChkSaveDebugLog%, %ScriptName%.ini, Misc, ChkSaveDebugLog
IniWrite, %ChkOnlyErrorMessages%, %ScriptName%.ini, Misc, ChkOnlyErrorMessages
IniWrite, %ChkStopTime%, %ScriptName%.ini, Misc, ChkStopTime
IniWrite, %EdtStopTime%, %ScriptName%.ini, Misc, EdtStopTime
IniWrite, %ChkStopSize%, %ScriptName%.ini, Misc, ChkStopSize
IniWrite, %EdtStopSize%, %ScriptName%.ini, Misc, EdtStopSize
IniWrite, %ChkCustomParseRules%, %ScriptName%.ini, Misc, ChkCustomParseRules
IniWrite, %EdtCustomParseRules%, %ScriptName%.ini, Misc, EdtCustomParseRules
IniWrite, %ChkCustomSpltPt%, %ScriptName%.ini, Splitpoint, ChkCustomSpltPt
IniWrite, %EdtSpltPtTimeMute%, %ScriptName%.ini, Splitpoint, EdtSpltPtTimeMute
IniWrite, %EdtSpltPtTimeBfCenter%, %ScriptName%.ini, Splitpoint, EdtSpltPtTimeBfCenter
IniWrite, %EdtSpltPtTimeAftChange%, %ScriptName%.ini, Splitpoint, EdtSpltPtTimeAftChange
IniWrite, %EdtSpltPtTimeOffset%, %ScriptName%.ini, Splitpoint, EdtSpltPtTimeOffset
IniWrite, %EdtSpltPtTimePadBefore%, %ScriptName%.ini, Splitpoint, EdtSpltPtTimePadBefore
IniWrite, %EdtSpltPtTimePadAfter%, %ScriptName%.ini, Splitpoint, EdtSpltPtTimePadAfter
IniWrite, %ChkNoBorder%, %ScriptName%.ini, Appearance, ChkNoBorder
IniWrite, %ChkTransparent%, %ScriptName%.ini, Appearance, ChkTransparent
IniWrite, %SldTransparent%, %ScriptName%.ini, Appearance, SldTransparent
return
;############# End of File ################################################# |
_________________ Ciao
toralf  |
|
| Back to top |
|
 |
garry Guest
|
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Mon Apr 11, 2005 10:34 am Post subject: |
|
|
Hi Garry,
Thanks for the links.
Regarding the "hide": I do not like to have all these dos windows visible, since I normally rip 4 to 6 stations at the same time. But this could be easily added as an option. _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Sephra
Joined: 12 Apr 2005 Posts: 4 Location: So-Cal
|
Posted: Thu Apr 14, 2005 10:45 am Post subject: |
|
|
Much appreciated.
The only thing I can provide in return is a site I use for internet radio. It's all techno but it's pure quality: http://di.fm _________________ "Truly great madness cannot be achieved without significant intelligence." --Henrik Tikkanen |
|
| Back to top |
|
 |
unknown Guest
|
Posted: Thu Apr 14, 2005 2:55 pm Post subject: |
|
|
Error --> Run, %Exec%, %Destination%, , PID
what i have to do here? Or what's wrong, i can't rip music.
got all plugins what's needed (streamripper 1.61.7)... |
|
| Back to top |
|
 |
Wingfat
Joined: 23 Aug 2004 Posts: 193 Location: East Bay, California USA
|
Posted: Thu Apr 14, 2005 7:49 pm Post subject: |
|
|
Hey can any one copy and paste in here some good links directly to some radio stations? I am at work and all internet radio pages on the web are blocked. i have only one saved link to a cool techno stream, but i would like to have a Classic Rock station, and maybe an 80's one too.
please  _________________ ----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
----------------------------- |
|
| Back to top |
|
 |
TeknoMusicMan
Joined: 14 Apr 2005 Posts: 188 Location: Wisconsin, USA
|
|
| Back to top |
|
 |
Wingfat
Joined: 23 Aug 2004 Posts: 193 Location: East Bay, California USA
|
Posted: Thu Apr 14, 2005 9:24 pm Post subject: |
|
|
TeknoMusicMan
Thanks a lot! that is awesome! now all i need is a classic rock station and i am set.
and French MCs are funny sometimes.. i dont understand, but thye sound hella funny. _________________ ----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
----------------------------- |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Thu Apr 14, 2005 9:30 pm Post subject: |
|
|
| unknown wrote: | Error --> Run, %Exec%, %Destination%, , PID
what i have to do here? Or what's wrong, i can't rip music.
got all plugins what's needed (streamripper 1.61.7)... |
hi unknown,
Can you specify more in detail where you have problem with the script?
These two things might help, though:
1) streamripper.exe has to be in the same directory as the script
2) you have to choose an existing directory as destination path _________________ Ciao
toralf  |
|
| Back to top |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 740 Location: Berlin
|
Posted: Fri Apr 15, 2005 8:12 pm Post subject: |
|
|
My favo(u)rites:
Fritz
The stream (.smi)
(They do talk, and German , but their choice of music is generally excellent)
And:
3voor12 - VPRO Radio
They have streams, and lots of them. The VPRO is by far the best Dutch broadcaster.
And you can also hear and see almost all (public) Dutch radio and tv here (it's the best free site I know that offers this, but ofcourse understanding Dutch heightens the pleasure ):
Omroep.nl
Blastro is also a nice site with much content (new videos!) _________________ (sorry, homesite offline atm) |
|
| Back to top |
|
 |
Serenity
Joined: 08 Nov 2004 Posts: 700
|
Posted: Fri Apr 15, 2005 11:12 pm Post subject: |
|
|
What website is this stream from? |
|
| Back to top |
|
 |
garry Guest
|
Posted: Sat Apr 16, 2005 10:57 am Post subject: |
|
|
Hi Serenity,
I did'nt find it also with shoutcast
winamp shows:
we can't define it , European Trance
Trancequility volume32 DJ Doboy hi NRG |
|
| Back to top |
|
 |
NewRipper Guest
|
Posted: Sun Dec 11, 2005 12:30 am Post subject: Help installing Streamripper GUI |
|
|
Dear Toralf:
Thanks for the script. How do I use it though?
I am new at this.
I have copied the script you provided as a .ini file into the same directory as StreamRipper.
I don't know how to make it work though as no GUI appears.
Please help.
Thanks, NR |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 968 Location: switzerland
|
Posted: Sun Dec 11, 2005 10:34 am Post subject: |
|
|
need a playlist file, move to the open window,mark and play
need streamripper to record
streamripper.exe and tre.dll http://streamripper.sourceforge.net/
search adresses in http://www.shoutcast.com
countryHeartland.pls:
| Code: | [playlist]
numberofentries=1
File1=http://130.166.72.1:8006
Title1=
Length1=
Version=2
| AngolanaCultura.pls: | Code: | [playlist]
numberofentries=1
File1=http://67.15.82.69:8092
Title1=
Length1=
Version=2
|
|
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Sun Dec 11, 2005 12:31 pm Post subject: Re: Help installing Streamripper GUI |
|
|
| NewRipper wrote: | How do I use it though?
I am new at this.
I have copied the script you provided as a .ini file into the same directory as StreamRipper.
I don't know how to make it work though as no GUI appears. | Do you have AutoHotKey installed? Save the script as an .ahk file. Then start the script.
The rest is described by garry above or in the script itself | Quote: | ; What you have to do:
; - get streamripper from sourceforge.org (current version 1.61.5)
; - place this script in the same directory
; - download playlists from shoutcast to disc
; - drop the playlist on the GUI
; - start to record the streams as mp3 files to your disc from within the GUI
;
|
_________________ Ciao
toralf  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|