forum

osu!np v2.4: Output /np info + Beatmap Downloader etc

posted
Total Posts
170
show more
TakuMii

Primula wrote:

Okis, all your suggestions are now implemented in v1.1, YayMii. :3

I was going to make it possible to do commands like: [Creator: c] so 'Creator:' would only show if 'c' existed, but it's a bit fiddly (very much dependant on what text is enclosed) and not very necessary because I've split the idle and output messages now. Only time something like that is needed is when the information really doesn't exist (some maps don't have creators listed or something? >-<)
I think I could do something like [Creator: <c>] quite easily, I'll get around to it when I have time.
Thanks for another quick update, but this time it looks like the directories aren't saving properly and is causing problems :?
I'm getting crashes and this error whenever I try to change the directory:
System.ArgumentException: Empty path name is not legal.
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Empty path name is not legal.
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.File.Create(String path)
at OsuNP.frmOsuNP.resetNP()
at OsuNP.frmOsuNP.cmdToggle_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18033 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
osu!np
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Users/BlooMassacre/Documents/osu!np/osu!np.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 11.0.50709.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18033 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18037 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18022 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18033 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Topic Starter
Primula_old
I'm not sure how to troubleshoot your error, what exactly do you do to cause it?
Directories are saving fine for me, and it only crashes if the directories are left blank.

Try deleting your old settings file (remove folder: C:\Users\..\AppData\Local\Primpri)

Ensure output directory contains the file to output like: C:\Users\..\Desktop\np.txt
Ensure Osu! directory is correct like: C:\Program Files\Osu (no trailing slash)

On the 'Upload' tab, only check 'Playing' and 'Online Status' if you're uploading through ftp.
and ensure the ftp field is an existing web directory like: ftp://host.com/www/np/ (this path varies so you might require something else)

Ensure you're clicking 'Save' when exiting the Config after updating the directories, not 'Close' (might seem obvious >-<)
peppy
You'll probably have a lot easier time using the new last.fm scrobbling plus the last.fm api to get currently playing tracks from osu!, if you feel like switching over.
TakuMii

Primula wrote:

I'm not sure how to troubleshoot your error, what exactly do you do to cause it?
Directories are saving fine for me, and it only crashes if the directories are left blank.

Try deleting your old settings file (remove folder: C:\Users\..\AppData\Local\Primpri)

Ensure output directory contains the file to output like: C:\Users\..\Desktop\np.txt
Ensure Osu! directory is correct like: C:\Program Files\Osu (no trailing slash)

On the 'Upload' tab, only check 'Playing' and 'Online Status' if you're uploading through ftp.
and ensure the ftp field is an existing web directory like: ftp://host.com/www/np/ (this path varies so you might require something else)

Ensure you're clicking 'Save' when exiting the Config after updating the directories, not 'Close' (might seem obvious >-<)
I found the issue... hitting the X button on the config window at any time causes the whole config to clear itself.
Topic Starter
Primula_old

YayMii wrote:

I found the issue... hitting the X button on the config window at any time causes the whole config to clear itself.
Ah, I'm glad it's a simple issue lol.
Was rattling my brain for an hour trying to recreate it. >-<!!
Dexus

peppy wrote:

You'll probably have a lot easier time using the new last.fm scrobbling plus the last.fm api to get currently playing tracks from osu!, if you feel like switching over.

Ooo? So that's why last.fm was integrated; How do you set it up exactly? I've not really looked into it.
TakuMii
Two more feature requests: is there a way you could give an option to display the beatmap link as osu.ppy.sh/b/# (difficulty specific) instead of osu.ppy.sh/s/# (song specific)? And is there a way you could display the difficulty mods in use? Thanks!
Oh, BTW, I'm not using this for the !np command in chat, I'm actually using it with OBS to display the song title/link on-screen when streaming :) Some of my viewers were asking how I did it, and I directed them here. Maybe you could include instructions on how to set that up in the OP? I could help, if needed.

Dexus wrote:

Ooo? So that's why last.fm was integrated; How do you set it up exactly? I've not really looked into it.
Just go to your profile, and on the left bar you should see a "connect to last.fm" link. Once you connect your profile, osu! should automatically scrobble your songs as you play the game.
peppy
http://www.last.fm/api/show/user.getRecentTracks if interested in accessing the last.fm api for consumption. It's pretty straightforward :).
Topic Starter
Primula_old

YayMii wrote:

Two more feature requests: is there a way you could give an option to display the beatmap link as osu.ppy.sh/b/# (difficulty specific) instead of osu.ppy.sh/s/# (song specific)? And is there a way you could display the difficulty mods in use? Thanks!
Oh, BTW, I'm not using this for the !np command in chat, I'm actually using it with OBS to display the song title/link on-screen when streaming :) Some of my viewers were asking how I did it, and I directed them here. Maybe you could include instructions on how to set that up in the OP? I could help, if needed.
For your first request, that's already possible.
You can type: http://osu.ppy.sh/b/[mid] to output with the MapID.
Additionally you could manually output to other download mirrors depending on what data the mirror accepts (some use MapID [mid]. some use MapsetID [msid], others use full map names).

As for mods, I don't think that is possible. ;---;

I'll edit the OP to include OBS/XSplit output instructions tomorrow morning, need sleep.
Cons
Just wanted to add something for people who use Nightbot on Twitch.tv

You can add a custom command to your Nightbot (like the IRC suggestion made here) but I prefer Nightbot's custom command.

Ex of custom command: Now Playing: $(customapi http://www.yourhost.com/np/np.txt)

Also, thanks for making this tool. I seem to be having a problem with my ftp connection now though :( it just keeps uploading blank np.txt files

UPDATE: After a while it'll upload non-blank np.txt files however they refuse to be customized xD They just output the Artist and Title
formi
Using this since a few weeks now and really enjoy it :)

But there might be a feature which would just make it even more awesome.
- An option to add a 2nd output file.

Because I am thinking about the following setup:
* one .txt with Artist + Tile to show it on Stream.
* an additional one just for an Irc-bot output.
TakuMii
I have an idea to go with xformi's idea: How about an option to keep the last-played song in another file? Just in case I begin playing another song and someone asks for the song I already finished.
Topic Starter
Primula_old
Also, thanks for making this tool. I seem to be having a problem with my ftp connection now though :( it just keeps uploading blank np.txt files

UPDATE: After a while it'll upload non-blank np.txt files however they refuse to be customized xD They just output the Artist and Title
The PHP side of things wasn't intended to output much song data at first but it's on the TODO list.

The FTP uploading is a little iffy, the first connection can take a little bit of time, so there could be issues for when you're playing a map while it's connecting.
Will make an alternative method to update through PHP without the need for FTP.

- An option to add a 2nd output file.
Okidoki

I have an idea to go with xformi's idea: How about an option to keep the last-played song in another file? Just in case I begin playing another song and someone asks for the song I already finished.
Okidoki x2


Will also make it possible to make all output methods optional (so no longer needing to output locally if you only plan to output to server or something).

Will start working on changes tonight, haven't touched it for a while, been pretty busy~ Q^Q
[-Wolfie-]
anyone know how to set up with OBS
Dexus
Is there a mirror for this? The mediafire link does not work.
TakuMii

Dexus wrote:

Is there a mirror for this? The mediafire link does not work.
The link works, but you have to wait 2 seconds for the page to redirect.

(or you could just click this link)
Synthox_old
Wow this is pretty nice.
Dexus

YayMii wrote:

The link works, but you have to wait 2 seconds for the page to redirect.

(or you could just click this link)
oh, thanks!
Topic Starter
Primula_old
I updated the download link, Mediafire direct links are only temporary apparently. >-< But yush, you just have to wait for the page to redirect to the correct location whenever that happens.

I've been working on changes all day today, so the next update should be available by tonight.
Been busy all summer and still am fairly busy, but trying to get around to things !

There's an issue that two people have reported to me which started from v0.6 that causes osu!np not to start at all, I'm still not sure on how to fix that but it's not my priority at the moment. ;--; If you do ever have this problem, see whether an error is output to the Windows event log and PM me it, will try to work on fixing it in the version after next.

The map downloading will still be buggy in 1.4, I still have plans to switch to using Hexide's Mirror, just need to get around to it~!
(Might include it in 1.4 if I have time, else it'll be in 1.5 at the latest. It's not a priority as it's not the focus of this program, just a useful addon.)
Topic Starter
Primula_old
Okidoki, v1.4 is up now with the following changes~
  • ★ Updated main thread post with OBS/XSplit instructions.
    ☆ Changed extraction method to reduce file size (required changing from .rar to .zip so using the update button in versions previous to v1.4 will not work).
    ★ Made 'Primary Output' optional.
    ☆ Added optional 'Secondary Output'.
    ★ Added optional 'Previous Output'.
    ☆ Adjusted the UI a little. (Everything looked normal on my custom theme, forgot to try it with a normal Windows theme >-<)
One tiny bug I forgot to address: Unhandled exception when attempting to import and no import file is found.
Villani
I keep getting this error when trying to launch osu!np...

That's the v1.4

This is the first time trying to use this program... So haven't had a go with the earlier versions.
Piotrekol
  • ☆ [t] - Song Title.
    ☆ [tu] - Song Title in unicode.
    ☆ [a] - Song Artist.
    ☆ [au] - Song Artist in unicode.
    ☆ [c] - Map Creator.
    ☆ [tag] - Map Tags.
    ☆ [mid] - Map ID.
    ☆ [msid] - Mapset ID.
☆★ Map Difficulty Commands
  • ☆ [diff] - Map Difficulty.
    ☆ [hpd] - HP Drain Rate.
    ☆ [cs] - Circle Size.
    ☆ [od] - Overall Difficulty.
    ☆ [ar] - Approach Rate.
    ☆ [sm] - Slider Multiplier.
    ☆ [st] - Slider Tick Rate.
are these working?(not that it matters for me- I have my prog for it ;w; )
because I tried using map/mapset ID's and it didn't work (v1.5)
TakuMii

Piotrekol wrote:

/snip
are these working?(not that it matters for me- I have my prog for it ;w; )
because I tried using map/mapset ID's and it didn't work (v1.5)
As far as I'm aware, you need to properly set your osu! directory in the config for the map info and IDs to function.
Piotrekol
I did set osu! path.
Got it kinda...working
It seems that this "id searching" is sometimes taking way too long- I thought it was just crashing or sth. and i was force-closing it(took about 30seconds before app got responsive again) and sometimes it doesn't show ID at all
2 examples of maps that don't give me any id(can easily give more if needed)
https://osu.ppy.sh/s/5139
https://osu.ppy.sh/s/3000
old maps *.osu's doesn't contain any misc info and that's what is causing that...(at least i think that's the reason)
Topic Starter
Primula_old
Yes, some maps don't contain certain map data so it returns nothing, at some point I was going to make it possible to output text within a command so that the text itself doesn't output if the command returns nothing.
Eg. "np: [np]{ | Mapset: [mid]}" would return "np: Artist - Title | MapID: #" if there is an ID found and "np: Artist - Title" if there isn't.
I did get this working at some point but I had a slight issue with it at the time which I was too tired to fix lol, will get it working again soon, it's not difficult~

The problem with the client hanging is that I didn't bother using threading to begin with because at first it wasn't necessary >-<
I never bothered addressing it because assuming you're currently playing Osu!, you don't need to interact with osu!np while it's processing everything (and it should only hang at the start of a map).
Efficiency is something I'll get around to though, there's just a lot of things that need to be changed ;--;!
321jurgen
Thanks alot. Works great!
TakuMii
Gah, I have a feature request that I don't know if you can fulfill >//<
The recent changes made to osu!test were to encourage bugtesters+etc to switch to osu!test permanently... however osu!np doesn't work with it (osu!np gets stuck at "Attempting to find osu!") so I'm forced to move back to the public build every time I want to livestream. Since collections don't carry over between the public and test builds, it makes it somewhat more difficult to switch back and forth. If osu!np had support for the test build, this would be a non-issue.
But since you no longer have supporter, I don't know if this would be possible. Hopefully this is an easy change (the osu!test window title is "osu!test bYYYYMMDD" with the current date, instead of just "osu!"). If there's any way that I could help, I'd be glad to :)
Topic Starter
Primula_old
Not an issue.
I just need to additionally check for 'osu!test' process and check window title as 'osu!test b########' if osu!test is running.

I may instead (or additionally) just allow user to add an additional window title to check for in case the title format changes in future.
(So if it can't find the normal osu!, it'll check for what the user defines)

Edit: Probably should be working in the next version, not entirely sure on the format of the title when a song is playing though so I've assumed it's similar to the regular osu, minus the "!test" and version.

I've also made improvements to efficiency of obtaining song data in the next version (less hanging), and added support for only outputting text if a command returns a value (Example Format: "{prefix [a] suffix} {prefix [t] suffix}" = "prefix Artist suffix prefix Title suffix" ).

Will possibly make a few more changes before uploading the new version~
TakuMii
Also, I'm having issues with the Export function creating an empty config file (which is then auto-imported when osu!np next starts up and causes the config to be blank).

Here is the log:
osu!np - Config
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Conversion from string "setIdle:Idle
setNP:
setIdle1:I" to type 'Double' is not valid. ---> System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Double.Parse(String s, NumberStyles style, IFormatProvider provider)
at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)
at #U.#ke.#ie(Boolean )
at #U.#ke.#fe(Object , EventArgs )
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18051 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
osu!np
Assembly Version: 1.5.0.0
Win32 Version: 1.5.0.0
CodeBase: file:///C:/Users/BlooMassacre/Documents/osu!np/osu!np.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18046 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18022 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18045 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 11.0.50709.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
{4a614a8b-eb94-4c04-9fa5-f132a25e32d4}
Assembly Version: 0.0.0.0
Win32 Version: 1.5.0.0
CodeBase: file:///C:/Users/BlooMassacre/Documents/osu!np/osu!np.exe
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18053 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18053 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Thanks for the frequent updates, btw :) You're doing an awesome job!
Topic Starter
Primula_old
Thank you, YayMii~ :3

v1.6 is released with the following changes~ ^-^
  • ★ Improved efficiency with several features of osu!np (like querying map data, and downloading maps/osu!np updates). The UI should no longer hang for these features, still working on other improvements.
    ☆ Made changes to the command formatting, allowing for text to be grouped with a command so if the command returns nothing, the text will not output at all.
    The new format is: {Prefix[C]Suffix} (The prefix/suffix are optional text)
    Example: {np: [np]} {[diff]} Commands without optional text will still require the {} braces for now, eg: {[np]}
    ★ Support for downloading maps is back using Hexide's mirror, maps will now be correctly named and can easily be installed to Osu!
    ☆ Implemented support for osu!test client.
    ★ Fixed casting error when exporting config.
    ☆ Fixed unhandled exception when attempting to import when no config is found.
    ★ May have potentially fixed the problem which was making few users unable to start osu!np.
Note: You'll have to add {} to all your commands for now even for ones that do not use optional text.
So, for example:
Playing: [np] [diff] - ID: [mid]
Becomes:
Playing: {[np]} {[diff]} - ID: {[mid]} = "Playing: Artist - Title [Difficulty] - ID: #"
Or if you want the text to only output if the commands are not empty:
{np: [np]} {[diff]}{ - ID: [mid]} = "Playing: Artist - Title [Difficulty]" (If [mid] was returned empty)


I'm not entirely sure if the support for osu!test will definitely work, I can't test it myself. >-<
If it doesn't work, can you show me an example of what the osu!test title looks like when playing a map? >-<!


Edit: Updated to v1.7 to add auto-updating and add user-agent to header when downloading.
TakuMii
Wooo, it's working so smoothly now :D

The o!test support is still not working though. I've taken a screenshot of what my titlebar looks like when playing a song:
Topic Starter
Primula_old
Should hopefully be working in v1.8~! ^-^
Additionally added the following:
  • ★ Added ability to optionally downloading maps without video.
    ☆ Added recent updates display to client.
Three updates in one day.. Sorry >-<!!
givenameplz
Hello again, thanks for the updates.
I am having lots of fun with it up until now, hehe.

As I am using the FTP feature alot, I want to point out a few things I found and also a few ideas I had and would really like to see:

  1. Exception while connecting to FTP
    It seems that if you enter invalid information and press the "Start" button of osu!np the FTP function returns an exception. Its not a big deal, but it would be nice if you could catch that.
  2. Primary output is overwritten
    If you choose to upload /np to FTP, the primary output (np.txt) is overwritten by default with the same file thats uploaded to the FTP-Server. Thats a bit annyoing, but minor as I did not need the primary output anyways. (As its not using the primary pattern as told in my next point)
  3. Customize FTP output
    It would be nice to be able to customize the output thats send to the FTP-Server. Up until now its only the mapset and the Online or Offline status. I'd really like to use the placeholders for diff and so on aswell. (As you overwrite the primary output with this anyways, you could use the pattern for it)
  4. Add an "Start osu!" button
    I think this would be handy, as I would only need to run osu!np without any Batch files and the likes, as you already ask the user for the osu! Folder, there shouldn't be a problem finding the osu!.exe. (*´ω`*)
  5. POST requests
    I know you already plan an alternative, but I wanted to throw my idea here anyways, it would be neat if there was an possibility for sending POST requests to web pages.
    With that it would be much easier and much more handy for website users to POST their status to some .php page and save it to a database or output on a website.
    Of course, for savety reasons you should include a field for a "key" that the users defines thats send with the post data, so the user can check it on his backend.
  6. Edit:Upload to FTP does not correctly "go offline"
    Another thing I almost forgot to address, I'll explain: If you push the "Start" button nothing happens, this is fine, osu!np will only upload if you actually run osu!, but the thing bothering me is that its only sending an "Offline" message when you close osu!np, its not sending the message if you press "Stop" or if you quit osu!. I would recommend, for consistency, that its also sending the "Offline" message when you quit osu!.
So far thats everything, looking forward for more, keep going~
Topic Starter
Primula_old
Auuu.. So much stuffs ;--;
I've kinda been ignoring the FTP side of things lately, but I will start working on it again. >-<!

The thing about the output was planned a while ago.. I'm still wondering on how I should go about implementing it.
The easiest but more restrictive way would be to put 'Key' and 'Value' in a php file like: $key = value;
So you can just include that php file into any other php file to use those keys as variables.
But I'm not sure if this would be nice for people who use mIRC scripting or other such things. >-<
Will find a way which fits both~

Exception while connecting to FTP
Easy fix.
Primary output is overwritten
Something I overlooked.
Add an "Start osu!" button
Nice idea, will do an 'Osu' icon styled button~
(Left-Click = osu!, Right-Click = osu!test
POST requests
Pretty simple to do >-<
I'll make 2 fields in the config, one for the url. Eg. http://host.com/np.php
Another for requests requiring key, then optionally commands. Eg. key=gf4gh874hg&np=np&diff=diff (where keys = user defined post variables, values = commands)
Edit: Scratch that, instead of doing commands separated, I just put the different outputs instead in the string (status=&primary=&secondary=&previous=)
Upload to FTP does not correctly "go offline"
I thought I fixed this >-< Will check it.

Oh, I also will be fixing hanging issues on the FTP side of things.


Edit: I'm finished with changes today (17th), will upload v1.9 when I wake up.
Topic Starter
Primula_old
Decided to upload now. >-<
Following changes in v1.9:
  • ★ Added button to allow user to launch osu!/osu!test (left/right click).
    ☆ Made several changes to make osu!np more efficient.
    ★ Fixed issue causing update setting to be ignored.
    ☆ Addressed exception when attempt to connect to FTP fails.
    ★ Fixed issue causing FTP to overwrite primary output.
    ☆ FTP will now correctly send offline status when the osu! process is not running.
    ★ FTP now uses threading to reduce hanging, only map checking should cause hangs for now.
    ☆ Status messages of FTP will now display on osu!np title to not conflict with other status messages.
    ★ Changed FTP Upload to additionally support uploading Secondary/Previous outputs.
    ☆ Added option of whether to group outputs when uploading to FTP, more info on this in the 'FTP Grouping' section.
    ★ Implemented method for sending status and outputs to a PHP page using POST method, more info on this in the 'POST' section.
Please note: The last few updates have had changes to the settings, so exporting old settings may cause conflicts.
If you experience problems with this, you'll have delete the following folder: C:\Users\Username\AppData\Local\Primpri


I can't really make an explanation for the FTP Grouping and POST just yet, need sleep ;--;
But basically for the FTP side of things:
If you choose to output with FTP Group on, then instead of having Primary/Secondary/Previous output to separate files, they'll output to the same group file specified.
Status will always output to its own file.
The 'Key' and 'Value' input fields determine the format of the output to the group file. (Where '[Key]' is 'Primary'/'Secondary'/'Previous' and '[Value]' is the output of the Key)
Text within double braces {{ }} in the Key field will only display before the first Key.
Text within double braces {{ }} in the Value field will only display after the last Value.
[nl] will create a new line.

If you were to output to a basic Key:Value .ini file, you could do this:
Set Key field to: '[key]:'
Set Value field to: '[val][nl]'
The output would be:
Primary:Value
Secondary:Value
Previous:Value

If you were to output to a PHP file, you could do this:
Set Key field to: '{{<?php[nl]}}$[key] = '
Set Value field to: '"[val]";[nl]{{?>}}'
The output would be:
<?php
$Primary = "Value";
$Secondary = "Value";
$Previous = "Value";
?>

For the POST side of things:
Set the URL to the location of the page receiving the POST requests (http://host.com/np.php)
Set the Key field to a 'passphrase' of sorts which you'll be able to verify when you check for the requests in PHP.
You can then do things like: if($_POST['key'] == "blah"){ echo($_POST['status']); echo($_POST['primary']); }
All requests are: 'key', 'status', 'primary', 'secondary', 'previous'
They're not all sent with values at all times (Eg. Status updates when osu is opened, but the outputs don't), so you may want to check lengths of each request before doing anything with them.
givenameplz
Just a few things I noticed right away.

The only POST request sent is key and status, the other values are never set.
Also, after playing a map and going idle, POST is sent pretty frequent with empty values (only key set again).
I also noticed a small message Error creating file as status in the hint section of the application, this might has something to do with the fact that no other values are set.

Edit1:
It appears that the frequent POST sending is happening all the time when being idle, not only after you played.
Also, only a small thing, if you close osu!np now, its telling you that "osu!np stopped working".

I'll edit this post when I find something else.
Topic Starter
Primula_old
The 'osu!np stopped working' thing is related to the other problem.
I didn't do much testing with the post thing because I was too tired. >-<
..But it worked fine for me in the few tests I did do.. ;---;
And it worked just fine again now.. odd.

Could you send me a copy of your exported config? (with your ftp details removed ofc)
givenameplz

Primula wrote:

The 'osu!np stopped working' thing is related to the other problem.
I didn't do much testing with the post thing because I was too tired. >-<
..But it worked fine for me in the few tests I did do.. ;---;
And it worked just fine again now.. odd.

Could you send me a copy of your exported config? (with your ftp details removed ofc)
It has been send as it is right now, only the key is removed as I havn't entered the FTP in the new Version yet.
Check your PM.

Edit: I got it working now, I checked "Output Primary" and "Output Secondary" under "Output" and it worked, but there is another problem, you should escape characters like "&" or "?" this caused a few errors for me. (In song names for example)
Also, only if possible, if you use the "au" or "tu" tag, it would be neat if its the default title and aritst if there is no unicode Version of it. Right now its only blank.
Topic Starter
Primula_old
Yeah I noticed you had no outputs enabled.
POST uses the outputs you set for Primary/Secondary/Previous so you will require at least one of them to be enabled for local output in order to get anything sent to PHP.

I was thinking about having a field in the POST config where you can set things like:
var1=[np]; var2=[mid] etc..
But you can already do this using either the primary/secondary output fields

Eg. Setting the primary output to: blah{&var1=[np]}{&var2=[diff]}{&var3=[mid]}
Will output this to the file: blah&var1=np&var2=diff&var3=mid
And will output this to POST: key=aaa&primary=blah&var1=np&var2=diff&var3=mid

As for the error on close, it was due to having osu!np close after checking whether to update on close, but before checking whether to send ftp/post.. silly me ;--;

I thought I was already escaping characters, will have to check again.
Will also do the unicode thing.

I'll also be adding the capability of listening to the preview track before downloading a map.
Topic Starter
Primula_old
V2.0 is now available with the following changes~
  • ★ Changed styles to System defaults.
    ☆ Additional windows (Config/Update/Beatmaps) will now close when osu!np is minimized.
    ★ Additional windows will now retain focus of osu!np main window.
    ☆ Fixed importing exception caused by the previous update.
    ★ Partially encoded MapName when saving downloaded MapID's.
    ☆ Encoded data sent via POST.
    ★ Potentially fixed issue causing osu!np to throw an error when closing.
    ☆ Added map song previewing functionality, right-click the map download button to preview.
    ★ Added multi-line log to replace the current log output from various functions, regular info messages will be displayed on the osu!np title instead.
    ☆ Added 'Beatmaps' list to allow for Querying/Previewing/Downloading of all ranked/approved Beatmaps.
I'm planning on flagging beatmaps in the list that are already installed. (like change the row colour, or add a 'Installed' column)
I just realized I forgot to do the unicode thing ;---;!
show more
Please sign in to reply.

New reply