Documentation ¶
Index ¶
Constants ¶
View Source
const ( IVOOX_AUDIO_ML = "http://www.ivoox.com/listen_mn_id_1.m4a?internal=HTML5" IVOOX_AUDIO_ID_RE = `(?m)var\s+idaudio\s+=\s+(\d+)` )
View Source
const ( IVOOX_HOST = "www.ivoox.com" IVOOX_ORIGINALS_URL = "ivoox.com/originals" IVOOX_RE_GENERATOR = `(?m)<generator>iVoox<\/generator>` IVOOX_RE_ENCLOSURE = `(?m)<enclosure\s+url="\S+"\s+type="audio/mpeg"\s+length="(\d+)"/>` ENCLOSURE_TPL = "<enclosure url=\"%s\" type=\"audio/mpeg\" length=\"%s\"/>" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { BaseURL string User string Password string // contains filtered or unexported fields }
App ivoox proxy entry point.
func (*App) HandleError ¶
func (a *App) HandleError(w http.ResponseWriter, status int, msg string)
HandleError Generates an error reponse based on the status code and a custom message.
type Feed ¶
type Feed struct { IsIvooxOriginals bool UserInfo *url.Userinfo BaseURL string // contains filtered or unexported fields }
Feed Contains the feed url, the parsed RSS feed and the modified output.
func (*Feed) Patch ¶
String This is a bit trickier than expected. gofeed does not allow to export to XML, only to JSON. This is a problem as we want to keep the XML output but we don't want to reimplement the whole RSS parser.
The hack consists on using the parsed version to generate the URL and later replace them in the right order in the original RSS. It is ugly, but it works and it is better than reimplmenting the library.
Click to show internal directories.
Click to hide internal directories.