Skip to content

MiniDLNA Doesn't seem to send events #30

Description

@charlesaugust44

I'm sorry if this is not a thing that is implemented, i tried to read the code, but my C skills are limited.

I'm using the following node code to try subscribe to ContentDirectory events, specifically the SystemUpdateID event:

import UPnPClient from "node-upnp";
import EventEmitter from "events";

EventEmitter.defaultMaxListeners = 50;

const UPNP_SERVICE_ID_CONTENT = 'urn:upnp-org:serviceId:ContentDirectory';

const dlnaBaseUrl = "http://192.168.2.104:8200";

const DlnaClient = new UPnPClient({
    url: dlnaBaseUrl + '/rootDesc.xml'
});

try {
    DlnaClient.subscribe(UPNP_SERVICE_ID_CONTENT, e => {
        console.log("LISTENER", JSON.stringify(e, null, 2));
    });

} catch (error) {
    console.error("Error during subscription:", error);
}

at the begning of the script it readly receives this two events:

{ name: [ 'TransferIDs', '' ], value: undefined }
{ name: [ 'SystemUpdateID', 9 ], value: undefined }

But even if I move/add/remove files it won't emit any other event for ContentDirectory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions