Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/mtv and some other stuff #10391

Merged
merged 2 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions medusa/providers/torrent/html/morethantv.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,9 @@ def process_column_header(td):
if row.find('img', alt='Nuked'):
continue

title = cells[labels.index('Name')].find('table').get_text(strip=True)
download_url = urljoin(self.url, cells[labels.index('Name')].find('table').find('a')['href'])
if not all([title, download_url]):
continue

seeders = int(cells[labels.index('Seeders')].get_text(strip=True).replace(',', ''))
leechers = int(cells[labels.index('Leechers')].get_text(strip=True).replace(',', ''))
title = cells[labels.index('Name')].find('a').get_text(strip=True)

# Filter unseeded torrent
if seeders < self.minseed:
Expand All @@ -165,19 +161,26 @@ def process_column_header(td):
pubdate_raw = cells[4].find('span')['title']
pubdate = self.parse_pubdate(pubdate_raw)

item = {
'title': title,
'link': download_url,
'size': size,
'seeders': seeders,
'leechers': leechers,
'pubdate': pubdate,
}
if mode != 'RSS':
log.debug('Found result: {0} with {1} seeders and {2} leechers',
title, seeders, leechers)

items.append(item)
releases = cells[labels.index('Name')].find('table').find_all('tr')
for release in releases:
release_title = release.find('td').get_text(strip=True)
download_url = urljoin(self.url, release.find('a')['href'])
if not all([release_title, download_url]):
continue

item = {
'title': release_title,
'link': download_url,
'size': size,
'seeders': seeders,
'leechers': leechers,
'pubdate': pubdate,
}
if mode != 'RSS':
log.debug('Found result: {0} with {1} seeders and {2} leechers',
title, seeders, leechers)

items.append(item)
except (AttributeError, TypeError, KeyError, ValueError, IndexError):
log.exception('Failed parsing provider.')

Expand Down
10 changes: 9 additions & 1 deletion themes-default/slim/src/components/change-indexer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,25 @@ export default {
watch: {
queueitems(queueitems) {
const { allShows } = this;
let changingShows = false;
for (const show of allShows) {
if (!('changeStatus' in show)) {
continue;
}

const foundItem = queueitems.find(item => item.identifier === show.changeStatus.identifier);
if (foundItem && foundItem.success === null) {
changingShows = true;
}

if (foundItem && foundItem.oldShow.id.slug === show.id.slug && foundItem.success !== null) {
// Found a queueItem for this show. Let's search for a new show. And replace it.
allShows.find(s => s.id.slug === foundItem.oldShow.id.slug).id = foundItem.newShow.id;
const foundShow = allShows.find(s => s.id.slug === foundItem.oldShow.id.slug);
foundShow.id = foundItem.newShow.id;
foundShow.checked = false;
}
}
this.started = changingShows;
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ export default {
.step-container .state:hover + .stepdisplay {
display: block;
}

tr:hover {
background-color: rgb(145, 145, 145);
}
</style>
4 changes: 2 additions & 2 deletions themes/dark/assets/js/medusa-runtime.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading