forked from djib/PDMameUpdate
Merge branch 'master' of sebastian404/PDMameUpdate into master
This commit is contained in:
@ -24,6 +24,7 @@ Requirements:
|
||||
* Python3 with the libraries below
|
||||
- feedparser
|
||||
- transmission-clutch
|
||||
- tabulate
|
||||
* Linux (untested on other OS, but it might work)
|
||||
|
||||
Notes
|
||||
@ -48,6 +49,7 @@ import re
|
||||
import requests
|
||||
import time
|
||||
from clutch.core import Client
|
||||
from tabulate import tabulate
|
||||
from collections import defaultdict
|
||||
from pprint import pformat
|
||||
from urllib.parse import quote
|
||||
@ -137,14 +139,17 @@ def check_and_rewrite_download_url(torrent_data):
|
||||
|
||||
def prompt_for_update():
|
||||
"""Ask for user confirmation before updating"""
|
||||
|
||||
|
||||
outputHeader=["Torrent","from","to"]
|
||||
output=[]
|
||||
if len(torrents) > 0:
|
||||
for torrent, data in torrents.items():
|
||||
print('Torrent {}: {} -> {}'.format(
|
||||
output.append([
|
||||
torrent,
|
||||
data['local-version'],
|
||||
data['remote-version']
|
||||
))
|
||||
])
|
||||
print(tabulate(output,headers=outputHeader,tablefmt="simple"))
|
||||
print('Should I update the torrents listed above? (y/N)')
|
||||
answer = input()
|
||||
if answer.lower() != 'y':
|
||||
|
Reference in New Issue
Block a user