EmperorPenguin18 / mpv-jellyfin

mpv plugin that turns it into a Jellyfin client
The Unlicense
30 stars 3 forks source link

Replace deprecated `table.getn` function with length operator `#` #1

Closed meliurwen closed 1 year ago

meliurwen commented 1 year ago

This script doesn't work with mpv 0.35.1 on Debian sid which has the Lua 5.2 interpreter.

The table.getn function has been deprecated since Lua 5.1^1 (2006)^2 which corresponds to the length operator (#).

EmperorPenguin18 commented 1 year ago

Thanks for the PR! This project isn't in a great state right now, I kinda just threw it together for myself. For that reason plus that I primarily use Arch, I hadn't run into this issue.

meliurwen commented 1 year ago

This script saved me from some headaches with jellyfin-mpv-shim, which, aside from being too much for my use cases it never been very much reliable.

Despite having some issues on the performances departement, which are easily reduced by deleting/commenting some parts of the script (yes I'm lazy), it proved to be solid in my last month of usage.

So I wanted to give something back in some way. :P

KISS and minimalist approaches like this (both code and functionality wise) seems more unique than rare on the jellyfin scene. Also, independently of the current state of the project, it is an excellent starting point! :D