mirror of
https://github.com/farfalleflickan/cmyflix.git
synced 2024-11-24 09:45:30 +00:00
Moved around cleanup code, minor fixes, version bump
This commit is contained in:
parent
a3b57f7033
commit
87445fd8a4
@ -287,7 +287,7 @@ progConfig *getConfig(char *srcPath) {
|
||||
|
||||
if (setrlimit(RLIMIT_NOFILE, &(options->newLim))==-1){
|
||||
confCleanup(options);
|
||||
fatalError_abort("getConfig error", "could not set new fileLimit, error: %s\n", errno, strerror(errno));
|
||||
fatalError_abort("getConfig error", "could not set new fileLimit, error: %s\n", strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "main.h"
|
||||
|
||||
#define REPO_URL "https://github.com/farfalleflickan/cmyflix"
|
||||
#define VERSION_STRING "0.22"
|
||||
#define VERSION_STRING "0.23"
|
||||
|
||||
// GLOBAL VARIABLES
|
||||
FILE *LOGFILE=NULL;
|
||||
@ -78,9 +78,6 @@ void checkUpdate() {
|
||||
resetSTDColors();
|
||||
FILE *cmdRet=popen(cmdStr, "r");
|
||||
if (cmdRet==NULL) {
|
||||
if (pclose(cmdRet)!=0) {
|
||||
printError("cmyflix", false, HRED, "%s\n", strerror(errno));
|
||||
}
|
||||
tryFree(cmdStr);
|
||||
fatalError_exit("checkUpdate", "something went wrong while trying to check for an update, errno is: %s\n", strerror(errno));
|
||||
} else {
|
||||
@ -215,9 +212,6 @@ void copyExtras(progConfig *conf, progFlags runFlags, char *htmlFolder, char *de
|
||||
resetSTDColors();
|
||||
FILE *cmdRet=popen(cmdStr, "r");
|
||||
if (cmdRet==NULL) {
|
||||
if (pclose(cmdRet)!=0) {
|
||||
printError("cmyflix", false, HRED, "%s\n", strerror(errno));
|
||||
}
|
||||
tryFree(cmdStr);
|
||||
fatalError_exit("cmyflix error", "something went wrong while trying to copy HTML resources from '%s' to '%s';\n", extPath, tempStr2);
|
||||
} else {
|
||||
|
10
src/utils.c
10
src/utils.c
@ -791,10 +791,10 @@ char *getPoster(const char *posterURL, progConfig *conf, int prefImgWidth, doubl
|
||||
}
|
||||
cJSON_Delete(imgStr);
|
||||
}
|
||||
cJSON_Delete(width);
|
||||
cJSON_Delete(ratio);
|
||||
cJSON_Delete(lang);
|
||||
}
|
||||
cJSON_Delete(width);
|
||||
cJSON_Delete(ratio);
|
||||
cJSON_Delete(lang);
|
||||
} else {
|
||||
printError("getPoster warning", true, HYEL, "request error, URL: '%s';\nitem==NULL - json_posters was:\n", posterURL);
|
||||
char *tempStr=cJSON_Print(json_posters);
|
||||
@ -811,7 +811,6 @@ char *getPoster(const char *posterURL, progConfig *conf, int prefImgWidth, doubl
|
||||
printError("", true, HYEL, "\nEND;\n");
|
||||
tryFree(tempStr);
|
||||
}
|
||||
cJSON_Delete(json_posters);
|
||||
} else {
|
||||
printError("getPoster warning", true, HYEL, "request error, URL: '%s';\njson_posters==NULL - json_root was:\n", posterURL);
|
||||
char *tempStr=cJSON_Print(json_root);
|
||||
@ -819,10 +818,11 @@ char *getPoster(const char *posterURL, progConfig *conf, int prefImgWidth, doubl
|
||||
printError("", true, HYEL, "\nEND;\n");
|
||||
tryFree(tempStr);
|
||||
}
|
||||
cJSON_Delete(json_root);
|
||||
cJSON_Delete(json_posters);
|
||||
} else {
|
||||
printError("getPoster warning", true, HYEL, "request error, URL: '%s';\njson_root==NULL\n", posterURL);
|
||||
}
|
||||
cJSON_Delete(json_root);
|
||||
freeBlock(mem);
|
||||
return imgURL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user