DEBUG Log Message Added // mod: playback failed because item is unavailable

There is no DEBUG output (log message) issues when an UNAVAILABLE media is played.
Something like:

DEBUG - [Req#5d2e] Attempt to play library item <item id> by account <account id> failed!

This would allow me to take action when a user tries to play an unavailable video.
Currently, there seems to be no log/debug message indicating this in the log.
I would hope this is a simple thing to add.

Thanks!

There isn’t a log like that because you can’t play something that is unavailable. That information is sent to the client when the info is requested so the client already knows it’s unavailable so it’ won’t request playback from the server.

I see. Thanks for your answer!

After thinking about it for a minute, I don’t quite understand…

  • If a file system is mounted when the library is scanned, the server (and presumably the client, if I understand your answer) thinks the file is available.
  • If the file system is subsequently unmounted, with no scan in between, the client still thinks the file is available.
  • Then presumably, the client would have to ask the server to play, at which point the server would get a request and fail.
    What am I missing?

The client asks the server for the file info just before it starts to play the file. This info contains the info in real time if the file is available or not. When the client receives the info that the file is not available it shows the error on it’s own. In other words:

  • user hits play in client
  • client ask PMS for movie info
  • PMS returns info including the file’s availability
  • client sees the file is not available
  • shows error (does not send any request to play to PMS)

So before PMS returns UNAVAILABLE, could it not print a DEBUG
message in the server log?

The check is actually done at the OS level. PMS does not know the results. It would have to parse the data just as the client does. Normally PMS doesn’t need to know this so it doesn’t bother.

I still don’t quite understand. If it has the info to send to the client, it would seem it also has the info to print to the log.

Ie, you say: “PMS returns info including the file’s availability”.

But if is difficult to do, then I understand… I thought it would be like a 1 line print to log statement.

No, when PMS sends the info, it gathers the data in real time, puts the info into a file, and sends the file. It does not know what that data is. It’s like a person putting small boxes into a larger box. The small boxes are gathered from somewhere else, the packer just puts them in the big box, then sends to the receiver. The packer does not know what’s in each small box without examining them.

It’s not difficult for PMS to look in the box, it’s just not needed currently. Keep in mind that a client can request this info at any time for any reason. It may not be trying to play the file. If PMS looked each time the info was requested, it may not line up with a playback attempt so your specific error you want would be wrong. To track this specific error, the client would need to send the error back to PMS.

That would be a feature request for the clients.

Got it! Thanks so much for your explanation.