upnpdlna

Any reliable way to remember UPnP mediaserver media file location?


I'm working on a mediarenderer client project which needs to memorize last played media file. I initially stores from service and thought that it would be fine until I discovered that the media ObjectID is not permanent.

For example, I have 2 files A.mp3 and B.mp3 with ObjectID "1" and "2" respectively. If I remove A.mp3 and restart the media server, it assign "1" to B.mp3 while I thought it would still be "2". This happens on both mediaservers (pms, minidlna) I tried out.

So my question: What info can I use to remember the media file location other than storing the full hierarchy (eg. /path/to/music.mp3) as I need to resolve the path step by step to obtain the playback URL which I think is less efficient.


Solution

  • I came into a conclusion that UPnP Media Server simply did not define a usecase for this. And I tested out VLC media player and found that they are facing the same issue, hence this issue doesn't deserve a workaround perhaps.