https://bugs.gpodder.org/show_bug.cgi?id=533
Thomas Perl <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED AssignedTo|[email protected] |[email protected] Ever Confirmed|0 |1 --- Comment #2 from Thomas Perl <[email protected]> 2009-08-24 12:18:10 BST --- (In reply to comment #0) > A few podcasts have poor or no tagging in the MP3-files they serve, making > them > difficult to browse on my player. > > And most of them use file naming that does not show the episode title, making > them difficult to remove with the 'Select and remove episodes from > device'-dialog. > > This commit removed functionality fixing these problems: > > commit 41b6e827cdedecc75a004af5d9646b9f84da1865 > Author: Thomas Perl <[email protected]> > Date: Mon Jul 6 15:53:41 2009 +0200 > > Remove libtagupdate + related functionality > > Updating tags of files should be done in the post-download > hook, this makes gPodder a bit slimmer. If we wanted the > tag update functionality, we should utilize a proper library > that is able to update tags for all media files (mutagen?). > > > Reverting the commit and porting to mutagen seems straightforward, but from > the > comment I take it that that is not enough? Could you give me some more > pointers > to where it should be implemented? Thanks for your interest in wanting to help implementing this :) Using mutagen is good, but it should be optional (i.e. if mutagen is not available, tag updating is simply not available as a feature - I don't want to introduce mutagen as an added hard dependency). There should probably be a module that is named "gpodder.tagging" that has an object "TagUpdater" or something. The configuration can be stored in the configuration manager that already exists in gPodder. If you have to add GUI-related code, please create a new module in the gpodder.gtkui package, as we aim for having separate GUI and program logic (still not done completely, as you can easily see, but we're working on it). The TagUpdater (you might find a better name for it) object should then probably be given the config object to its constructor and read the configuration from it (which tags to replace with what data). After that, it can be used by passing an PodcastEpisode object to it, and it will read the local filename from the episode, read the metadata from it and update the tag accordingly. Here's a first draft of the interface: class TagUpdater(object): def __init__(self, config): self._config = config def update_tag(self, episode): filename = episode.local_filename(create=False) if filename is None: raise Exception('cannot update tag of non-existing file') # ... read configuration from self._config ... # ... update tag of file, use episode.title, etc.. for metadata ... if <tag update successful>: return True else: return False Oh, yeah - the tag updater should then be able to deal with as many different file formats as possible. gPodder is able to download audio files as well as video files, so both types should be supported, at least for common formats (mp3, ogg, m4a for audio and avi, ogv, mov, m4v for video). Waiting for your feedback and suggestions :) -- Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes. _______________________________________________ gPodder-Bugs mailing list [email protected] https://lists.berlios.de/mailman/listinfo/gpodder-bugs
