You are here

SMPlayer creating My Videos directory

11 posts / 0 new
Last post
P2012
Offline
Last seen: 12 years 1 month ago
Joined: 2012-03-08 07:58
SMPlayer creating My Videos directory

The new version of SMPlayer keeps creating a My Documents/My Videos directory everytime it is started. Is this a bug from the portable version or does it come from the SMPlayer? Anyway it is annoying.

Is there a way to switch it off?

prapper
Offline
Last seen: 3 years 10 months ago
Developer
Joined: 2008-01-24 17:01
SMPlayer's Youtube browser

SMPlayer's Youtube browser (smtube.exe) creates the folder My Videos\Youtube. In the process of dealing with it, PAL leaves behind the parent My Videos folder, even if you don't use smtube.exe. I didn't test on a system without this directory. As My Videos is a system folder I would question the wisdom of deleting it, even if it's empty.

I agree with you though, I can see it would be annoying. I could add it if required but I would be surprised if it got the OK. You could comment it out in SMPlayerPortable\App\AppInfo\Launcher\SMPlayerPortable.ini:

; -=%DOCUMENTS%\My Videos\Youtube

On that subject, should there not be some environment variables in PAL for these My Music/Pictures/Videos folders?

EDIT: Or maybe just add this to launcher.ini:

[DirectoriesCleanupIfEmpty]
1=%DOCUMENTS%\My Videos

If, as in your case, it's not a system folder then it won't contain Desktop.ini so it should be safe. We are on shaky ground here though so, at your own risk :-)

P2012
Offline
Last seen: 12 years 1 month ago
Joined: 2012-03-08 07:58
Thanks!

While commenting out creating the directory works it still increases the work with every new update (I don't update automatically).

But more important I see a conflict between portable software and creating a directory outside the application directory. If it is essential to work for the application or a non-deactivatable parts of it then in my opinion it can't be portable (anymore). Maybe it's better to discontinue making this application portable to encourage other authors to keep their software as portable as possible.

As in this case the new feature is only the YouTube option which is in my opinion useless not only because every browser can handle YouTube videos but also because it can't be portable anyway.

Also the approach to clean up tracks at the exit is not really satisfying for portable software.

BTW: I do not use any of the media folders nor PAL.

Steve_Storm
Offline
Last seen: 1 year 7 months ago
Joined: 2008-01-23 17:05
Same issue with recent update

I am having the exact same issue. In the prior PAc release, I had found a line in the SMPlayer config file referring to smtube.exe, that once deleted would keep the "My Videos" folder from being generated. However, I could not find it in the current release. After trying a few things, I launched the (portable edition)SMPlayer.exe directly from within X:\PortableApps\SMPlayerPortable\App\SMPlayer, and the "My Videos" folder was not created. The issue seems to be with the PAc SMPlayer launcher. For now, I am just going to use SMPlayer's portable version until it's fixed. It's mildly annoying, but not a huge deal. Thanks for all you do! Wink
~Steve

J Neutron
Offline
Last seen: 7 months 5 days ago
Joined: 2008-06-10 19:26
You miss the point

But more important I see a conflict between portable software and creating a directory outside the application directory. If it is essential to work for the application or a non-deactivatable parts of it then in my opinion it can't be portable (anymore). Maybe it's better to discontinue making this application portable to encourage other authors to keep their software as portable as possible.

The portability goal isn't about preventing directories/files scattered here and there, the intent is to allow the program to make messes and then the launcher cleans up when the program ends.

If this site followed your criteria, we would probably lose at least half of the programs that are currently available here. That wouldn't be good, would it?

neutron1132 (at) usa (dot) com

Steve_Storm
Offline
Last seen: 1 year 7 months ago
Joined: 2008-01-23 17:05
Agreed

I agree with you about what should be the function of the launcher; let the app do it's thing and the launcher do the cleanup. (But it's easy for me to say since I don't write code). For me and maybe a few other people, the creation of the "My Videos" folder is unwanted behavior- and perhaps something that if it can't be cleaned up (safely) by the launcher on exit, then maybe it could be prevented by the launcher when it's run. I was just suggesting that it could be something (in this instance) with the launcher, and not the base app. (By the way, if you delete the smtube.exe file, and run the launcher, the folder is still created.)

J Neutron
Offline
Last seen: 7 months 5 days ago
Joined: 2008-06-10 19:26
Me either

I'm not coding any of this stuff either, but maybe the launcher could check to see if the directory existed at startup (before the app runs), and if it does, then just leave it alone later.

I am not a coder (and don't even play one on TV) so I'm not sure if this could even work.

neutron1132 (at) usa (dot) com

prapper
Offline
Last seen: 3 years 10 months ago
Developer
Joined: 2008-01-24 17:01
On checking

On checking this I find that the latest version of smtube.exe isn't automatically creating this folder so that function of the launcher is now redundant. If you comment/remove the Youtube line from SMPlayerPortable\App\AppInfo\Launcher\SMPlayerPortable.ini:

[DirectoriesMove]
smplayer\file_settings=%PAL:AppDir%\SMPlayer\file_settings
; -=%DOCUMENTS%\My Videos\Youtube

That should solve the problem. My fault for not checking when I updated the package. I'll make sure it's in the next release though. I presume it's not worth a rev2 but if it is, let me know.

Thanks to both of you.

J Neutron
Offline
Last seen: 7 months 5 days ago
Joined: 2008-06-10 19:26
And to you, sir!

Thanks to both of you.

You are the driver of this bus, and we're just passengers along for the ride. Thanks for keeping it on the right correct side of the road.

neutron1132 (at) usa (dot) com

prapper
Offline
Last seen: 3 years 10 months ago
Developer
Joined: 2008-01-24 17:01
Hey, no problem

Hey, no problem, whatever side of the road we're on :-)

Steve_Storm
Offline
Last seen: 1 year 7 months ago
Joined: 2008-01-23 17:05
That takes care of it

That takes care of it; thank you very much for the fix. IMHO there's no need to push a rev 2, unless you absolutely want to. Wink

Log in or register to post comments