Comments (11)
Hoping that this can make it easy - http://pypi.python.org/pypi/python-itunes/1.0
from sickbeard_mp4_automator.
This should be doable, I'll have to take some time to familiarize myself with what data iTunes provides but I imagine this wouldn't be hard to implement.
from sickbeard_mp4_automator.
I've had a further look at the iTunes API, and the Python script. The script doesn't deal with tv shows at all, but we can use the generic search function. The iTunes API doesn't seem to have an option to search for an individual episode. The smallest result set I could find is a list of all episodes in a season. Example URL below:
from sickbeard_mp4_automator.
I've had a further look at the iTunes API, and the Python script. The script doesn't deal with tv shows at all, but we can use the generic search function. The iTunes API doesn't seem to have an option to search for an individual episode. The smallest result set I could find is a list of all episodes in a season. Example URL below:
http://itunes.apple.com/search?term=Breaking+Bad+Season+5&media=tvShow&entity=tvEpisode&attribute=tvSeasonTerm&limit=200
from sickbeard_mp4_automator.
Using that iTunes API here is a quick query that seems to return some metadata. I don't know if iTunes metadata is much less complete than TVDB, as I don't see any other useful results in the XML file.
import itunes
show = "Futurama"
season = 1
episode = 1
q = show + ", Season " + str(season)
items = itunes.search(q, 'tvShow', 'tvEpisode', 'tvSeasonTerm')
for item in items:
if item.get_disc_number() == episode:
print item.get_name()
print item.get_short_desc()
print item.get_long_desc()
print item.get_artwork_url()
print item.get_release_date()
I had to fork that project and add some functionality to be able to pull down most of the TV show parameters that we'd be interested in.
Here is the fork:
https://github.com/mdhiggins/python-itunes
from sickbeard_mp4_automator.
Awesome, I'll have a bit of a look at this shortly. FYI on GitHub you can submit a "pull request" to the author of python-itunes to merge your changes back in to the original project. He might decline but I can't imagine why.
from sickbeard_mp4_automator.
That's a cool feature, once we've got queries for all the metadata that would be a good idea
from sickbeard_mp4_automator.
It seems pretty lame that the API only returns a 100x100 pixel image, eg http://a452.phobos.apple.com/us/r1000/032/Video/77/84/40/mzl.hdvcjrps.100x100-75
.jpg
If I go to https://itunes.apple.com/au/tv-season/futurama-season-2/id285627519 and get the image URL it is http://a3.mzstatic.com/us/r1000/020/Features/77/84/40/dj.gfrsozhq.170x170-75.jpg which is 170x170.
I can then strip the 170x170-75 from the URL to get the full image which is 1250x1253 px - http://a3.mzstatic.com/us/r1000/020/Features/77/84/40/dj.gfrsozhq.jpg
There doesn't seem to be a way to do that using the URL that the API returns. I suppose you could replace the domain name with http://a3.mzstatic.com/ and then strip the dimensions / quality but I'm not sure if that will work consistently or not.
from sickbeard_mp4_automator.
The CDN seems to work for a1-8, eg a1.mzstatic.com through a8.mzstatic.com. I tested it on a few different shows including Futurama, Breaking Bad, Arrested Development and New Girl.
I did also find another issue with iTunes API. Sometimes it returns another collection when you search for a season. Eg searching for Breaking Bad, Season 2 returns exactly that PLUS "Breaking Bad, Deluxe Edition: Seasons 1 & 2". I would imagine most of the time the first lot of results would be more accurate, so if we do use this we need to put in checks to ignore the other collections.
I'm starting to think the metadata from iTunes is pretty sucky, but I think I would still like to be able to get the artwork.
from sickbeard_mp4_automator.
I think it might be more reliable to just put an option to pull the artwork from iTunes and leave the rest of the metadata from theTVDB. I already implemented better tagging for iTunes (which let me know if those are working better for you cause I don't use iTunes). A lot of the info is missing from the iTunes source anyway.
from sickbeard_mp4_automator.
Does anybody know how or what Subler (https://bitbucket.org/galad87/subler) uses to pull meta data from the iTunes store? That app seems to bee pretty reliably querying all the meta data and full size art work for shows and movies.
from sickbeard_mp4_automator.
Related Issues (20)
- Add support for av1_vaapi (and/or av1_qsv)
- What is "SMA"? Why is the the "Encoding Tool" tag listed as "SMA" in all my processed video files? HOT 1
- File deleting immediately HOT 4
- Universal Surround Audio HOT 7
- Language flow HOT 3
- [Question] Speed up process? HOT 2
- sonarr-sma docker -- having issues trying to get ffmpeg to work with nvidia. HOT 31
- Unable to get Dolby Atmos in Plex on the Apple TV HOT 1
- Use hardware encoder and software decoder HOT 5
- Invalid format string in avcodecs.py NVEncH265Codec HOT 3
- Error in postSonarr with recent Sonarr update (4.0.1.929 — Jan 19 2024) HOT 2
- Generic Permissions HOT 1
- Need help with skipStream HOT 2
- How to get/configure SMA to use my Nvidia GPU HOT 5
- SAB Stating it is unable to run script HOT 2
- Problem embedding external subtitles HOT 1
- Subtitle marked as default HOT 11
- Convert only french audio track if not in codec list HOT 7
- Not Processing files running in Manual Mode HOT 9
- Embed subtitles srt. HOT 7
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 sickbeard_mp4_automator.