new plugin (cmod-xmplay)

Started by herotyc,

herotyc

I have one last question before releasing a new version.

Why when I issue a DDE open/list with a pls, it autoselects the whole songs in the playlist? Is there a setting to turn this behaviour off?

Or should I issue a new DDE command to unselect all? I cannot find the exact DDE message for that

herotyc

I used this combination and works:

    xmpfmisc->DDE("key341");
    xmpfmisc->DDE("key342");

herotyc

I released 1.4.0.0 and updated the readme.md file, thanks

Ian @ un4seen

Quote from: herotycI implemented this using a PLS, but the results are not the expected.

[playlist]
File1=https://modland.com/pub/modules/Impulsetracker/Herotyc/biowaves.it
Title1=Herotyc - biowaves
Length1=-1
...

Technically, this works. But if I had played (not saved in the library, just played) any song before this, I still get the "module name" in the playlist.

I made some tests, and if I remove xmplay.library, it works.

But I lost my library with all my saved mods! So, this is not a solution

In addition to the library entries, the XMPLAY.LIBRARY file also contains info (including the formatted title) for the current playlist entries. When XMPlay already has a formatted title for a file, that will be used instead of the title in a PLS file. So any files in the library/playlist that you played before clearing the "Title format" setting would still show the old formatted title. To prevent that, you would need to remove any already played library/playlist entries and then restart XMPlay.

If the played entries are only in the playlist then you can get rid of them from XMPLAY.LIBRARY by emptying the playlist and restarting XMPlay. If the entries are in the library then you will need to remove those library entries and restart XMPlay. Or export the library to a playlist file, close XMPlay, delete XMPLAY.LIBRARY, restart XMPlay and re-import the library. As you did.

Btw, if a file's length is unknown then you can omit the "Length" entries from your PLS file (they're optional). As with the formatted titles, XMPlay will use known length info from the library/playlist.

Quote from: herotycBtw, I don't know if there is any kind of editor/browser for the .library file. It does not seem to be an sqlite file, looks more like a marshalled structure.

I'm not aware of any XMPLAY.LIBRARY file editor, but if you would like to do something to it yourself, its format is described here:

    https://support.xmplay.com/article.php?id=101

Quote from: herotycI would love to be able to fill the "artist" field. Does m3u support an artist field that xmplay can read?

Unfortunately, it isn't currently possible to set any tags in a playlist file (M3U or PLS). But you can edit the tags stored in the library via the "Track info" window (tick the "Override" box), if that'll help.

Quote from: herotycI released 1.4.0.0 and updated the readme.md file, thanks

Great! I was just about to put it up on the support site, but noticed that the xmp-cmod.dll versioninfo still says "1.3.0.0". Perhaps you accidentally uploaded an old version?

Regarding the new "use_pls" configuration option, you could store that in XMPLAY.INI instead of a separate INI file by using the XMPFUNC_REGISTRY functions. That'll make it compatible with the "Store per-user config/etc" option. It may not really matter in this case, but perhaps it will in future if you add more config options.

herotyc

Quote from: Ian @ un4seenGreat! I was just about to put it up on the support site, but noticed that the xmp-cmod.dll versioninfo still says "1.3.0.0". Perhaps you accidentally uploaded an old version?

Regarding the new "use_pls" configuration option, you could store that in XMPLAY.INI instead of a separate INI file by using the XMPFUNC_REGISTRY functions. That'll make it compatible with the "Store per-user config/etc" option. It may not really matter in this case, but perhaps it will in future if you add more config options.

I might have picked the wrong dll or forgot to rebuild. I will reupload that tomorrow.

If I use configurations in the future, I will investigate the XMPFUNC_REGISTRY funcs. Atm, I consider this plugin as feature complete (I made the use_pls to have a fallback in case PLS was not perfect), I cannot think of any other useful and doable feature I'd like to have.

herotyc

herotyc

Hi Ian, hope you can help me with one final problem.

When I add a file to my library, it works as expected. But when I play it (from library) it gets the tags updated (overwrites the title that comes from within the module file, I don't want that).

I want to preserve my title.

So, I thought the Override field would help.

I followed the .library format guide and made a python script to help me populate the tags with the correct info extracted from the URL. Then rewrite the .library file.

But apparently I need to set the override flags. I do that but it is not working.

Can you check the script? Is the guide explaining the binary format outdated?

https://github.com/jllodra/cmod-xmplay/issues/9

Thanks

Ian @ un4seen

Quote from: herotycWhen I add a file to my library, it works as expected. But when I play it (from library) it gets the tags updated (overwrites the title that comes from within the module file, I don't want that).

I want to preserve my title.

Did you set the "Title format" to an empty string in the "Titles" options page? When that's done, I don't think the track's formatted title (seen in the titlebar and playlist) should get updated from the tags.

Or do you mean the "title" tag (not the formatted title) is getting updated? If so, setting the "Override" flag should prevent that...

Quote from: herotycSo, I thought the Override field would help.

I followed the .library format guide and made a python script to help me populate the tags with the correct info extracted from the URL. Then rewrite the .library file.

But apparently I need to set the override flags. I do that but it is not working.

Can you check the script? Is the guide explaining the binary format outdated?

https://github.com/jllodra/cmod-xmplay/issues/9

I'm not a Python user myself, so I can't say whether that code is entirely correct, but flag 0x10 should indeed set the "Override" field and prevent tags being updated from the file. If you read back your output library file, do you see flag 0x10 set on all tracks? Does your output library appear to be all working correctly in XMPlay apart from the "Override" field?

herotyc

Quote from: Ian @ un4seenDid you set the "Title format" to an empty string in the "Titles" options page? When that's done, I don't think the track's formatted title (seen in the titlebar and playlist) should get updated from the tags.

Yes, in Options => Title format => blank

The problem is: when I click on a Library song (not playlist song), then the title that shows the library is updated (the formatted title) with the true title of the module file (which I don't really want).

Quote from: Ian @ un4seenOr do you mean the "title" tag (not the formatted title) is getting updated? If so, setting the "Override" flag should prevent that...

Yes, this one also autoupdates :( if no override checkbox is marked.

Quote from: Ian @ un4seenI'm not a Python user myself, so I can't say whether that code is entirely correct, but flag 0x10 should indeed set the "Override" field and prevent tags being updated from the file. If you read back your output library file, do you see flag 0x10 set on all tracks? Does your output library appear to be all working correctly in XMPlay apart from the "Override" field?

The library file output works fine in xmplay. But the checkbox is not marked when I edit the info of any song in the library. That led me think the binary format described was incomplete.

I will try to work a bit more on it. I think I am not doing anything wrong, I followed the description in the support page.

Ian @ un4seen

Quote from: herotyc
Quote from: Ian @ un4seenDid you set the "Title format" to an empty string in the "Titles" options page? When that's done, I don't think the track's formatted title (seen in the titlebar and playlist) should get updated from the tags.

Yes, in Options => Title format => blank

The problem is: when I click on a Library song (not playlist song), then the title that shows the library is updated (the formatted title) with the true title of the module file (which I don't really want).

Just to be clear, the title shown in the library is the file's "title" tag, not the formatted title (based on the "Title format" setting). The formatted title is what's seen in XMPlay's titlebar (and taskbar) and the playlist "Track" column when that's set to "Title".

When "Title format" is blank, the formatted title shouldn't get updated, but the "title" tag still will if "Override" isn't enabled on the track. Are you seeing the title changing in the titlebar/taskbar/playlist too, or only in the library?

herotyc

It was updating only in the library (once I played it for the first time).


---

Btw, I managed to fix my script, mmm... I still think the format explained in the Support page is wrong. I just did some tests with a hex editor and found what to change.

In my case, it was the last byte before the null terminator 00.

0x2E | 0x10 => 0x3E (that made the override checkbox appear)

I think a library in sqlite, xml, or json, would be more friendly.

Thanks!

PS: I added the final script in the github issue + some screenshots if you want to see.

Now I can finally brag about my library :)

Ian @ un4seen

Quote from: herotycI still think the format explained in the Support page is wrong.

Ah yes, I see that page only goes up to version 5, while XMPlay is on version 6 now. I've updated it now, so please check again and let me know if you still have any trouble with it.