VLC > VLC plugins >
https://web.archive.org/web/20160718195007/http://addons.videolan.org:80/content/show.php/Remember+Playing+Now?content=171318
https://web.archive.org/web/20170206054146/http://gna.org/projects/rem-play-now-vlc/
Appends the ‘Now Playing’ info to a text file.
I use it to save the title when listening to a web radio station that puts the artist/song in VLC’s title.
—
- 2016-11-03 – v2016-09-13 on VLC 2.2.4 on Windows 10 64bit.
-
2016-03-20 – (version not recorded) on VLC 2.2.1 on Windows 10 64bit.
Usage ∞
1) Place remember-now-playing.lua in
C:\Program Files\VideoLAN\vlc\lua\extensions
or
C:\Program Files (x86)\VideoLAN\vlc\lua\extensions
2) View > Remember ‘Now Playing’
3) A new line is placed in
C:\Users\user\AppData\Roaming\vlc\lua\extensions\userdata\remember-playing-now.txt
TODO – Linux usage ∞
TEST – place lua file here:
~/.local/share/vlc/lua/extensions/
TODO – location of remember-playing-now.txt .. is it this? :
~/.local/share/vlc/lua/extensions/userdata/remember-playing-now.txt
Alternate ∞
When poking around, I found “Now Playing Text plugin for VLC”
-
2016-03-20 – Tested and does not work for vlc 2.2.1 on Windows 10.
- I believe that it has to be modified slightly, but I found another/a working plugin that I’ll use instead.
Spoiler
-- Extension description function descriptor() return { title = "Now Playing Text File" ; version = "1.0" ; author = "TheFuzzy" ; shortdesc = "Outputs song to text file"; description = "Outputs the title of the currently playing song to a text file." ; capabilities = { "input-listener" } } end pathdialog=0 function activate() vlc.msg.dbg("[now playing text] Welcome") --vlc.msg.dbg("[now playing text] Files will be stored in") --vlc.msg.dbg(vlc.config.userdatadir()) titlefile=vlc.config.userdatadir().."/np_title.txt" artistfile=vlc.config.userdatadir().."/np_artist.txt" -- ensure files are created pcall(dofile,titlefile) pcall(dofile,artistfile) pathdialog = vlc.dialog( "Now Playing Text" ) pathdialog:add_label( "Your text files will be located here:" ) pathdialog:add_text_input( vlc.config.userdatadir(), 1, 3, 4, 1) pathdialog:add_button( "_Ok", hide_dialog ) local input = vlc.object.input() if input then input_changed() end end function meta_changed() end function deactivate() vlc.msg.dbg("[now playing text] deact") pathdialog:delete() end function save_title() -- save title local item=vlc.item or vlc.input.item() io.output(titlefile) io.write(item:metas()["title"]) io.close() end function save_artist() -- save artist local item=vlc.item or vlc.input.item() io.output(artistfile) io.write(item:metas()["artist"]) io.close() end function input_changed() vlc.msg.dbg("[now playing text] input changed..!") local item=vlc.item or vlc.input.item() if item then save_title() save_artist() end return false end function hide_dialog() pathdialog:hide() end
