Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
S
sickrage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
11
Issues
11
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SiCKRAGE
sickrage
Commits
dae67f8d
Commit
dae67f8d
authored
Aug 04, 2019
by
echel0n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored os.path for pathlib.Path
parent
4b7cdaef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
sickrage/core/common.py
sickrage/core/common.py
+5
-4
No files found.
sickrage/core/common.py
View file @
dae67f8d
...
...
@@ -19,11 +19,12 @@
import
operator
import
os.path
import
re
from
collections
import
UserDict
from
functools
import
reduce
import
pathlib
from
sickrage.core.helpers.metadata
import
get_file_metadata
,
get_resolution
### CPU Presets for sleep timers
...
...
@@ -260,7 +261,7 @@ class Quality(object):
if
not
name
:
return
ret
name
=
os
.
path
.
basename
(
name
)
name
=
pathlib
.
Path
(
name
)
.
name
check_name
=
lambda
l
,
func
:
func
([
re
.
search
(
x
,
name
,
re
.
I
)
for
x
in
l
])
...
...
@@ -375,7 +376,7 @@ class Quality(object):
data
=
{}
quality
=
Quality
.
UNKNOWN
if
os
.
path
.
isfile
(
filename
):
if
pathlib
.
Path
(
filename
)
.
is_file
(
):
meta
=
get_file_metadata
(
filename
)
try
:
...
...
@@ -388,7 +389,7 @@ class Quality(object):
except
:
return
quality
base_filename
=
os
.
path
.
basename
(
filename
)
base_filename
=
pathlib
.
Path
(
filename
)
.
name
bluray
=
re
.
search
(
r"blue?-?ray|hddvd|b[rd](rip|mux)"
,
base_filename
,
re
.
I
)
is
not
None
webdl
=
re
.
search
(
r"\bweb\b|web.?dl|web(rip|mux|hd)"
,
base_filename
,
re
.
I
)
is
not
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment