You are here

[Fixed] gPodder settings reset

21 posts / 0 new
Last post
nascent
nascent's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2008-12-15 07:40
[Fixed] gPodder settings reset

I used to be able to change the settings of gPodder, but now If I change the download path and close gpodder, upon reopen the download path is reset. I understand the reason for the default path. But surely removing the ability to set a path isn't desired? If a user wishes to point the path to a different drive/path then this shouldn't be ignored upon restart?

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 33 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Download Path

The download path has always been fixed. This is due to a bug within gPodder itself.

Sometimes, the impossible can become possible, if you're awesome!

nascent
nascent's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2008-12-15 07:40
Damn. I've not noticed the

Damn. I've not noticed the issue before. My usb drive has been filling up by podcasts only recently. normally i have it downlaode to a different drive.

Is there no fix or hack I can do?

J_P_77
Offline
Last seen: 9 years 5 months ago
Joined: 2012-05-12 06:39
My Hack

WARNING: USE AT YOUR OWN RISK

For Version gPodder 3.1.0

Change Files
    1. gPodderPortable\App\AppInfo\Launcher\gPodderPortable.ini
        [Environment]
        GPODDER_DOWNLOAD_DIR=(Your directory that you wish to download podcast too)
        
    2. gPodderPortable\App\gPodder\src\gpodder\__init__.py
        Replace Code Block:

            # Function to set a new gPodder home folder
            def set_home(new_home):
                global home, config_file, database_file, downloads
                home = os.path.abspath(new_home)

                config_file = os.path.join(home, 'Settings.json')
                database_file = os.path.join(home, 'Database')
                downloads = os.path.join(home, 'Downloads')

            # Default locations for configuration and data files
            default_home = os.path.expanduser(os.path.join('~', 'gPodder'))
            set_home(os.environ.get('GPODDER_HOME', default_home))

         With:
            
            # Default locations for configuration and data files
            default_home = os.path.expanduser(os.path.join('~', 'gPodder'))

            if os.path.exists(os.environ.get('GPODDER_HOME')) and os.path.isdir(os.environ.get('GPODDER_HOME')):
                home = os.path.abspath(os.environ.get('GPODDER_HOME'));
            else:
                home = os.path.abspath(default_home)

            config_file = os.path.join(home, 'Settings.json')
            database_file = os.path.join(home, 'Database')

            # Sets download location
            if os.path.exists(os.environ.get('GPODDER_DOWNLOAD_DIR')) and os.path.isdir(os.environ.get('GPODDER_DOWNLOAD_DIR')):
                downloads = os.path.abspath(os.environ.get('GPODDER_DOWNLOAD_DIR'))
            else:
                downloads = os.path.join(home, 'Downloads')
nascent
nascent's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2008-12-15 07:40
Many thanks for the tip. I

Many thanks for the tip. I did change #1, although I see no src directory for change #2. I assume that's only to recompile it. Is the first change alone not enough to do as desired?

J_P_77
Offline
Last seen: 9 years 5 months ago
Joined: 2012-05-12 06:39
Environmental variable
Environmental variable GPODDER_DOWNLOAD_DIR does not exists 
in gPodder 3.1.x. It did in gPodder 2.x but, It did not work 
correctly. My fix adds the environmental variable 
GPODDER_DOWNLOAD_DIR and only works for gPodder 3.1.x. No 
Recompiling Necessary. If you don't see the src folder, you 
don't have version gPodder 3.1.x
John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 33 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Switch Up

Could you rework your patch so we can just add a couple lines to the end. Basically, just a simple check for the env var and then replace the current downloads var. That way if they alter the code, our patch will still be the same (adding a few lines right after theirs).

Sometimes, the impossible can become possible, if you're awesome!

J_P_77
Offline
Last seen: 9 years 5 months ago
Joined: 2012-05-12 06:39
Your solution will work
Your solution will work something like this
    # Sets download location
    if os.environ.get('GPODDER_DOWNLOAD_DIR', None) is not None:
        if os.path.exists(os.environ.get('GPODDER_DOWNLOAD_DIR')) and os.path.isdir(os.environ.get('GPODDER_DOWNLOAD_DIR')):
            downloads = os.path.abspath(os.environ.get('GPODDER_DOWNLOAD_DIR'))

right after this

    # Default locations for configuration and data files
    default_home = os.path.expanduser(os.path.join('~', 'gPodder'))
    set_home(os.environ.get('GPODDER_HOME', default_home))
nascent
nascent's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2008-12-15 07:40
I think I figured out why

I think I must've had a symlink to point to the desired location. and during my windows reinstall forgot to set up the symlink. It'd still be nice to have a better way of doing it via setting though, s when taking it round on usb, symlinks arent a possibility.

J_P_77
Offline
Last seen: 9 years 5 months ago
Joined: 2012-05-12 06:39
Forked

For those who are interested i have forked gPodder, https://github.com/J-P-77/gpodder and have applied my patch

nascent
nascent's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2008-12-15 07:40
That's awesome. Thank you

That's awesome. Thank you very much!

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 33 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
New Download Setting Added in 3.1.2

I've added a new advanced download setting to gPodder Portable 3.1.2. In the gPodderPortable.ini file there are 3 new options. They are explained in the new example INI included in Other\Source, which I have also included here:

[gPodderPortable]
AdditionalParameters=
DisableSplashScreen=false
RunLocally=false

# The above options are explained in the included readme.txt
# This INI file is an example only and is not used unless it is placed as described in the included readme.txt

# DownloadDirFullPath=X:\FullPath\To\Downloads
# DownloadDirPartialPath=Full\Path\From\Drive\Root\To\Downloads
# DownloadDirPortableAppsRootPath=Path\From\Platform\Root\To\Downloads

# The above allow you to custom redirect the location gPodder Portable uses for downloads
# it is meant for advanced users.  Only one of the 3 options should be used by removing the # and space from the line
# the first option is a full path to downloads and can be on another drive
# the second is a path relative to the drive letter X:\
# the 3rd is relative to the root of a PortableApps.com Platform install (where Start.exe is)

These 3 options will let you place your downloads directory on another drive, in a directory relative to the root of the drive or in a directory relative to the PortableApps.com Platform root where Start.exe (especially useful for custom locations in conjunction with something like DropBox).

Sometimes, the impossible can become possible, if you're awesome!

nascent
nascent's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2008-12-15 07:40
3.3.0

I see with 3.3.0 the fix:
Respect GPODDER_DOWNLOAD_DIR in the environment (bug 466)
is included.

Does this affect gpodder portable, should I be doing anything special to choose the download directory now?

Thanks.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 33 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Nope

It's still hardwired to the exact same place as in 3.2.0. gPodder still has no GUI for adjusting the download directory and no internal setting for the location. It's just an environment variable for advanced users to set a full path to an alternate download directory. It is not used by gPodder Portable.

Sometimes, the impossible can become possible, if you're awesome!

spud77
Offline
Last seen: 8 years 10 months ago
Joined: 2013-01-20 13:30
User-Defined Download Directory

Pardon my ignorance, what is the current method (if any) to have gpodder download podcasts to a user-defined directory?

Thanks for your future reply and all your hardwork on portableapps,
spud77

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 33 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Fixed

The directory is fixed to the config\Downloads directory in the portable version. We use the GPODDER_DOWNLOAD_DIR environment variable to point it there now. You could, in theory, edit the gPodderPortable.ini file within the App\AppInfo\Launcher directory and change the GPODDER_DOWNLOAD_DIR=%PAL:DataDir%\config\Downloads line to something else. But it would be reset on each upgrade.

Sometimes, the impossible can become possible, if you're awesome!

usrnm
Offline
Last seen: 7 years 2 months ago
Joined: 2013-01-20 16:49
yeah, this should be fixed so

yeah, this should be fixed so its a GUI option. nobody wants GB's of data downloaded to the same location they keep their portable app stuff. Sad

can't believe it wasn't in the original installer program either.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 33 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Portable You Can

You can specify it in the portable version at least using the additions I made:
https://portableapps.com/node/32057#comment-195919

Sometimes, the impossible can become possible, if you're awesome!

Phil Bingham
Offline
Last seen: 11 months 2 weeks ago
Joined: 2010-03-24 08:10
gPodder - trying to download to a different drive

Old post I know, but I was hoping the ini file method still worked.

It doesn't - or at least I didn't get it to work:

- copied gPodderPortable.ini to ...\PortableApps\gPodderPortable (beside gPodderPortable.exe)
- edited line 'DownloadDirFullPath=' (removed comment, gave it a full path)

Started gPodder, tried downloading something... still goes to the PortableApps folder.
Tried adding a new podcast (in case it picked up the path at subscription time). Same outcome.
Don't seem to be able to change the download path for each podcast individually/manually either.

Am I doing something wrong or is it broken in 3.8?

I'm trying to switch podcast manager and my GBs of podcasts will easily exceed my dropbox capacity (don't want them there anyway).

Hope you can help...

Phil

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 33 min ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Must Be Data

It only works with the gPodderPortable\Data path.

Sometimes, the impossible can become possible, if you're awesome!

Phil Bingham
Offline
Last seen: 11 months 2 weeks ago
Joined: 2010-03-24 08:10
Hi John,

Hi John,

Your quick response much appreciated, and can I say you're dong a fantastic job with PortableApps - I support as I can.

Apologies however - not sure I understood. Do you mean the ini file needs to go into that folder or "full path to downloads and can be on another drive" setting either doesn't work any more (or never did)?

Phil

Log in or register to post comments