manolomartinez / greg

A command-line podcast aggregator
GNU General Public License v3.0
297 stars 37 forks source link

Tagging doesn't seem to work when there is no specific section for a podcast #34

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi,

I activated tagging in the config file (DEFAULT section, Tag = yes) but after downloading a podcast called "test", I get the following stacktrace :

[edouard@pioneer ~]$ greg sync
Checking test...
Downloading L'intégrale des Grosses têtes du 18 novembre -- 7780557844_l-integrale-des-grosses-tetes-du-18-novembre.mp3
Traceback (most recent call last):
  File "/usr/local/bin/greg", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/site-packages/greg/gregparser.py", line 112, in main
    args.func(vars(args))
  File "/usr/local/lib/python3.5/site-packages/greg/greg.py", line 760, in sync
    feed.download_entry(entry)
  File "/usr/local/lib/python3.5/site-packages/greg/greg.py", line 330, in download_entry
    tag(placeholders)
  File "/usr/local/lib/python3.5/site-packages/greg/greg.py", line 506, in tag
    feedoptions = placeholders.feed.config.options(placeholders.name)
  File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/configparser.py", line 675, in options
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'test'

I was hoping that my default tagging options would be used for every podcast without having to add a specific section, should that be the case ?

manolomartinez commented 8 years ago

Hi, indeed, it should. Let me look into it and get back to you.

Thanks for reporting Manolo

manolomartinez commented 8 years ago

Hi, this should be solved in the tip of the master branch now. Please take a look and let me know.

Cheers, Manolo

ghost commented 8 years ago

Hi Manolo, I tried your fix and it's working as expected ! Thank you very much. Edouard

zouhair commented 7 years ago

What was the solution?

I got almost the same problem