Opened 5 years ago

Closed 5 years ago

#13545 closed Patch - Bug Fix (fixed)

Music scripts: add python3 compatibility

Reported by: rcrdnalor Owned by: Bill Meek
Priority: minor Milestone: 31.0
Component: Plugin - MythMusic Version: Master Head
Severity: medium Keywords: python3
Cc: Ticket locked: no

Description

The attached patch adds compatibility to python3 for the grabber and lyrics scripts in mythtv/programs/scripts/metadata/Music.

Note: The following scripts seem to be broken for python2 and are not handled by this patch:

  • Music/lyrics/alsong.py
  • Music/lyrics/baidu.py
  • Music/lyrics/lyricsmode.py

Tested with

$ python[2,3] filelyrics.py -v
$ python[2,3] filelyrics.py -d -t
$ python[2,3] darklyrics.py -v
$ python[2,3] darklyrics.py -d -t
$ python[2,3] embedlrc.py -v
$ python[2,3] embedlrc.py -d -t
$ python[2,3] genius.py -v
$ python[2,3] genius.py -d -t
$ python2 genius.py -s -a "Celine Dion" -b "D'Eux" -n "J'attendais"
$ python3 genius.py -s -a "Céline Dion" -b "D'Eux" -n "J'attendais"
$ python[2,3] lyricscom.py -v
$ python[2,3] lyricscom.py -d -t
$ python2 lyricscom.py -s -a "Celine Dion" -b "D'Eux" -n "J'attendais"
$ python3 lyricscom.py -s -a "Céline Dion" -b "D'Eux" -n "J'attendais"
$ python[2,3] lyricswiki.py -v
$ python[2,3] lyricswiki.py --d -t
$ python2 lyricswiki.py -s -a "Celine Dion" -b "D'Eux" -n "J'attendais"
$ python3 lyricswiki.py -s -a "Céline Dion" -b "D'Eux" -n "J'attendais"
$ python[2,3] ttplayer.py -v
$ python[2,3] ttplayer.py -d -t
$ python[2,3] mbutils.py -v
$ python[2,3] mbutils.py -d -t
$ python[2,3] mbutils.py -s -a 'Dire Straits'
$ python[2,3] mbutils.py -s -a "Céline Dion"
$ python[2,3] mbutils.py -g -i "847e8a0c-cc20-4213-9e16-975515c2a926"
$ python[2,3] mbutils.py -r -a "Céline Dion" -b "D'Eux"
$ python[2,3] mbutils.py -f --id '65528137-f5e3-4d94-8e0c-f984346e4ef6'
$ python[2,3] mbutils.py --finddisc --cddevice /dev/sr0   -->  Santana: Supernatural

Not working grabbers and therefore not handled within this issue:

$ python2 alsong.py -d -t 
    --> NOK  urllib2.URLError: <urlopen error [Errno -2] Name or service not known>

$ python2 baidu.py -d -t
    --> NOK   http://music.baidu.com/search/lrc?key=Money For Nothing-Dire Straits
    
$ python2 lyricsmode.py -d -t
    --> NOK

Attachments (1)

music_scripts_python_2_3.patch (38.5 KB) - added by rcrdnalor 5 years ago.
Add compatibility to python3 for music grabber scripts

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by rcrdnalor

Add compatibility to python3 for music grabber scripts

comment:1 Changed 5 years ago by Bill Meek

Milestone: needs_triage31.0
Owner: changed from paulh to Bill Meek
Status: newaccepted

Paul, I grabbed this since I applied Roland's other solutions.

comment:2 Changed 5 years ago by Roland Ernst <rcrernst@…>

Resolution: fixed
Status: acceptedclosed

In f1d8870c1d/mythtv:

Python Bindings: adds python3 compatibility to Music scripts

Closes #13545

Signed-off-by: Bill Meek <billmeek@…>

Note: See TracTickets for help on using tickets.