Skip to content

Commit

Permalink
podcastdl-0.3.0
Browse files Browse the repository at this point in the history
Summary for 0.3.0 podcastdl release
-----------------------------------
Convert the build system to CMake
Fix filename hadling using guid if available insted of enclosure_url
Fix compatibility with other unixes using time.h instead of sys/time.h
  • Loading branch information
rosorio committed Oct 24, 2018
1 parent 8cccdb8 commit b5397bb
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 2.6)

project(PODCASTDL)
add_subdirectory(src)

set(CMAKE_CXX_FLAGS "-g -Wall")

9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Tue Aug 14 2012.
Summary for 0.3.0 podcastdl release
Convert the build system to CMake
Fix filename hadling using guid if available insted of enclosure_url
Fix compatibility with other unixes using time.h instead of sys/time.h

Sun Jun 05 2011.
Summary for 0.2.1 podcastdl release
First public version
13 changes: 13 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include_directories(${PODCASTDL_SOURCE_DIR}/src /usr/include /usr/local/include)
link_directories(${PODCASTDL_SOURCE_DIR}/src /usr/lib /usr/local/lib)
add_definitions( -DPODCASTDL_VERSION_STRING=\"0.3.0\" )


add_executable(podcastdl podcastdl.c podcast.c util.c)
target_link_libraries(podcastdl mrss)


install(TARGETS podcastdl DESTINATION bin)



File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 12 additions & 5 deletions podcastdl.c → src/podcastdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <unistd.h>
#include <getopt.h>

#include "podcastdl.h"
#include "podcast.h"
#include "util.h"

Expand All @@ -33,7 +32,7 @@ get_podcast_list(char * url, podcast_head_t * podcast,int maxdays)
mrss_error_t ret;
mrss_item_t *item;
char *encoding;
char *p_str, *p_name;
char *p_str, *p_name, * p_url;
time_t feed_time;
time_t now = time(NULL);
mrss_category_t *tags;
Expand All @@ -57,7 +56,14 @@ get_podcast_list(char * url, podcast_head_t * podcast,int maxdays)

/* extract the filename */
p_name = NULL;
for(p_str = item->enclosure_url ; p_str != NULL ; p_str = strstr(p_str,"/")) {

/* If we have a gui, use it instead of the enclosure_url */
if(item->guid != NULL)
p_url = item->guid;
else
p_url = item->enclosure_url;

for(p_str = p_url ; p_str != NULL ; p_str = strstr(p_str,"/")) {
p_name = ++p_str;
}

Expand All @@ -69,10 +75,10 @@ get_podcast_list(char * url, podcast_head_t * podcast,int maxdays)
}
mrss_free(tags);

debug(" - URL %s\n", item->enclosure_url);
debug(" - URL %s\n", p_url);
podcast_add_item( podcast,
item->title,
item->enclosure_url,
p_url,
item->enclosure_length,
feed_time,
taglist,
Expand Down Expand Up @@ -162,6 +168,7 @@ usage(void)
printf(" -i : Add an additional .info file with information about the podcast\n");
printf(" -d <number> : Set the maximum number of days a podcast can have to be download\n");
printf(" -v : Verbose mode for debug \n");
printf(" --version : Print the version number \n");
exit(1);
}

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion util.h → src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef _UTIL_H_
#define _UTIL_H_

#include <sys/time.h>
#include <time.h>

#include <err.h>
#include <errno.h>
Expand Down

0 comments on commit b5397bb

Please sign in to comment.