mirror of
https://github.com/SinTan1729/TvTimeToTrakt.git
synced 2024-12-25 21:08:37 -06:00
updated index numbers of seen_episode
This commit is contained in:
parent
21edfd9c1a
commit
2f22c25b9a
2 changed files with 10 additions and 8 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,3 +2,5 @@ watched_show_process_tracker.json
|
||||||
localStorage.json
|
localStorage.json
|
||||||
config.json
|
config.json
|
||||||
TimeToTrackt.py
|
TimeToTrackt.py
|
||||||
|
seen_episode.csv
|
||||||
|
followed_tv_show.csv
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
# main.py
|
# main.py
|
||||||
from logging import error
|
from logging import error
|
||||||
import sys
|
import sys
|
||||||
from trakt import init
|
from trakt import *
|
||||||
from trakt.movies import get_recommended_movies
|
|
||||||
import trakt.core
|
import trakt.core
|
||||||
import os
|
import os
|
||||||
from trakt.tv import TVShow
|
|
||||||
import csv
|
import csv
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import time
|
import time
|
||||||
|
@ -14,6 +12,8 @@ import json
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from trakt.tv import TVShow
|
||||||
|
|
||||||
# Adjust this value to increase/decrease your requests between episodes.
|
# Adjust this value to increase/decrease your requests between episodes.
|
||||||
# Make sure it's above 1 seconds to remain within the rate limit.
|
# Make sure it's above 1 seconds to remain within the rate limit.
|
||||||
DELAY_BETWEEN_EPISODES_IN_SECONDS = 5
|
DELAY_BETWEEN_EPISODES_IN_SECONDS = 5
|
||||||
|
@ -314,18 +314,18 @@ def processWatchedShows():
|
||||||
# records during the import process.
|
# records during the import process.
|
||||||
rowsCount += 1
|
rowsCount += 1
|
||||||
# Get the name of the TV show
|
# Get the name of the TV show
|
||||||
tvShowName = row[6]
|
tvShowName = row[8]
|
||||||
|
|
||||||
# Ignore the header row
|
# Ignore the header row
|
||||||
if tvShowName != "tv_show_name":
|
if tvShowName != "tv_show_name":
|
||||||
# Get the TV Time Episode Id
|
# Get the TV Time Episode Id
|
||||||
tvShowEpisodeId = row[1]
|
tvShowEpisodeId = row[4]
|
||||||
# Get the TV Time Season Number
|
# Get the TV Time Season Number
|
||||||
tvShowSeasonNo = row[7]
|
tvShowSeasonNo = row[5]
|
||||||
# Get the TV Time Episode Number
|
# Get the TV Time Episode Number
|
||||||
tvShowEpisodeNo = row[8]
|
tvShowEpisodeNo = row[6]
|
||||||
# Get the date which the show was marked 'watched' in TV Time
|
# Get the date which the show was marked 'watched' in TV Time
|
||||||
tvShowDateWatched = row[4]
|
tvShowDateWatched = row[7]
|
||||||
# Parse the watched date value into a Python type
|
# Parse the watched date value into a Python type
|
||||||
tvShowDateWatchedConverted = datetime.strptime(
|
tvShowDateWatchedConverted = datetime.strptime(
|
||||||
tvShowDateWatched, '%Y-%m-%d %H:%M:%S')
|
tvShowDateWatched, '%Y-%m-%d %H:%M:%S')
|
||||||
|
|
Loading…
Reference in a new issue