swesterfeld / gst123

Flexible command line player based on gstreamer
Other
9 stars 6 forks source link

Update gst123.cc #25

Open zhashuyu opened 2 years ago

zhashuyu commented 2 years ago

feat: decode filename from uri to normal string (文件名由URL格式改为终端识别的字符) from: Playing file:///home/boomer/A_DRIVER/Music-need-sync/%E9%9F%A9%E9%9B%AA/%E9%9F%A9%E9%9B%AA-%E6%83%B3%E8%B5%B7.mp3 to: Playing file:///home/boomer/A_DRIVER/Music-need-sync/韩雪/韩雪-想起.mp3

swesterfeld commented 1 year ago

I have reworked your code to match gst123 coding style and committed it as 11c52fec8ee505a2f243953a7e55d4025fef8310 - please test and let me know if everything works as expected for you.

I didn't understand why I should specialcase "+" occuring in the URI, so I currently don't do that, as a filename on disk could contain a + sign, and I should be able to copypaste the filename output from gst123 and be able to play the file.

swesterfeld commented 1 year ago

Btw, the common case is probably that we are playing back some file that is stored locally (file:///...), for this case it probably makes sense to just display the filename without any prefix, I've done this now like this: 4846586