Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_httpcontrol (Read 956415 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: foo_httpcontrol

Reply #1175
I'm using foo_httpcontrol alongside FoobarSongrequestTwitchBot to control a song request bot for twitch.tv streams.  Everything functions as expected, but the playlist generated by foo_httpcontrol appears to cap at 16,384 items, so the bot can't see the entire library.

The bot has foo_httpcontrol create a playlist.json with
Code: [Select]
"playlist":"[PLAYLIST]"
which it then accesses to search for and play the proper song.

Is there some way to go beyond 16,384 songs output in the playlist.json?

Re: foo_httpcontrol

Reply #1176
Hi, I have been using foohttpcontrol for some time but not lately.  I have the newest version by oblikoamorale and few days ago I found out that it seized to function properly. My phone sees FB2 on PC and what is being played, it sees my HDDs with my music files (I do not use any library - I just enter my folders on hdd to play them) but I can't acces the drives with my phone (two disks connected to foobar pc by with usb) and when I click on one of them on the phone.....the playlist on PC disappears and nothing more hapens (the phone does not enter the disks). It used to work. I can't tell if movivng to FB2 or updating the componet made it stop working properly.
Any ideas how to fix this? I already deleted all servers on the phone side and found the PCserver again but it did not help.

Edit. I found where the problem lies. Up till ver 0.97.19 everything works fine. I do not have ver. 0.97.20 (do not know if it exists). Strating from ver. 0.97.21 the problem occurs and persists in newest 0.97.25. Sadly I can only see the newest version (and 0.97.17) on bitbucket (the rest is deleted/hidden or I can't find them). Please fix this if you can.

Re: foo_httpcontrol

Reply #1177
I'm using foo_httpcontrol alongside FoobarSongrequestTwitchBot to control a song request bot for twitch.tv streams.  Everything functions as expected, but the playlist generated by foo_httpcontrol appears to cap at 16,384 items, so the bot can't see the entire library.

The bot has foo_httpcontrol create a playlist.json with
Code: [Select]
"playlist":"[PLAYLIST]"
which it then accesses to search for and play the proper song.

Is there some way to go beyond 16,384 songs output in the playlist.json?
Seems to be added on new release:
https://bitbucket.org/oblikoamorale/foo_httpcontrol/wiki/Changelog
Quote
v0.97.25 25 Mar

    add: playlist_items_per_page_max template config option (defaults to 16384);

Quote
Any ideas how to fix this? I already deleted all servers on the phone side and found the PCserver again but it did not help.

Have you checked this on the preferences panel?

Quote
fix: More strict Allowed paths checking. Now, to be able to access Microsoft Network when operating in Allowed paths mode, add 'Network:' and '\' (without quotes) to Allowed paths value;

EDIT:
btw there are some missing features compared to the version provided by foobar2000 Controller (android)
https://play.google.com/store/search?q=foobar2000%20controller%20PRO&c=apps&hl=en_US
Binaries here:
https://foobar2000controller.blogspot.com/p/how-to-start.html

- foo_httpcontrol error: unknown command: Version used to warn if a new version is needed.
- foo_httpcontrol error: unknown command: GetQueue used to see the queue on the controller
More info here: https://foobar2000controller.blogspot.com/2013/05/new-version-091-all-of-sudden-queue.html
- Command to Shutdown, Reboot, Suspend and Hibernate (don't know the name of the command yet)
https://foobar2000controller.blogspot.com/2013/08/new-version-0931-shutdown-your-pc.html

It would be incredible if these commands are replicated on the official branch now. The version one should be trivial, since it's just sending the httpcontrol version number. The other ones I have no idea. The queue features allow to view, add, remove and reorder items. I don't mind reinstalling the mod version to just get all the command names for every action if that helps. Rationale: the commands are useful by their-selves, but it would be a plus if the android controller continues fully working on v2 x64 with the current component by replicating the functionality.

Re: foo_httpcontrol

Reply #1178
Updated ajquery-xxx with dynamic color themes like Georgia-ReBORN and some other improvements.
https://regorxxx.github.io/foobar2000-SMP.github.io/others/ajquery-xxx/

Quote
## [0.95] - 2023-05-04
### Added
- Template version is now shown on the help button and dialog window title.
### Changed
- Colors will change based on album art palette when the album art is shown, similar to [Georgia-ReBORN](https://github.com/TT-ReBORN/Georgia-ReBORN). Option may be set at 'xxx\config-theme.json', enabled by default.
- Dark theme is now the default theme.
- Cursor no longer changes while connection is re-checked (loading indicator).
- Rating and track length are now split into 2 columns, so they always get aligned properly no matter the number of digits (for ex. 10:23 vs 3:20).
- Code cleanup.
### Removed
### Fixed
- Playlist Tools menu entries (listener) not sending commands to proper playlist if 'PT:listener' did not exist before (i.e. working on second command sent not the first one).
- Window height increasing indefinitely when showing artwork due to server re-connection added on v0.94.

Re: foo_httpcontrol

Reply #1179
Hey @regor, not sure how possible this would be, but I would love to have the functionality to copy a track - either the now playing track or any particular track - to another playlist.
I use this workflow all the time, and being able to do it remotely would be incredibly helpful.

Re: foo_httpcontrol

Reply #1180
Edit. I found where the problem lies. Up till ver 0.97.19 everything works fine.
It's not clear what template or app you're using.  Additinally it would be useful to see foobar2000 console log messages with "Log access to console" in component preferences enabled, when failed browsing attempts are witnessed.   Also having access logs from last "known good" version won't hurt as well.

I can only check that default, ajquery, ajquery-xxx templates work as intended. I am not aware of disk browser regressions but of course it's a possibility.

btw there are some missing features compared to the version provided by foobar2000 Controller (android)

Guessing how features that they implemented work can be rather painful. I wonder if any interested parties tried to contact the author to share their code modifications?

Re: foo_httpcontrol

Reply #1181
Quote
Hey @regor, not sure how possible this would be, but I would love to have the functionality to copy a track - either the now playing track or any particular track - to another playlist.
I use this workflow all the time, and being able to do it remotely would be incredibly helpful.
I think it should be doable; also overriding the native contextual menu, so we get the usual copy/paste, etc. options behaving more like a player app instead of non related web options.

Quote
Guessing how features that they implemented work can be rather painful. I wonder if any interested parties tried to contact the author to share their code modifications?
I know... I tried by myself, without luck right now. Will try sending another mail or looking for another contact. There was a source code out there but the link was broken too.

Re: foo_httpcontrol

Reply #1182
So the context menu part was easy.

But looking at the commands, there is not a copy/cut/paste one unless I'm missing other way.

Re: foo_httpcontrol

Reply #1183
But looking at the commands, there is not a copy/cut/paste one unless I'm missing other way.

Hm, yeah so I guess the thing is that the specific playlist is part of the command. It's:
Code: [Select]
?cmd=PlayingCommand&param1=Legacy%20Commands%20(unsorted)/Add%20to%20Playlist/<PlaylistName>
Oh, well that's to add the currently playing item. Or it's:
Code: [Select]
?cmd=SelectionCommand&param1=Legacy%20Commands%20(unsorted)/Add%20to%20Playlist/<PlaylistName>

Not sure if you have the time or inclination to implement something where you can specify the playlist!
I have two playlists for my radio show with keyboard shortcuts set in foobar, so I would be wanting to emulate that when I'm elsewhere. Bit of an ask!

Re: foo_httpcontrol

Reply #1184
There is no such entry available on my side, some components add additional contextual menu entries. So that route doesn't work.

Either support for dynamic contextual menu entries is added (which has been done before at other components) or specific commands for cut/copy/paste are added.

Re: foo_httpcontrol

Reply #1185
There is no such entry available on my side, some components add additional contextual menu entries. So that route doesn't work.

Hm, OK, from looking around I guess it comes from foosion's foo_utils. Super old extension.

Now I'm kind of shocked that this ability to send tracks to other playlists is not core foobar2000 functionality! The things you learn...

Re: foo_httpcontrol

Reply #1186
Edit. I found where the problem lies.
I've discovered the only functional difference: directory path element *names* are now prepended with surplus slashes, perhaps that's the reason some parser breaks. This fix will be included in next version. Other than that, I have no idea what's wrong.

Re: foo_httpcontrol

Reply #1187
Edit. I found where the problem lies. Up till ver 0.97.19 everything works fine.
It's not clear what template or app you're using.  Additinally it would be useful to see foobar2000 console log messages with "Log access to console" in component preferences enabled, when failed browsing attempts are witnessed.   Also having access logs from last "known good" version won't hurt as well.

I can only check that default, ajquery, ajquery-xxx templates work as intended. I am not aware of disk browser regressions but of course it's a possibility.

btw there are some missing features compared to the version provided by foobar2000 Controller (android)

Guessing how features that they implemented work can be rather painful. I wonder if any interested parties tried to contact the author to share their code modifications?

Hi,
Foobar2.0x64 on Windows10 with foohttpcontrol plugin.
The config files are in C:\users\myname\appdata\roaming\foobar2000-v2\foo_httpcontrol_data
Those are 2 folders:
- default_1_0 (with 6 files inside)
- foobar2000controller (with 12 files and 1 folder (img) inside).
Nothing was changed by me. Everything always worked up till ver. 19 of the component.
On the Phone side I have foobar2000 controller Pro (from Android store) - this one was never changed from the installation day (long time ago).
I never used any ajquery folders.

Here is what I get with properly working version (it also has many errors but seems to work ok; plus I can't write a log (nothing happens) so I just coppied it):
Components loaded in: 0:00.051670
Configuration read in: 0:00.003916
foobar2000 v2.0 x64 [standard]
Playlist #0 loaded in 0:00.000199
foo_youtube: [warning] could not load external ffmpeg: C:\Program Files (x86)\LAV Filters\x64\avutil-lav-57.dll: 57.42.100 >= 57.0.0
foo_youtube: ffmpeg (internal): lavf 58.29.100, lavc 58.54.100, lavu 56.31.100
foo_youtube: [warning] VSFilter (external): %1 nie jest prawidłową aplikacją systemu Win32.
foo_youtube: LAV Filters (system): Splitter 0.77.2, Video 0.77.2
foo_youtube: libcurl (internal): libcurl/7.68.0 Schannel zlib/1.2.11 brotli/1.0.7 nghttp2/1.40.0
foo_youtube: JavaScript (bundled.node): 5.12
User Interface initialized in: 0:00.128120
FFmpeg version: 6.0
Startup time : 0:00.277658
Library initialized after 0:00.278054
foo_httpcontrol error: unknown command: GetQueue
Opening track for playback: "D:\B\Bad Company\1974 Bad Company 88,2 24 wav\01-Can't Get Enough (Remastered Version).wav"
Minibar scanning D:\B\Bad Company\1974 Bad Company 88,2 24 wav\01-Can't Get Enough (Remastered Version).wav
mpv: libav error for open input: Invalid argument
foo_httpcontrol error: unknown command: GetQueue
Track scanned in 361.808 ms
foo_httpcontrol error: unknown command: Version
foo_httpcontrol error: unknown command: Version
foo_httpcontrol error: unknown command: GetQueue
mpv: libav error for open input: Invalid argument
mpv: libav error for open input: Invalid argument
(this is from View/Console).

Re: foo_httpcontrol

Reply #1188
Edit. I found where the problem lies.
I've discovered the only functional difference: directory path element *names* are now prepended with surplus slashes, perhaps that's the reason some parser breaks. This fix will be included in next version. Other than that, I have no idea what's wrong.

And this is what I get when trying to enter my disks from the phone with ver.25 installed in foobar:
Components loaded in: 0:00.060042
Configuration read in: 0:00.003705
foobar2000 v2.0 x64 [standard]
Playlist #0 loaded in 0:00.000194
foo_youtube: [warning] VSFilter (external): %1 nie jest prawidłową aplikacją systemu Win32.
foo_youtube: LAV Filters (system): Splitter 0.77.2, Video 0.77.2
foo_youtube: libcurl (internal): libcurl/7.68.0 Schannel zlib/1.2.11 brotli/1.0.7 nghttp2/1.40.0
foo_youtube: [warning] could not load external ffmpeg: C:\Program Files (x86)\LAV Filters\x64\avutil-lav-57.dll: 57.42.100 >= 57.0.0
foo_youtube: ffmpeg (internal): lavf 58.29.100, lavc 58.54.100, lavu 56.31.100
foo_youtube: JavaScript (bundled.node): 5.12
User Interface initialized in: 0:00.109944
FFmpeg version: 6.0
Startup time : 0:00.268348
Library initialized after 0:00.268683
foo_httpcontrol error: unknown command: Version
foo_httpcontrol error: unknown command: Version
foo_httpcontrol error: unknown command: GetQueue
foo_httpcontrol error: skipping "Network:\": unrecognized extension or not allowed protocol
foo_httpcontrol error: unknown command: GetQueue
foo_httpcontrol error: skipping "Network:\": unrecognized extension or not allowed protocol
foo_httpcontrol error: unknown command: GetQueue
And I can't access the files on the disks.

Re: foo_httpcontrol

Reply #1189
Edit. I found where the problem lies.
I've discovered the only functional difference: directory path element *names* are now prepended with surplus slashes, perhaps that's the reason some parser breaks. This fix will be included in next version. Other than that, I have no idea what's wrong.

I also noticed that even in the working version (19) the playlist on the phone does not automatically refresh now. I have to do it manually.
It used to work earlier.

Re: foo_httpcontrol

Reply #1190
Edit. I found where the problem lies.
I've discovered the only functional difference: directory path element *names* are now prepended with surplus slashes, perhaps that's the reason some parser breaks. This fix will be included in next version. Other than that, I have no idea what's wrong.

I also noticed that even in the working version (19) the playlist on the phone does not automatically refresh now. I have to do it manually.
It used to work earlier.

Also when using version 19 my phone sees the disks as: D:\Music A-L (the name of first disk) and E:\Music M-Z (the name of second disk) and it enters them properly.
But when using version 25, phone sees the disks as D and E without names and can not enter them.

Re: foo_httpcontrol

Reply #1191
Edit. I found where the problem lies.
I've discovered the only functional difference: directory path element *names* are now prepended with surplus slashes, perhaps that's the reason some parser breaks. This fix will be included in next version. Other than that, I have no idea what's wrong.

I also noticed that even in the working version (19) the playlist on the phone does not automatically refresh now. I have to do it manually.
It used to work earlier.

Also when using version 19 my phone sees the disks as: D:\Music A-L (the name of first disk) and E:\Music M-Z (the name of second disk) and it enters them properly.
But when using version 25, phone sees the disks as D and E without names and can not enter them.

It is getting more and more....funny...
Now I noticed that when clicking the file on the phone the folder with this file is being added two times to the foobar playlist.
So I can automatically listen to the whole album twice:).
It wasn't like this before (I am sure of that).

Re: foo_httpcontrol

Reply #1192
Updated ajquery-xxx with the contextual menu, some web optimizations and fix.
https://regorxxx.github.io/foobar2000-SMP.github.io/others/ajquery-xxx/

Quote
## [0.96] - 2023-05-05
### Added
- Contextual menu with basic functionality on a player context, replaces the native web browser contextual menu (available pressing Shift + R. Click). Further features will be added on future updates.
- Undo action also available via Ctrl + z.
- Redo action also available via Ctrl + y.
### Changed
- All js files are now deferred after the entire template is loaded. This also fixes console warnings about 'Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content.' on Firefox.
- Code cleanup.
### Removed
### Fixed
- Removed static image fallback for dynamic colors usage when no album art was found (which was never implemented). Fallback to theme used instead. Fixes console warnings about file not being found. Functionality doesn't change at all for final user.
- Selection not being preserved after connection re-check. Bug introduced on v0.95.
- Changed some optimizations in vibrant library to comply with modern V8 usage. Also fixes console warnings about 'Unreachable code after return statement'.
- Updated cookie usage to current standards. Now uses 'SameSite=Strict' following [mozilla guidelines](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie);

Open to suggestions about adding things to the contextual menu (probably most from the controls window). Non available actions are greyed out, due to playlist being locked or no items being selected (like win menus). Will also investigate how to create submenus.

The copy/paste thing will require either some hacking with extra components or an update with new commands though.

Re: foo_httpcontrol

Reply #1193
@oblikoamorale Before I actually spend the dev effort to code up a pull request, would you have any objections to being able to return discart for the current playing track in addition to albumart? Seems relatively straightforward, but also a decent amount of work.

Re: foo_httpcontrol

Reply #1194
What's discart? Are you talking about implementing additional artwork source(s)? I don't mind as long as it's works, and the code is at least not worse that it is now.

Re: foo_httpcontrol

Reply #1195
What's discart? Are you talking about implementing additional artwork source(s)? I don't mind as long as it's works, and the code is at least not worse that it is now.

Hi,
were my logs of any help? Do you need something more to document the inability to enter and use hdds with songs by newest verions of the component?

Re: foo_httpcontrol

Reply #1196
What's discart? Are you talking about implementing additional artwork source(s)? I don't mind as long as it's works, and the code is at least not worse that it is now.
Yeah, basically pictures of cd/vinyl artwork that are configured in foobar. Will be functionally identical to albumart just use a different URI string.

Re: foo_httpcontrol

Reply #1197
were my logs of any help?

Yesterday I have compared foobar2000controller json request results for "working" and "not working" component versions. The only difference is extra slashes in disk path name components, which is a bug and is fixed in the next component version. Another minor-ish difference is currently proper urlencoding of response values, for example spaces now are encoded with "+" instead of previous "%20". It doesn't cause any problems in templates I've tested, and browsers javascript console is silent.
What's left to check is a possibility of different content-type response headers when requesting json state files, and as I said initially, is to compare the fb2k console log output while operating disk browser, with "Log access to console" ticked in component preferences. Also, don't post logs on forums, use online paste site like dpaste.

Re: foo_httpcontrol

Reply #1198
Not saying this is likely, but it's also certainly possible the SDK bump has changed how foobar itself parses those paths. I was doing some debugging on this myself last night to handle a corner case that probably only would effect me where I'm trying to build my template in Windows Ubuntu using WSL and then symlink it into the foo_httpcontrol_data folder. Seems updating to the latest SDK prevents it from crashing foobar, but the component still can't read the config file in the folder for some reason. Feels like a foo_httpcontrol bug, but it's actually just all in foobar SDK code.

BTW, in case anybody is interested in what I've been working on, here's a preview of georgia-http written in Svelte.



And a quick video showing some of the features.

 Still a lot of bugs and missing features, but it's 90% functional at the moment. About the only thing I really can't do yet is rate songs. I'm thinking about writing my own biography view inspired by WilB's stuff as well. Since we're all in the browser you can do some really amazing stuff with minimal effort and Svelte drastically speeds up development (although it makes after the fact modifications almost impossible since everything is precompiled and minified).

Re: foo_httpcontrol

Reply #1199
were my logs of any help?

Yesterday I have compared foobar2000controller json request results for "working" and "not working" component versions. The only difference is extra slashes in disk path name components, which is a bug and is fixed in the next component version. Another minor-ish difference is currently proper urlencoding of response values, for example spaces now are encoded with "+" instead of previous "%20". It doesn't cause any problems in templates I've tested, and browsers javascript console is silent.
What's left to check is a possibility of different content-type response headers when requesting json state files, and as I said initially, is to compare the fb2k console log output while operating disk browser, with "Log access to console" ticked in component preferences. Also, don't post logs on forums, use online paste site like dpaste.

Hi,

version 19
https://dpaste.org/xajjk/raw

version25
https://dpaste.org/56GtP/raw