The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features
See the new ForumsYou need to be logged in to post in the forums. If you do not have an account, please sign up first.
Winamp and links to mp3
Hi.I just tried to make it simply with opera downloads settings but unfortunately

Please, help me to figure out, how can I:
1. Catch the clicked link or link in page with mp3 file inside (not only with .mp3-extension);
2. Copy full direct url to mp3;
3. Open it by Winamp with `winamp.exe /ADD %s`.
OR
1. Same as above;
2. Same as above;
3. Create new virtual file and paste url to it. File must be correct m3u playlist file;
4. When user makes some action, this virtual playlist file is giving to user for download;
5. He can save it on the disk or open it with winamp by default action.
The second approach is preffered.
Please, give me some solution. At least for 3-5 in second approach.
I'm not entirely sure what you're trying to do, but you should be able to send the URL of a link directly to an application by using "Open with other application" and checking the "Pass web address directly to application" box. Then, if you enter the command you gave above as the program to run, it will send the URL of the file instead of downloading the file. You may need to use the full path to Winamp.
Opera 12.15 - Win 8 Pro x64 All my Opera tools -Tab Vault: Save tabs for later -AutoStack: tabs opened from a stack stay there
I mean, how can I make playlist-file on memory and then call opera download dialog with that virtual file?
Winamp can't eat virtual files and I need physical temporary file on disk. How can I do all of that things?
Create temporary file;
Append lines with URLs in playlist format to this file;
Save it;
Force download dialog.
More complicated for me is to make the temp file and force download acton.
All of this things must be made as opera extension.
Winamp can't eat virtual files and I need physical temporary file on disk. How can I do all of that things?
Create temporary file;
Append lines with URLs in playlist format to this file;
Save it;
Force download dialog.
More complicated for me is to make the temp file and force download acton.
All of this things must be made as opera extension.
If you want an extension, you may be out of luck. Extensions cannot write to files on your disk, nor can they manage downloads. It is possible for an extension to build a file as a data URI and open the generated file in a new tab. It cannot force a download on this file unless your download setting for the file type is set to open automatically. Extensions cannot handle downloads, nor can they change context menus though, so I do not know how you would send a link to such an extension.
Opera 12.15 - Win 8 Pro x64 All my Opera tools -Tab Vault: Save tabs for later -AutoStack: tabs opened from a stack stay there
I think that I can make virtual file, collect strings to it and then give that virtual file to user. In case of user's download settings he'll get the file and while it downloading the temporary file will be created (cache), right?
Then how the extension can give the file to user?
Offtopic: thank you for great Tab Vault extension! I am your fan
Then how the extension can give the file to user?
Offtopic: thank you for great Tab Vault extension! I am your fan
Thanks!
The temporary file won't really get cached. It would just get opened in a new tab just as if you had opened a link to a .zip file (or anything else) in a new tab. To serve the file, the extension would do something like this (assuming the playlist is an m3u file):
The temporary file won't really get cached. It would just get opened in a new tab just as if you had opened a link to a .zip file (or anything else) in a new tab. To serve the file, the extension would do something like this (assuming the playlist is an m3u file):
//build the data uri
var mimeType = 'audio/x-mpegurl';
var datauri = 'data:' + mimeType + ';' + playlistData;
// serve the file
opera.extension.tabs.create({ url: datauri, focused: false });
Opera 12.15 - Win 8 Pro x64 All my Opera tools -Tab Vault: Save tabs for later -AutoStack: tabs opened from a stack stay there
dev.opera.com has all the articles you're looking for, though it looks like they've mixed the documentation in with the example articles so things are a little harder to find. The quick documentation overview page is probably a good place to start, and there's a specific Dev.Opera forum for questions about developing extensions too if you want to ask a question.
Also, I use this method in Tab Vault to export session and bookmarks files of the stored tabs, so you can check out my code on github here. (That script also contains the .win and .adr file parsing code. The functions you're interested in are session.write and session.writeAdr.)
Also, I use this method in Tab Vault to export session and bookmarks files of the stored tabs, so you can check out my code on github here. (That script also contains the .win and .adr file parsing code. The functions you're interested in are session.write and session.writeAdr.)
Opera 12.15 - Win 8 Pro x64 All my Opera tools -Tab Vault: Save tabs for later -AutoStack: tabs opened from a stack stay there
You're welcome!
Opera 12.15 - Win 8 Pro x64 All my Opera tools -Tab Vault: Save tabs for later -AutoStack: tabs opened from a stack stay there