un-pogaz / Now-Playing-in-Texts

VLC Lua Extensions https://www.opendesktop.org/p/1172613
GNU General Public License v3.0
21 stars 7 forks source link

Only empty files are written #10

Closed tux93 closed 1 month ago

tux93 commented 1 month ago

For me the plugin writes only empty files, the VLC Messages console shows the following errors:

lua debug: [Now Playing texts] update_files()
lua warning: Error while running script ~/.local/share/vlc/lua/extensions/Now Playing in Texts.lua, function meta_changed(): ....local/share/vlc/lua/extensions/Now Playing in Texts.lua:532: bad argument #2 to 'format' (number has no integer representation)
lua debug: [Now Playing texts] update_files()
lua warning: Error while running script ~/.local/share/vlc/lua/extensions/Now Playing in Texts.lua, function meta_changed(): ....local/share/vlc/lua/extensions/Now Playing in Texts.lua:532: bad argument #2 to 'format' (number has no integer representation)
lua debug: [Now Playing texts] update_files()
lua warning: Error while running script ~/.local/share/vlc/lua/extensions/Now Playing in Texts.lua, function meta_changed(): ....local/share/vlc/lua/extensions/Now Playing in Texts.lua:532: bad argument #2 to 'format' (number has no integer representation)
lua debug: [Now Playing texts] update_files()
lua warning: Error while running script ~/.local/share/vlc/lua/extensions/Now Playing in Texts.lua, function meta_changed(): ....local/share/vlc/lua/extensions/Now Playing in Texts.lua:532: bad argument #2 to 'format' (number has no integer representation)
lua debug: [Now Playing texts] update_files()
lua warning: Error while running script ~/.local/share/vlc/lua/extensions/Now Playing in Texts.lua, function meta_changed(): ....local/share/vlc/lua/extensions/Now Playing in Texts.lua:532: bad argument #2 to 'format' (number has no integer representation)
lua debug: [Now Playing texts] update_files()
lua warning: Error while running script ~/.local/share/vlc/lua/extensions/Now Playing in Texts.lua, function meta_changed(): ....local/share/vlc/lua/extensions/Now Playing in Texts.lua:532: bad argument #2 to 'format' (number has no integer representation)
lua debug: [Now Playing texts] update_files()
lua warning: Error while running script ~/.local/share/vlc/lua/extensions/Now Playing in Texts.lua, function meta_changed(): ....local/share/vlc/lua/extensions/Now Playing in Texts.lua:532: bad argument #2 to 'format' (number has no integer representation)

VLC version: 3.0.21 Lua 5.3.6

un-pogaz commented 1 month ago

Hum, can you send me the file that cause the bug, please?

This log doesn't provide me enough information to solve it.

tux93 commented 1 month ago

So far it happens with any file I tried playing, I uploaded an example here: https://owncloud.tux93.de/s/RqW3Bb7Y96iHCga

Another example with more complete Metadata: https://owncloud.tux93.de/s/NLGRPDqN7aSEo4s

un-pogaz commented 1 month ago

Work perfectly for me.

So, if is not a Metadata/file error, is probably another Windows/Linux unparity shenanigans, Sweet /s Because Yes! This is a things, there is a precedent #2.

Can you send a log with this test version.

tux93 commented 1 month ago

Here you go: vlc_debug.log

un-pogaz commented 1 month ago

Okay, can you retry with this one test version?

(this could take a while as I'm still blindly trying to figure out exactly what's wrong)

tux93 commented 1 month ago

Alright, gonna start timestamping the log files then 😅 debug-lua_14:30.log

un-pogaz commented 1 month ago

Okay, hopefully the last one.

tux93 commented 1 month ago

Yes, that appears to be working: the np_*.txt files have content now! debug-lua_14:51.log

un-pogaz commented 1 month ago

Yes. I push a release with the fix.

For the reccord: at some point, a need to truncate value and a used a some... homebrew solution (the bug was here). In reviewing the lua doc, I realized that there was a build-in fuction that does exactly what I'm looking for and this one work suprisley mush better (jesus, it so dump).

Thanks more the report and your time. Have a nice day.