~jonnyjd/isrcsubmit/master

« back to all changes in this revision

Viewing changes to isrcsubmit.py

  • Committer: Johannes Dewender
  • Date: 2013-10-14 17:59:27 UTC
  • mfrom: (189.1.17)
  • Revision ID: git-v1:eb933d9fd27861a58d8161f0ba86f1d242456380
Merge branch 'tests'

see pull request #81

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
except NameError:
77
77
    unicode_string = str
78
78
 
 
79
# global variables
 
80
options = None
 
81
ws2 = None
 
82
 
79
83
def script_version():
80
84
    return "isrcsubmit %s by JonnyJD for MusicBrainz" % __version__
81
85
 
986
990
                user_input("(press <return> when done with this ISRC) ")
987
991
 
988
992
 
989
 
if __name__ == "__main__":
 
993
def main(argv):
 
994
    global options
 
995
    global ws2
990
996
 
991
997
    # global variables
992
 
    options = gather_options(sys.argv)
 
998
    options = gather_options(argv)
993
999
    ws2 = WebService2(options.user)
994
1000
 
995
1001
    disc = get_disc(options.device, options.backend)
1037
1043
        # the ISRCs are deemed correct, so we can use them to check others
1038
1044
        check_global_duplicates(disc.release, mb_tracks, isrcs)
1039
1045
 
 
1046
if __name__ == "__main__":
 
1047
    main(sys.argv)
 
1048
 
1040
1049
 
1041
1050
# vim:set shiftwidth=4 smarttab expandtab: