Removed the exit status
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# @Author: KevinMidboe
|
||||
# @Date: 2017-04-05 18:40:11
|
||||
# @Last Modified by: KevinMidboe
|
||||
# @Last Modified time: 2017-05-15 11:55:52
|
||||
# @Last Modified time: 2017-06-01 19:02:04
|
||||
import os.path, hashlib, time, glob, sqlite3, re, json, tweepy
|
||||
import logging
|
||||
from functools import reduce
|
||||
@@ -90,7 +90,8 @@ class strayEpisode(object):
|
||||
return file
|
||||
|
||||
def analyseSubtitles(self, subFile):
|
||||
f = open('/'.join([env.show_dir, self.parent, subFile]), 'r', encoding='ISO-8859-15')
|
||||
# TODO verify that it is a file
|
||||
f = open(os.path.join([env.show_dir, self.parent, subFile]), 'r', encoding='ISO-8859-15')
|
||||
language = detect(f.read())
|
||||
f.close()
|
||||
|
||||
@@ -112,8 +113,11 @@ class strayEpisode(object):
|
||||
def notifyInsert(self):
|
||||
# Send unique id. (time)
|
||||
tweetObj = twitter()
|
||||
message = 'Added episode:\n' + self.showName + ' S' + self.season\
|
||||
+ 'E' + self.episode + '\nDetails: \n https://kevinmidboe.com/seasoned/verified.html?id=' + self._id
|
||||
if self.showName is None:
|
||||
message = 'Error adding ep: ' + self._id
|
||||
else:
|
||||
message = 'Added episode:\n' + self.showName + ' S' + self.season\
|
||||
+ 'E' + self.episode + '\nDetails: \n https://kevinmidboe.com/seasoned/verified.html?id=' + self._id
|
||||
tweetObj.dm(message)
|
||||
|
||||
|
||||
@@ -141,13 +145,12 @@ class strayEpisode(object):
|
||||
|
||||
|
||||
def getDirContent(dir=env.show_dir):
|
||||
# TODO What if item in db is not in this list?
|
||||
try:
|
||||
return [d for d in os.listdir(dir) if d[0] != '.']
|
||||
except FileNotFoundError:
|
||||
# TODO Log to error file
|
||||
logging.info('Error: "' + dir + '" is not a directory.')
|
||||
# TODO Remove this exit(0)
|
||||
# exit(0)
|
||||
|
||||
# Hashes the contents of media folder to easily check for changes.
|
||||
def directoryChecksum():
|
||||
|
||||
13
client/package.json
Normal file
13
client/package.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "seasoned",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"repository": "https://github.com/KevinMidboe/seasonedShows",
|
||||
"author": "Kevin Midboe",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"path": "^0.12.7",
|
||||
"webpack": "^2.6.1",
|
||||
"webpack-dev-server": "^2.4.5"
|
||||
}
|
||||
}
|
||||
2269
client/yarn.lock
Normal file
2269
client/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@
|
||||
"request": "^2.81.0",
|
||||
"python-shell": "^0.4.0",
|
||||
"moviedb": "^0.2.7",
|
||||
"node-cache": "^4.1.1"
|
||||
"node-cache": "^4.1.1",
|
||||
"request-promise": "^4.2"
|
||||
}
|
||||
}
|
||||
|
||||
1
seasoned.md
Normal file
1
seasoned.md
Normal file
@@ -0,0 +1 @@
|
||||
So to get people to sign up for a account could be to have them sign up for shows that they can be alerted when are added. They can choose by SMS, twitter, email or maybe newsletter.
|
||||
@@ -27,7 +27,7 @@ $("#searchForm").submit(function(e) {
|
||||
url: url,
|
||||
type: 'POST',
|
||||
success: function (data) {
|
||||
Materialize.toast('Verification successfully sent!', 4000);
|
||||
Materialize.toast('Episode successfully verified and moved!', 4000);
|
||||
},
|
||||
error: function(data) {
|
||||
Materialize.toast(data.responseJSON.error, 4000);
|
||||
|
||||
Reference in New Issue
Block a user