Skip to content

Commit

Permalink
Merge pull request #10807 from pymedusa/release/release-1.0.5
Browse files Browse the repository at this point in the history
Release/release 1.0.5
  • Loading branch information
p0psicles authored Jul 6, 2022
2 parents 848c295 + fd86eef commit cb13ff9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.5 (06-07-2022)

#### Fixes
- Only auto change the status of an episode, when directly triggered through the web ui. ([10806](https://github.com/pymedusa/Medusa/pull/10806))

## 1.0.4 (05-07-2022)

#### Improvements
Expand Down
2 changes: 1 addition & 1 deletion medusa/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
log.logger.addHandler(logging.NullHandler())

INSTANCE_ID = text_type(uuid.uuid1())
VERSION = '1.0.4'
VERSION = '1.0.5'

USER_AGENT = 'Medusa/{version} ({system}; {release}; {instance})'.format(
version=VERSION, system=platform.system(), release=platform.release(),
Expand Down
14 changes: 1 addition & 13 deletions medusa/search/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from builtins import str

from medusa import app, common, db, failed_history, helpers, history, ui, ws
from medusa.common import DOWNLOADED, SNATCHED, SNATCHED_BEST, SNATCHED_PROPER, SUBTITLED, WANTED
from medusa.common import DOWNLOADED, SNATCHED, SNATCHED_BEST, SNATCHED_PROPER, SUBTITLED
from medusa.helper.common import enabled_providers
from medusa.helper.exceptions import AuthException, ex
from medusa.helpers import pretty_file_size
Expand Down Expand Up @@ -569,18 +569,6 @@ def run(self):
# Push an update to any open Web UIs through the WebSocket
ws.Message('QueueItemUpdate', self.to_json).push()

if self.segment:
# Make sure the episodes status has been changed to wanted, before starting the search.
ep_sql_l = []
for episode in self.segment:
ep_sql = episode.mass_update_episode_status(WANTED)
if ep_sql:
ep_sql_l.append(ep_sql)

if ep_sql_l:
main_db_con = db.DBConnection()
main_db_con.mass_action(ep_sql_l)

search_result = search_providers(self.show, self.segment)

if search_result:
Expand Down
14 changes: 13 additions & 1 deletion medusa/server/api/v2/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

from collections import defaultdict

from medusa import app
from medusa import app, db
from medusa.common import WANTED
from medusa.search.manual import collect_episodes_from_search_thread
from medusa.search.queue import (
BacklogQueueItem,
Expand Down Expand Up @@ -142,7 +143,18 @@ def _search_backlog(self, data=None):
return self._not_found('Could not find any episode for show {show}. Did you provide the correct format?'
.format(show=series.name))

main_db_con = db.DBConnection()
for segment in itervalues(episode_segments):
# Change the status for the searched eps to 'Wanted'
ep_sql_l = []
for episode in segment:
ep_sql = episode.mass_update_episode_status(WANTED)
if ep_sql:
ep_sql_l.append(ep_sql)

if ep_sql_l:
main_db_con.mass_action(ep_sql_l)

cur_backlog_queue_item = BacklogQueueItem(series, segment)
app.forced_search_queue_scheduler.action.add_item(cur_backlog_queue_item)

Expand Down
1 change: 0 additions & 1 deletion tests/test_guessit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4609,7 +4609,6 @@
screen_size: "1080p"
video_codec: "H.265"
video_profile: "High Efficiency Video Coding"
release_group: Tsundere-Raws
container: mkv
mimetype: "video/x-matroska"
type: episode
Expand Down

0 comments on commit cb13ff9

Please sign in to comment.