Comments (2)
it was present some time ago when code looked like this:
created a download function, but apparently skipped Prefs
### Plex - Plex Theme song - https://plexapp.zendesk.com/hc/en-us/articles/201178657-Current-TV-Themes ###
# if in current folder, or the parent one / url = local / elif in common theme song folder / try language priority / try root of common theme song folder / try remote server
#if filename in metadata.themes: Log.Debug("parseAniDBXml - Theme song - already added from local copy")
url = THEME_URL % tvdbid
if url in metadata.themes: Log.Debug("parseAniDBXml - Theme song - already added")
else:
filename = "Plex/%s.mp3" % metadata.id
if Data.Exists(filename):
Log.Debug("parseAniDBXml - Theme song - not added but present locally: adding it from local file")
theme_song = Data.Load(filename)
metadata.themes[filename] = Proxy.Media(theme_song)
elif Prefs['GetPlexThemes']:
if self.http_status_code(THEME_URL % tvdbid) == 200:
try: theme_song = HTTP.Request(url, cacheTime=None)
except Exception, e: Log.Debug("parseAniDBXml - Theme song - not added previously and not present locally but on Plex servers, however download failed: %s" % url)
else:
Log.Debug("parseAniDBXml - Theme song - not added previously and not present locally but on Plex servers, and download suceeded: %s" % url)
try: Data.Save(filename, theme_song)
except: Log.Debug("parseAniDBXml - Plugin Data Folder not created, no local cache")
metadata.themes[url] = Proxy.Media(theme_song)
else:
Log.Debug("parseAniDBXml - Theme song - Theme song not present on Plex servers for tvdbid: %s" % tvdbid)
try: tvdb_title = getElementText(tvdbanime, '/Data/Series/SeriesName')
except:
tvdb_title= "title error, Not in serie XML"
error_log ['anime-list tvdbid missing'].append("anidbid: %s, title: '%s', tvdbid: %s, Not in serie XML, %s" % (metadata.id.zfill(5), orig, tvdbid.zfill(5), WEB_LINK % (TVDB_SERIE_URL % tvdbid, "TVDB") ) )
error_log ['Plex themes missing' ].append("anidbid: %s, title: '%s', tvdbid: %s, title: '%s' <a href='mailto:[email protected]?cc=&subject=Missing%%20theme%%20song%%20-%%20'%s%%20-%%20%s.mp3''>Upload</a>" % (metadata.id.zfill(5), orig, tvdbid.zfill(5), tvdb_title, tvdb_title, tvdbid) )
from hama.bundle.
Perfect 😄
from hama.bundle.
Related Issues (20)
- Missing Genre entries HOT 3
- Adding to TrueNAS SCALE containers HOT 4
- Japanese Summaries HOT 2
- Make Discover Credits functionality compatible with HAMA HOT 1
- Locked (edited) fields are overwritten when applying anidb mapping HOT 5
- "Refresh Metadata" removes customizations HOT 10
- Not finding the newer series HOT 9
- Newly added episodes of a specific series no longer receive metadata HOT 9
- One Piece [tvdb4-81797] is not downloading any metadata. HOT 2
- Naruto Arcs not being correctly named, I think my tvdb4.mapping file is being ignored and is using the online xml file? HOT 7
- ASS + Hama not correctly identifying Show HOT 9
- Hama Parsing Errors degrading server performance HOT 5
- Movies broken into "episodes" with AniDB HOT 7
- Two shows refuse to load/fetch metadata even after doing a plex dance. Had metadata prior to losing it. HOT 22
- Anime named with year (Trash Guide) causing metadata to not be found HOT 13
- Support new style of subtitle metadata hi, sdh, cc HOT 1
- One Piece not loading metadata HOT 1
- Dr. Stone: Ryuusui keeps getting a high score with other Dr. Stone Titles
- Naming Scheme "Show Title (year)" (according to Anidb) is not being recognized properly
- Suicide Squad Isekai is pulling the Japanese episode summaries from TVDB HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hama.bundle.