sql statement to set watched flag using directory name (1 Viewer)


Portal Pro
October 29, 2009
Australia Australia
hi all,

installed a mediaportal update recently, and lost all of my config, including the watched flag for my movies! :( i started setting the watched flag again manually, but it's way too time consuming.

can someone help me with the sql for setting the watched flag? i have all my directories named with ratings, e.g. "Toy Story 3 c2010_++++" - if there's a + it would indicate that the movie has been watched.

i've installed sql lite, and opened the database, as per this post.

now, i just need the sql, so, something like:

update user_movie_settings
set watched = 1
where user_movie_settings.id = local_media.id
and local_media.fullpath like '%+%'

this obviously being incorrect.




Community Plugin Dev
June 7, 2007
United States of America United States of America
For what its worth every time you run the Moving Pictures installer it backs up your database. You might be able to restore your old data.


Portal Pro
October 29, 2009
Australia Australia
thanks fforde, but there's a lot of big bold writing nowadays warning that restoring old config might cause problems, so i was wary.

anyway, here's the sql in case it's of use to anyone else:

update user_movie_settings
set watched = 1
where id in (
select movie_info_id
from local_media__movie_info
where local_media_id in (
select id
from local_media
where fullpath like '%+%'))



Users Who Are Viewing This Thread (Users: 0, Guests: 1)

OP Similar threads Forum Replies Date
G MP1 TV Server "failed to upgrade the database" using MS Sql Server Installation, configuration support 3
B 'Successful' install of MP2.2.2 on W8.1 - but can't connect to sql db General 1
da3dsoul [Request] An MVP Plugin example for custom settings in MP2 Plugin Development 2
M.Hulot MP plays in Internal Blu-ray-Player-mode always first audio stream not the one I chosen in settings General Support 1
R Correct setting for recordings on shared folder General 0
J New computer with win10 and how will i set Mediaportal up ? Newcomers Forum 55
M [fixed] [MP2-831] 12h time format shown in TV Guide with Swedish language settings Submit: Bug Reports 27
joEhSuper Backup Setting - ErrorBackupFolder TV-Server 9
Rob Hexenmeister [solved] Customising Fanart Handler settings Fanart Handler 3
joecrow AMD Radeon Settings app. won't start after hibernation. General Support 0
L [solved] Modifying programmed recording after setting it General 0
B [solved] How to manually set MAC of TV Server for WOL Installation, configuration support 2
X MadVR Settings Video & DVD 2
J Resume from Standby Last Module TV Showing TV Server Settings Television (MyTV frontend and TV-Server) 2
D Correct wake-on-lan settings General 3
G MP Crashed during setting up recording. Newcomers Forum 1
cbr954rr Overtake/overwrite settings for all clients Feature Requests 0
cbr954rr Same settings on all Clients? General 6
framug 1.22.0 BasicHome Editor settings for DefaultWide HD skin not kept when update 1.22 3
N [Question] [MP2-493] Default culture not saved in settings MediaPortal 2 0
cbr954rr Movie sets in films General 20
D PC rebuild & MP2 upgrade - how to preserve database and settings? General 1
cbr954rr Possibillity to export and import all client settings? General 0
morpheus_xx [Finished] [MP2-802] TV-Settings availability in all TV screens MediaPortal 2 12
N [will not fix] Changed settings do not take effect until MP2-Client is stopped and restarted. Submit: Bug Reports 4
Similar threads

Top Bottom