Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sick-Beard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
Sick-Beard
Commits
0093f95d
Commit
0093f95d
authored
13 years ago
by
Nic Wolfe
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:midgetspy/Sick-Beard into windows_binaries
parents
be0694df
553641b6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/versionChecker.py
+13
-6
13 additions, 6 deletions
sickbeard/versionChecker.py
with
13 additions
and
6 deletions
sickbeard/versionChecker.py
+
13
−
6
View file @
0093f95d
...
...
@@ -111,28 +111,31 @@ class WindowsUpdateManager(UpdateManager):
self
.
_newest_version
=
None
self
.
gc_url
=
'
http://code.google.com/p/sickbeard/downloads/list
'
self
.
version_url
=
'
https://raw.github.com/midgetspy/Sick-Beard/windows_binaries/updates.txt
'
def
_find_installed_version
(
self
):
return
int
(
sickbeard
.
version
.
SICKBEARD_VERSION
[
6
:])
def
_find_newest_version
(
self
,
whole_link
=
False
):
"""
Checks g
oogle code
for the newest Windows binary build. Returns either the
Checks g
it
for the newest Windows binary build. Returns either the
build number or the entire build URL depending on whole_link
'
s value.
whole_link: If True, returns the entire URL to the release. If False, it returns
only the build number. default: False
"""
regex
=
"
//sickbeard\.googlecode\.com/files/
SickBeard\-win32\-alpha\-build(\d+)(?:\.\d+)?\.zip
"
regex
=
"
.*
SickBeard\-win32\-alpha\-build(\d+)(?:\.\d+)?\.zip
"
svnFile
=
urllib
.
urlopen
(
self
.
gc
_url
)
svnFile
=
urllib
.
urlopen
(
self
.
version
_url
)
for
curLine
in
svnFile
.
readlines
():
match
=
re
.
search
(
regex
,
curLine
)
logger
.
log
(
u
"
checking line
"
+
curLine
,
logger
.
DEBUG
)
match
=
re
.
match
(
regex
,
curLine
)
if
match
:
logger
.
log
(
u
"
found a match
"
,
logger
.
DEBUG
)
if
whole_link
:
return
match
.
grou
p
(
0
)
return
curLine
.
stri
p
()
else
:
return
int
(
match
.
group
(
1
))
...
...
@@ -142,7 +145,9 @@ class WindowsUpdateManager(UpdateManager):
self
.
_cur_version
=
self
.
_find_installed_version
()
self
.
_newest_version
=
self
.
_find_newest_version
()
if
self
.
_newest_version
>
self
.
_cur_version
:
logger
.
log
(
u
"
newest version:
"
+
repr
(
self
.
_newest_version
),
logger
.
DEBUG
)
if
self
.
_newest_version
and
self
.
_newest_version
>
self
.
_cur_version
:
return
True
def
set_newest_text
(
self
):
...
...
@@ -154,6 +159,8 @@ class WindowsUpdateManager(UpdateManager):
new_link
=
self
.
_find_newest_version
(
True
)
logger
.
log
(
u
"
new_link:
"
+
repr
(
new_link
),
logger
.
DEBUG
)
if
not
new_link
:
logger
.
log
(
u
"
Unable to find a new version link on google code, not updating
"
)
return
False
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment