8000 [pull] v2 from jxxghp:v2 by pull[bot] · Pull Request #188 · comanche2008/MoviePilot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[pull] v2 from jxxghp:v2 #188

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

Merged
merged 2 commits into from
Jun 24, 2025
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
8 changes: 4 additions & 4 deletions app/core/meta/metavideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ def __init_web_source(self, token: str, streaming_platforms: StreamingPlatforms)

prev_token = None
prev_idx = self._index - 2
if prev_idx >= 0 and prev_idx < len(self.tokens._tokens):
prev_token = self.tokens._tokens[prev_idx]
if 0 <= prev_idx < len(self.tokens.tokens):
prev_token = self.tokens.tokens[prev_idx]

next_token = self.tokens.peek()

Expand Down Expand Up @@ -630,8 +630,8 @@ def __init_web_source(self, token: str, streaming_platforms: StreamingPlatforms)
match_start_idx = self._index - query_range
match_end_idx = self._index - 1
start_index = max(0, match_start_idx - query_range)
end_index = min(len(self.tokens._tokens), match_end_idx + 1 + query_range)
tokens_to_check = self.tokens._tokens[start_index:end_index]
end_index = min(len(self.tokens.tokens), match_end_idx + 1 + query_range)
tokens_to_check = self.tokens.tokens[start_index:end_index]

if any(tok and tok.upper() in web_tokens for tok in tokens_to_check):
self.web_source = platform_name
Expand Down
4 changes: 2 additions & 2 deletions app/core/meta/streamingplatform.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, Optional, List, Tuple
from typing import Optional, List, Tuple

from app.utils.singleton import Singleton

Expand Down Expand Up @@ -101,4 +101,4 @@ def is_streaming_platform(self, name: str) -> bool:
"""
if name is None:
return False
return name.upper() in self._lookup_cache
return name.upper() in self._lookup_cache
4 changes: 4 additions & 0 deletions app/utils/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ def peek(self):
return None
else:
return self._tokens[index]

@property
def tokens(self):
return self._tokens
4 changes: 0 additions & 4 deletions tests/run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import unittest

from tests.test_bluray import BluRayTest
from tests.test_metainfo import MetaInfoTest

if __name__ == '__main__':
Expand All @@ -10,9 +9,6 @@
suite.addTest(MetaInfoTest('test_metainfo'))
suite.addTest(MetaInfoTest('test_emby_format_ids'))

# 测试蓝光目录识别
suite.addTest(BluRayTest())

# 运行测试
runner = unittest.TextTestRunner()
runner.run(suite)
178 changes: 0 additions & 178 deletions tests/test_bluray.py

This file was deleted.

4 changes: 2 additions & 2 deletions version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
APP_VERSION = 'v2.5.7-2'
FRONTEND_VERSION = 'v2.5.7-1'
APP_VERSION = 'v2.5.8'
FRONTEND_VERSION = 'v2.5.8'
Loading
0