Any reliable way to remember UPnP mediaserver media file location? - upnp

I'm working on a mediarenderer client project which needs to memorize last played media file. I initially stores from service and thought that it would be fine until I discovered that the media ObjectID is not permanent.
For example, I have 2 files A.mp3 and B.mp3 with ObjectID "1" and "2" respectively. If I remove A.mp3 and restart the media server, it assign "1" to B.mp3 while I thought it would still be "2". This happens on both mediaservers (pms, minidlna) I tried out.
So my question: What info can I use to remember the media file location other than storing the full hierarchy (eg. /path/to/music.mp3) as I need to resolve the path step by step to obtain the playback URL which I think is less efficient.

I came into a conclusion that UPnP Media Server simply did not define a usecase for this. And I tested out VLC media player and found that they are facing the same issue, hence this issue doesn't deserve a workaround perhaps.

Related

SONOS Playback error "These Songs are not available for Streaming from APPNAME"

I've been preparing POC to integrate our music service with SONOS, I've written simple service for testing purpose. I've implemented three essential methods to play url "getMetadata", "getMediaMetadata" and "getMediaURI".
First I've tried with media type "track" and returned song url(hard coded) from "getMediaURI" method which is .mp4 format, It worked fine as expected.
Later when I've tried with 7-digital url playback fails by saying "These Songs are not available for Streaming from "APPNAME". I've tried changing mime type values also nothing seems working. Type : audio/x-m4a
Note: Same 7 digital url is playing fine on browser.
Am I doing anything wrong here? Am I missing anything? Any help is really appreciated.
Thanks.
Looking at the documentation on Sonos' developer website, it doesn't seem like that audio/x-m4a is a supported MIME type. Do you know the audio format of 7-Digital's track for sure? If its mp4 or m4a, I would try setting the MIME type to one of these - audio/mp4, audio/aac,
application/x-mpegURL, application/vnd.apple.mpegURL, audio/x-mpegurl
Also make sure that your track's sampling is supported as described in the table at the link below.
Link http://musicpartners.sonos.com/node/464

Opera Next extension autoupdate via update_url

I got problem with my company internal extension. They don't want to publish it, as it does gather data on external server. So I need to host it myself... but would like not to lose ability of autoupdate.
As far as I read I need to use update_url in manifest, but nothing more is said in Opera documentation...
"update_url": "http://path/to/updateInfo.xml", - as it is said in documentation page
Ok... and what should I put in that xml? Will it autoupdate or just notify users about new updates? Where do I put rest of updated files?
I tried to concat Opera itself about this question, but they don't give any contact information except something like if you have problem, ask on stackoverflow... so here I am.
If it does not work, I was thinking about really BAD method, using unsafe-eval and keeping newest version in local storage... but would rather like to avoid that.
In general the behavior is the same as for Chrome. You can base on this document: https://developer.chrome.com/extensions/autoupdate

Using JSON to update app's content in iOS

I'm about to create an application that uses JSON to update its content.
This is how I planned it to work:
When application starts, it checks (with internet connection is available) if the JSON file set on remote server is newer than the one stored localy - if it is then it's downloaded.
Then, the application applies data from that JSON to the content. For example, to the "Contact" information - it applies data like phone numbers etc.
My question is, is it in your opinion, a good technique to update appliactions content?
Does anynone had an experience with building app with this kind of idea?
Best regards,
Zin
Of course you can do this. One thing that may lead to a better user experience would be to ask the user for his permission to download new content (if there is something new).
This is a normal thing to do. I have a phonebook app that does exactly this. On a side note, if you need a network class to handle the web-service interaction, see this SO post. I wrote a custom network class that works with AFNetworking.

ALAsset URLs have changed from iOS 4.3 to 5.0?

I've got an app where I'm taking pictures and storing them to the camera roll. I save the resultant ALAsset's URL so I can reload those specific images again later.
This seemed to be working fine until I upgraded to iOS 5.0.
Now, when I try to load the asset I'm always getting nil back.
I've enumerated the entire camera roll, checking the URLs of the images in there, and indeed the URLs seem to be different.
ie., I was able to save (and reload) an asset with URL: 'assets-library://asset/asset.JPG?id=1000001124&ext=JPG'. But, now it no longer exists. In fact, all the asset URLs are longer now, such as: 'assets-library://asset/asset.JPG?id=6BDB93FD-B94C-4F77-9ABD-26F34F06B429&ext=JPG' (perhaps those are now more unique?)
Anyway, has anyone else seen this? Am I missing something? Are all my old saved files now useless? Is there any way to map from the old URL to the new URL?
Should I be taking a different approach? I don't want to release this and then find out that the URLs have all been changed on me (and my users) again...
Thoughts?
Apple did rewrite the whole Photo-Library for iOS 5. Its now based on Core-Data rather than just SQLIte. That's why the IDs/URLs are completely different now. I think there is no way to map between the old and new IDs. I would guess that in the future the IDs will be persistent (the way core-data works).
Cheers
Hendrik

iOS 5 Newsstandkit where does it store downloaded issues?

I'm trying to figure out more about iOS 5 newsstand kit and where it stores the downloaded issues, I have read the documentation and can see that there is an NKLibrary class but cannot see any indication on how to handle the downloads or where they are actually stored.
Thanks
Ok, so NewstandKit works a little differently than you might expect. Take a look at this for the nitty gritty: http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/NewsstandKit_Framework/_index.html
But, Basically during the issue download the app should be passing its (the product's) information including it's NSURL an NKIssue via [NKIssue addAssetWithRequest]. Assuming the download doesn't fail and you have done the other Newstand stuff right, the product should be saved in the properly and you do not have to worry about dictating a specific location for it to be saved.
Another reason to not worry too much about where the issues are being saved, is that Newstand will delete old issues if the device's storage becomes limited.
Hope that helps.
Never worrying about the downloads's destination might not be the best way to deal with the problem. It's true that the destination is chosen automatically when downloading an asset. However, what's saved then is just a temporary file, which must be moved somewhere else and which might also need to be processed in whatever way.
Take a look at the "contentURL" property in NKIssue. This is the location which NewsstandKit recommends as the very destination of issue-related assets.
Cheers :)