Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip temporarily failed entries #90

Open
RileyStarlight opened this issue Apr 15, 2018 · 2 comments
Open

Skip temporarily failed entries #90

RileyStarlight opened this issue Apr 15, 2018 · 2 comments

Comments

@RileyStarlight
Copy link

I love Greg, it's the best podcast downloader I've ever used.

I recently found a podcast that contained a bad URL entry. Greg at this point detects the failure and exits, leaving all the other podcasts that were not yet checked, unchecked or undownloaded.

To fix the problem, I manually edited the ~/Podcasts/.greg/data file and commented on the problematic podcast section, so that the others could synchronize.
This solution worked, but when I went to uncomment the podcast to restore it to its initial state, I found that the commented section had disappeared. Apparently Greg regenerates the file every time instead of editing it. I had to add the sources of this podcast again to get back to normal.
A few days later they corrected the faulty URL in the feed and everything worked again.

The question is, in this scenario, how can I omit a particular podcast source? I haven't found any documentation on the subject.

@mattzab
Copy link

mattzab commented Nov 3, 2019

I'm having the same issue.
Some kind of "ignore errors" flag would be handy in this situation. I find problematic podcasts all the time. Usually it's that the date is wrong, and the next day that podcast is able to download just fine. Being able to ignore and continue instead of error out and exit would be amazing.

@DidntAgreeToTermsOfService
Copy link

DidntAgreeToTermsOfService commented Jan 5, 2023

I have run into this problem in the last year of using greg (podcasts which greg can't sync but which I want to keep checking in case they fix their problems). My solution was to write a sh script which uses 'greg list' into a temp file and then loops on the file line by line with 'greg sync ${i}' ($i is the loop variable so it changes on each loop). Each greg invocation is a process which can abend while the shell script will keep chugging. Its brute force but works so I have one command which I can run until each feed shows up as DONE or gives a consistent error.

Script below. If the script quits when you run into the first feed with an error, the fix is to tweak the shell config in this script so it ignores return codes. I'm not addressing how to do that here. I run greg as root on busybox. This script may need a sudo here or there on your machine if you are not running as root.
''============== CODE BELOW''
#!/bin/sh

echo ""
echo "Starting gregsync"
echo "Use Bourne Shell to sync all podcast feeds with greg"
echo "...number of tmp.xxxx files in /tmp: "ls /tmp/tmp.* | wc -l
echo "#####################################"
echo "# If this script abends, please cleanup /tmp dir. #"
echo "#####################################"
echo ""

PODLIST=$(mktemp) # Feeds
TS=$(date +%s) # Time Stamp (start time)
i=0 # holds feed name

echo "First get all Podcast feeds into a temp file"
greg list | grep -v '^[[:space:]]*$' | sort -o $PODLIST
#one doesn't need to sort but do remove the empty line
#generated by 'greg list'
echo ""

echo "Now sync each podcast feed"
echo ""

while read i ; do
echo $i
greg sync $i
echo ""
sleep 2 # not needed on a fast machine. Mine is sloooow
done <$PODLIST

#cleanup code
rm $PODLIST
ls -l /tmp
echo " "
echo "======================================="
echo " Elapsed time "$((date +%s - $TS))" seconds"
echo "gregsync DONE"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants