From e80c2919908b117e2104d95497fab64f1530b760 Mon Sep 17 00:00:00 2001 From: Brandon Gallagher Date: Thu, 13 Aug 2020 19:04:12 -0400 Subject: [PATCH 1/4] test commit --- orpheusbetter => orpheusbetter.py | 12 ++++++------ transcode.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) rename orpheusbetter => orpheusbetter.py (97%) mode change 100755 => 100644 diff --git a/orpheusbetter b/orpheusbetter.py old mode 100755 new mode 100644 similarity index 97% rename from orpheusbetter rename to orpheusbetter.py index 50028c1..6289b23 --- a/orpheusbetter +++ b/orpheusbetter.py @@ -279,12 +279,12 @@ def main(): # may be fixable when the tags are copied. broken_tags = False for flac_file in transcode.locate(flac_dir, transcode.ext_matcher('.flac')): - (ok, msg) = tagging.check_tags(flac_file, check_tracknumber_format=False) - if not ok: - print("A FLAC file in this release has unacceptable tags - skipping: {0}".format(msg)) - print("You might be able to trump it.") - broken_tags = True - break + # (ok, msg) = tagging.check_tags(flac_file, check_tracknumber_format=False) + # if not ok: + # print("A FLAC file in this release has unacceptable tags - skipping: {0}".format(msg)) + # print("You might be able to trump it.") + # broken_tags = True + # break if broken_tags: continue diff --git a/transcode.py b/transcode.py index d784ce7..f670350 100755 --- a/transcode.py +++ b/transcode.py @@ -220,9 +220,9 @@ def transcode(flac_file, output_dir, output_format): raise TranscodeException('Transcode of file "{0}" failed: SIGPIPE'.format(flac_file)) tagging.copy_tags(flac_file, transcode_file) - (ok, msg) = tagging.check_tags(transcode_file) - if not ok: - raise TranscodeException('Tag check failed on transcoded file: {0}'.format(msg)) + # (ok, msg) = tagging.check_tags(transcode_file) + # if not ok: + # raise TranscodeException('Tag check failed on transcoded file: {0}'.format(msg)) return transcode_file From d1210185a6209f652c743d0b98f05225d78e9b00 Mon Sep 17 00:00:00 2001 From: Brandon Gallagher Date: Thu, 13 Aug 2020 19:07:14 -0400 Subject: [PATCH 2/4] lol --- orpheusbetter.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/orpheusbetter.py b/orpheusbetter.py index 6289b23..994ecff 100644 --- a/orpheusbetter.py +++ b/orpheusbetter.py @@ -272,21 +272,21 @@ def main(): needed = formats_needed(group, torrent, supported_formats) print("Formats needed: {0}".format(', '.join(needed))) - if needed: - # Before proceeding, do the basic tag checks on the source - # files to ensure any uploads won't be reported, but punt - # on the tracknumber formatting; problems with tracknumber - # may be fixable when the tags are copied. - broken_tags = False - for flac_file in transcode.locate(flac_dir, transcode.ext_matcher('.flac')): - # (ok, msg) = tagging.check_tags(flac_file, check_tracknumber_format=False) - # if not ok: - # print("A FLAC file in this release has unacceptable tags - skipping: {0}".format(msg)) - # print("You might be able to trump it.") - # broken_tags = True - # break - if broken_tags: - continue + # if needed: + # # Before proceeding, do the basic tag checks on the source + # # files to ensure any uploads won't be reported, but punt + # # on the tracknumber formatting; problems with tracknumber + # # may be fixable when the tags are copied. + # broken_tags = False + # for flac_file in transcode.locate(flac_dir, transcode.ext_matcher('.flac')): + # # (ok, msg) = tagging.check_tags(flac_file, check_tracknumber_format=False) + # # if not ok: + # # print("A FLAC file in this release has unacceptable tags - skipping: {0}".format(msg)) + # # print("You might be able to trump it.") + # # broken_tags = True + # # break + # if broken_tags: + # continue for format in needed: if os.path.exists(flac_dir): From df18723dd879923d71812d277cbb7deafdd00db4 Mon Sep 17 00:00:00 2001 From: Brandon Gallagher Date: Thu, 13 Aug 2020 20:15:18 -0400 Subject: [PATCH 3/4] added dockerfile --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..db8ab24 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +from python:latest + +COPY . . + +RUN pip install -r requirements.txt + +ENTRYPOINT ["python", "orpheusbetter.py"] \ No newline at end of file From fb0422a4788fff78f1837fe66ff4e5828accd10d Mon Sep 17 00:00:00 2001 From: Brandon Gallagher Date: Thu, 13 Aug 2020 20:17:12 -0400 Subject: [PATCH 4/4] Fixed Dockerfile and added docker compose --- Dockerfile | 1 + docker-compose.yml | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index db8ab24..647c0a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ from python:latest COPY . . +RUN aptitude install mktorrent flac lame sox RUN pip install -r requirements.txt ENTRYPOINT ["python", "orpheusbetter.py"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..97bcb9a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3.8' + +services: + main: + build: + context: "." + dockerfile: "Dockerfile" \ No newline at end of file