https://bugs.gpodder.org/show_bug.cgi?id=902

--- Comment #16 from Thomas Perl <[email protected]> 2010-12-02 14:30:09 GMT ---
(In reply to comment #14)
> is there any documentation on the data structures available at that point in
> the code - specifically where can i read the feed info that was gathered from
> the xml file so i can see the expected length of the episode?

>From the Python side, you want to have a look at src/gpodder/model.py

The length of the episode (in bytes) is stored in the "length" attribute, so if
you have a PodcastEpisode object called "e", you can get the size via:

  e.length

The length might not be available for some episodes (e.g. YouTube channels or
podcasts from bad RSS feeds).

For the database itself, the schema is in src/gpodder/dbsqlite.py

(In reply to comment #15)
> oh and another wuick thing... the reason i thought patching the logic in that
> place was i assumed that by then you had already decided what the file will be
> called on the disk so it would not matter what the feed called it
> 
> is that not the case?

The preliminary file name is decided at the call to local_filename(create=True)
in download.py when DownloadTask gets constructed. A content-type or
content-disposition header in the HTTP response might change that filename
after the download has finished - in this case, the filename gets updated once
more and stored in the database.

Look at the implementation of local_filename() in src/gpodder/model.py to see
the algorithm used to generate the filename. It also takes care of renaming the
download file if an existing file with the same name already exists.

-- 
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

Reply via email to