This forum is deprecated. Please visit https://github.com/smplayer-dev/smplayer/discussions

Can I derive the mp3-filepath from SMPlayer-portable?

Problems, bugs, suggestions... anything related to SMPlayer.

Can I derive the mp3-filepath from SMPlayer-portable?

Postby Tup » Fri Oct 30, 2015 12:42 am

Hello,
I am not shure if this is the proper place to ask my questions, so please let me know if I should ask elsewhere.
I wonder: when playing e.g. an mp3 file in SMPlayer-portable version, can I derive one way or another the path of that file currently being played in SMPlayer?
I am building some macro's that need this information.
That is: the complete path to the mp3-file, or just the path to the containing directory of the mp3-file.

I am trying to accomplish this by performing an “IniRead” from the SMPlayer.ini file, section [directories], key “latest_dir”. But this doesn't work in many cases.
I experimented a lot, but I don't understand exactly when this .ini-key is overwritten.
The key doesn't update when you load a new mp3-file in SMPlayer.
I hope I made myself a little clear.
Can somebody help me out or give a hint?
Thanks in advance
Tup
Tup
 
Posts: 3
Joined: Fri Oct 30, 2015 12:30 am

Re: Can I derive the mp3-filepath from SMPlayer-portable?

Postby rvm » Fri Oct 30, 2015 1:23 am

There's an option in preferences -> advanced -> logs which can autosave the mplayer log to a file. This log is updated every time you play a file, so you can get from it the info about the file that is playing.
rvm
Site Admin
 
Posts: 3787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: Can I derive the mp3-filepath from SMPlayer-portable?

Postby Tup » Fri Oct 30, 2015 9:47 am

Thanks for the quick reply RVM.
I created a log file, and it also works in a portable (root-independent) environment, so that's very nice.
Only there's this problem: there's a lot of info in the log-text, where I only need the string: " Playing M:/.......(path to mp3) "
Do you think it 's posible to set up a sort of filtering?
It would also improve response speed, I guess.
Thanks in advance.
Tup

PS I am not shure, but in case you are the founding father of SMPlayer: great job !
I think it's very nice software, and I am trying to implement it in a software-suite which supports music teachers in their daily practice.
The idea is to open directly a music-sheet, or notes, or any other document related to the curently played media-file.
And vice versa, but I managed that already.
Tup
 
Posts: 3
Joined: Fri Oct 30, 2015 12:30 am

Re: Can I derive the mp3-filepath from SMPlayer-portable?

Postby Tup » Fri Oct 30, 2015 2:02 pm

On second thought: it works fine actually.
I was afraid of too much latency when searching for this string in the text-file, I made some SearchString Thingies myself, and it seems to work like a flow.
Thank you very much.
Mart Tupman.
Tup
 
Posts: 3
Joined: Fri Oct 30, 2015 12:30 am


Return to General

Who is online

Users browsing this forum: No registered users and 43 guests