Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata/Music: remove unused external dependency on simplejson #837

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions mythtv/programs/scripts/metadata/Music/lyrics/genius.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from optparse import OptionParser
from common import utilities

import json as simplejson
import json

__author__ = "Paul Harrison and ronie'"
__title__ = "Genius"
Expand Down Expand Up @@ -50,7 +50,7 @@ def get_lyrics(self, lyrics):
return False

req.close()
data = simplejson.loads(response)
data = json.loads(response)

try:
name = data['response']['hits'][0]['result']['primary_artist']['name']
Expand Down Expand Up @@ -198,4 +198,3 @@ def main():

if __name__ == '__main__':
main()

9 changes: 2 additions & 7 deletions mythtv/programs/scripts/metadata/Music/lyrics/lyricswiki.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#-*- coding: UTF-8 -*-

import sys, re, socket
import json, sys, re, socket

try:
from urllib2 import quote, urlopen, HTTPError
Expand All @@ -15,11 +15,6 @@

from optparse import OptionParser

if sys.version_info < (2, 7):
import simplejson
else:
import json as simplejson

from common import *

__author__ = "Paul Harrison and ronie'"
Expand Down Expand Up @@ -49,7 +44,7 @@ def get_lyrics(self, lyrics):
except:
return False
req.close()
data = simplejson.loads(response)
data = json.loads(response)
try:
self.page = data['url']
except:
Expand Down