INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to get currently playing file path via hotkey?  (Read 5516 times)

JRi

  • Recent member
  • *
  • Posts: 8
How to get currently playing file path via hotkey?
« on: August 08, 2017, 12:26:17 am »

Hi,
I am moving from Winamp to JRiver as jriver sound quality seems better and i like its DSP features like the resampler, however one of the most important features to me is missing.
It is to gather playing file dir via hotkey to move unwanted music to other directory via single keypress(hotkey).
As i have 30k+ music i really need sort it out and to do it via windows explorer would be too much for me.

With winamp i use autohotkey script like thisone:
Code: [Select]
;Playback: Next in play list - Ctrl + Alt + Page Down
;Playback: Previous in play list - Ctrl + Alt + Page Up
;General: Copy file path - Ctrl + Alt + F12    to add manual...


;script trigger hotkeys , f3+f4 or f4+f3
f3 & f4:: 
f4 & f3::


SoundPlay C:\remove.wav     ; wav to notify that move happens
Send, ^!{F12}                    ;winamp5 hotkey (place filename in clipb)
Sleep 50
Send ^!{PgDn}                         ;winamp5 hotkey next track
Sleep 50
FileMove, %clipboard%, C:\remove       ; move to unwanted dir
Sleep 2000                                         ;sleep further to avoid double run
return
However i cannot find JRiver hotkey for path of playing file , so i am still forced to use winamp.

Is there way to get the path info via hotkeys?

Has someone written similar plugin for JRiver already?

I have experience on c++ developing so i may manage to write file moving plugin to JRiver if plugins can support hotkeys,,gathering playing file path, support deleting/moving files and skiping to next track.

Last alternative would be to write standalone app that reads path of playing file from jriver process via pointer , plays next file and moves . But this way may require seperate pointer for each new jriver version.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: How to get currently playing file path via hotkey?
« Reply #1 on: August 08, 2017, 06:30:45 am »

It's WAY easier than you are asking for.  MC has a built in Rename, Move, and Copy files tool.  It's very powerful.  Just highlight the files in question, then open RM&C.  The default hot key for RM&C is F6 .  You can remap that if you really want to.

RM&C is a big powerful tool.  You might play around with it a bit. It's got presets.  It can do just about any kind of manipulation you want; it's very well thought out.  I think you will enjoy using it.

Good luck.

Brian.
Logged

JRi

  • Recent member
  • *
  • Posts: 8
Re: How to get currently playing file path via hotkey?
« Reply #2 on: August 08, 2017, 08:42:31 am »

That seems great tool and plenty of control via gui but can it be used it to move files via hotkey?

Also i see files can be deleted by pressing Del but best if just 1 keypress and all gets automatically done like with the winamp script.

All it would require is getting corrent playing path via hotkey
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: How to get currently playing file path via hotkey?
« Reply #3 on: August 08, 2017, 03:10:58 pm »

I just re-read your post.  I see now that you aren't trying to do maintenance. You are trying to bulk move files/albums that you don't like to another directory.  So you don't like them enough to have them in your collection, but you actually want to keep them?

As far as I know, MC doesn't have a way of copying file path to the clip board like you are asking for.  But maybe someone else knows a way that I'm not familiar with.

Another way to do this would be to make a custom field in MC called something like "removeme".  Make it a checkbox field and just click the check box on everything you want to move to your "to be removed holding area".  Then, after you have checked that box on a bunch of files, (50, 100, 200, whatever you decide), you then select all files with a check in that column, and run RM&C on them to move them to your holding area, which you can do with a preset so you don't have to type in the path every time.

It's not the same as your current workflow, but it's not too bad.

Good luck with your project.

Brian.
Logged

JRi

  • Recent member
  • *
  • Posts: 8
Re: How to get currently playing file path via hotkey?
« Reply #4 on: August 09, 2017, 01:35:27 pm »

...So you don't like them enough to have them in your collection, but you actually want to keep them?
Yes , and copy of file serves as reference to delete from backup drives where all same music is backed up to secure in case HDD goes faulty.


As far as I know, MC doesn't have a way of copying file path to the clip board like you are asking for.  But maybe someone else knows a way that I'm not familiar with.

Hopefully someone knows way or MC dev could add 1 more hotkey that is featured also among some competitor players.

One alternative way would be to write custom standalone program that collects the currently playing string info from JRiver process, it is possible if somewhere in the process it stores the string.

Eventually itl take less time and is nicer way if planning on removing 10k+ music files.
Also using xbox controller with thes same winamp script to delete music while listening with headphones at night, to wake up and walk to pc would be too much for me.
I also have for smartphone similar app made so i can sort while driving lol.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to get currently playing file path via hotkey?
« Reply #5 on: August 09, 2017, 05:20:29 pm »

Have you looked at everything in the JRiver DevZone, particularly the first four items in the contents list? There is a "Developer" link to it at the bottom of this and every forum page. I would be surprised if there wasn't something that returned the currently playing media. However, it may not return the path as you are asking for. It may return the internal MC key to the file. That should be enough for you to take action against the media file though.

Also, I would reconsider your plan to Move unwanted music, and would investigate instead a way to set the value of a Custom Tag you create for the purpose, or add the media item to a "To Be Deleted" Playlist, or even to just give the item a rating of Zero, if you had previously given all items a minimum rating of One for example.

Then you could take maintenance action against the identified files later, by viewing the Playlist, using a View of all items with a Zero rating, or using a View of all items having your custom tag. The playlist would have the advantage of providing a list of items to delete from your backup drive, which maybe you could use to automate that process. But the Views mentioned above can also be used to create a list of files for such a purpose.

Also have a look in the Third Party Plug-ins, Programs, and Skins forum, and specifically at the "Swag of Tools" : Collection of Utilities for MC, which may have something already in there, or assist in the automation, instead of writing a plug-in.

Basically, don't try to apply your Winamp centric or constrained solution to JRiver MC. Find the best way to achieve what you want, using the substantial tools in MC, and implement that.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

JRi

  • Recent member
  • *
  • Posts: 8
Re: How to get currently playing file path via hotkey?
« Reply #6 on: August 09, 2017, 11:55:57 pm »

I am still hoping something similar is already avalible and someone can reccomend as Mc is nice player with nice DSP,
Have not yet looked into features and Media Center Core Commands and plugins yet.

Its not winamp centric at all , all the autohotkey script requires is gathering the playing file path, i think autohotkey supports various ways also.

For deleting files using Duplicate Cleaner Pro that automates it

Your flexible ideas of workaround probably will work with MC as it should support some of the ways via hotkey like rating, but if i make ratings itl still play same song again from playlist, how to prevent that?
And also audio warning of file being moved would be good like in the script
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to get currently playing file path via hotkey?
« Reply #7 on: August 10, 2017, 12:17:01 am »

I wasn't suggesting that you just set the rating and stop at that point. Rather, that you use a rating of Zero to identify which files you want to delete later. So while playing a song, identify you don't want it, hit your hotkey or use the existing MC functions to set rating (I think there are hot keys already for that, not sure - search for keyboard hotkeys), then later using a Custom View that only shows files with a rating of Zero, delete them all in one go. Of course, before that, remove them from your backup drive, using a list from the Custom View to identify which ones to delete.

But if disk space isn't an issue, and you aren't sure that you really, really want to delete the files, it is very easy to create a Smartlist or View that only shows, for example, files with a rating of 3 or more. The Smartlist can be used directly, as it is like a dynamic Playlist. Take a look at the provided "4 or 5 Stars" Smartlist. Edit it to see what it is doing. Or a Custom View can be used to add everything in the View at that time to a Playlist for future use.

You should read up all you can on Views (creating and modifying), Smartlists, right click context menus, tagging and custom tags. Enjoying the learning curve. MC has some very powerful features.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

JRi

  • Recent member
  • *
  • Posts: 8
Re: How to get currently playing file path via hotkey?
« Reply #8 on: August 10, 2017, 12:25:03 am »

Could make autohotkey script to add audio warning to rating and remap the rating hotkeys (ctrl+shift and 1...5) to single button.
But how can i prevent rated items from playing again from the playlist?

One way would be to use user defined global keyboard shortcuts
https://wiki.jriver.com/index.php/User_Defined_Global_Keyboard_Shortcuts
But cant find path to cur playing file under Media Center Core Commands
https://wiki.jriver.com/index.php/Media_Center_Core_Commands

There is MCC_COPY comand but i cant fully understand those commands as no decription
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to get currently playing file path via hotkey?
« Reply #9 on: August 10, 2017, 12:58:13 am »

And how can i prevent rated items from playing again from the playlist?

You should read up all you can on Views (creating and modifying), Smartlists, right click context menus, tagging and custom tags. Enjoy the learning curve. MC has some very powerful features.

If a Smartlist has a rule that says "Only play files with a rating over Zero", then the file will no longer appear on the Smartlist once you have given it a rating of Zero.

Valid point about having the solution work in when any application is in focus. So you need a global Windows Hotkey that sends a command, maybe via Autohotkey, to either set the rating to Zero, or set a custom tag, or send a delete function.

You should test the MCC Command 21004, MCC_DELETE, to see if it deletes that currently playing file. I suspect it might, although it might just delete it from the Playlist being played. If so you won't actually need to capture or see the file path and name, just send the delete command. I have not tested that, but if the built in Hot Keys can update the Rating, then they are acting on the current file.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

JRi

  • Recent member
  • *
  • Posts: 8
Re: How to get currently playing file path via hotkey?
« Reply #10 on: August 10, 2017, 01:19:26 am »

Thanks for directing in right directions for getting the idea work on MC.

I think smartlists, ratings, and the F6 menu will do it, but would be easyser if autohotkey could run comand to gather path of cur playing file or if there is a possibility to make custom hotkey for copying that.

Also each time new music added would have to remember to set the ratings.
Logged

JRi

  • Recent member
  • *
  • Posts: 8
Re: How to get currently playing file path via hotkey?
« Reply #11 on: August 13, 2017, 09:29:32 am »

As the MC process is storing it path, I still ended up making standalone app to gather currently playing path info.
Otherwise would have to go trough many steps each time listening to new album that gets added.
Other hotkey next track etc can be done using global multimedia keys.
Logged
Pages: [1]   Go Up