Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove defines

  • Loading branch information...
commit 5a62312d8f53aeef71437a0e98f2489fc135b022 1 parent afa4813
Carl Schönbach authored
View
3  config.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
# YOU NEED TO COPY THIS FILE TO config.py so that the program uses those values here
import os
-from tools.defines import Quality
# caches are only used temporarily - if a download fails, sometimes it can help to delete
# all cachedata - the only negative point in deleting all cachedata is, that the program may be a bit slower on next start
@@ -9,8 +8,6 @@
cache_dir_for_flv = 'cache2' # here we write flashdownloads
flash_dir = 'flash' # all finished flashdownloads go in this directory and will be deleted from the cachedir
-flash_quality = Quality.HIGH # sometimes the videopages offer different qualities - don't change the quality in the middle of a download - the resulting movie will be broken then
-
import logging
View
3  config.py.example
@@ -2,7 +2,6 @@
# YOU NEED TO COPY THIS FILE TO config.py so that the program uses those values here
import os
from tools.defines import Log
-from tools.defines import Quality
# caches are only used temporarily - if a download fails, sometimes it can help to delete
# all cachedata - the only negative point in deleting all cachedata is, that the program may be a bit slower on next start
@@ -10,8 +9,6 @@ cache_dir = 'cache' # here we write normal html-downloads
cache_dir_for_flv = 'cache2' # here we write flashdownloads
flash_dir = 'flash' # all finished flashdownloads go in this directory and will be deleted from the cachedir
-flash_quality = Quality.HIGH # sometimes the videopages offer different qualities - don't change the quality in the middle of a download - the resulting movie will be broken then
-
import logging
View
11 tools/commandline.py
@@ -1,6 +1,5 @@
import sys
-import defines as defs
try:
import config
except:
@@ -34,15 +33,6 @@ def usage():
sys.exit(0)
-def set_quality(arg):
- global config
- if arg:
- config.flash_quality = defs.Quality.High
- print 'set quality to high'
- else:
- config.flash_quality = defs.Quality.Low
- print 'set quality to low'
-
def set_cachePort(arg):
global config
print "set cachePort to "+str(arg)
@@ -163,7 +153,6 @@ def add_to_commands(short, long, param, call, descr):
add_to_commands('h', 'help', None, usage, 'prints this help')
add_to_commands('v', 'version', None, version, 'prints the version')
-add_to_commands('q', 'quality', 'BOOL', set_quality, 'quality like in the config-file 0=low, 1=high')
add_to_commands('d', 'dl_instances', 'INT', set_dl_instances, 'set the number of parallel downloads')
add_to_commands('c', 'curses', 'BOOL', set_curses, 'enables curses display or disables if argument is 0 *not yet implemented*')
add_to_commands('t', 'title', 'STRING', set_title, 'the title which is used for this download - mainly for setting the dl filename')
View
24 tools/defines.py
@@ -1,24 +0,0 @@
-class Stream:
- NONE = 0
- VEOH = 1
- EATLIME = 2
- MEGAVIDEO = 3
- HDWEB = 4
- SEVENLOAD = 5
- YOUTUBE = 6
- STAGEVU = 7
- HDSHARE = 8
- PLAIN = 9
- ZEEC = 10
- XVID = 11
- CCF = 12
- DLC = 13
- VIDEOBB = 14
- MYVDEO = 15
- PUTLOCKER = 16
- # 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- str = ('', 'Veoh', 'EatLime', 'MegaVideo', 'HDWeb', '7Load', 'YouTube', 'StageVU', 'HDShare', 'Plain', 'Zeec', 'xvid', 'CCF', 'DLC', 'VideoBB', 'MyVdeo', 'Putlocker')
-
-class Quality:
- LOW = 0
- HIGH = 1
View
1  tools/downloader.py
@@ -5,7 +5,6 @@
import os
import time
import sys
-import tools.defines as defs
from tools.url import LargeDownload
import logging
log = logging.getLogger('downloader')
View
1  tools/page.py
@@ -1,5 +1,4 @@
import config
-import tools.defines as defs
from tools.stream import VideoInfo
log = config.logger['page']
View
1  tools/stream.py
@@ -1,6 +1,5 @@
from tools.url import UrlMgr
from tools.helper import *
-import tools.defines as defs
import sys
import logging
from tools.extension import ExtensionRegistrator
View
6 tools/streams/all.py
@@ -2,7 +2,6 @@
from tools.url import UrlMgr, LargeDownload
from tools.helper import textextract, textextractall
-import tools.defines as defs
import config
from tools.extension import Extension
@@ -425,10 +424,7 @@ def get(self, VideoInfo, justId=False, isAvailable=False):
# 73 value="http://ugc04.zeec.de/v/flv1/0x0/9229/99229_yq54tkgU4OVUgDEsxJFUEKMeKoe9YZFA.flv"/>
# 74 <property name="hd_src"
# 75 value="http://ugc02.zeec.de/v/ipod/640x480/9229/99229_yq54tkgU4OVUgDEsxJFUEKMeKoe9YZFA.mp4"/>
- if config.flash_quality == defs.Quality.HIGH:
- x = url.data.find('name="hd_src"')
- else:
- x = url.data.find('name="src"')
+ x = url.data.find('name="hd_src"')
flv_url, x = textextract(url.data, 'value="', '"', x)
self.flvUrl = dlUrl
return self.flvUrl
Please sign in to comment.
Something went wrong with that request. Please try again.